3.1 CA procedures: SPSS syntax
* Weight cases and, if necessary, reset the max number of SPSS cells to * greater than the max number of occ units squared. show mxcells. set mxcells 400000. show mxcells. weight by freq. 3.1.1 * 1) SPSS 'Correspondence' command (subcommands could be altered) :. correspondence table=hocc2(1 252) by wocc2(1 252) /dimensions=2 /measures=chisq /standardize=rcmean / normalization=symmetrical /print=table rpoint cpoint /plot=ndim(1,max) biplot(20). 3.1.2 * 2) SPSS 'anacor' command :. anacor table=hocc2 (1,252) by wocc2(1,252) /normalisation=canonical /print=scores. 3.1.3 * 3) SPSS 'homogeneity analysis' :. homals /variables=hocc2(252) wocc2(252) /analysis=hocc2 wocc2 /dimension=2 /print freq eigen history discrim quant /plot quant object discrim ndim(all,max) /maxiter=200 /convergence=0.00001.
Return to Preliminary CA models
3.2 Production job: SPSS syntax
* Example production job file to run multiple anacor CA models. get file="work.sav". show mxcells. set mxcells 400000. show mxcells. * Identify initial pseudo-dagionals ) :. compute pseudd=0. if ((hocc=123 & wocc=345) | (hocc=456 & (wocc=456 | wocc=457)) | (hempst=1 & wocc=678) ) pseudd=1. * [etc : adjust in repsonse to exploratory models]. weight by freq. ** Each model, preceded by a table showing the cases excluded as PSD's. * (note the repeated change of output settings, which can make pasting of output easier). * 1) Title only :. set ovars both onums both tvars both tnumbers labels. tables /format blank missing ('.') /ftotal=ftot1 "Total" /tables (labels) + ftot1 by pseudd > (hocc2 + wocc2) /statistics count ((F5.0) ' Cases ') /title="Husband and Wife Occupational Titles". set ovars both onums both tvars both tnumbers both. temp. select if (pseudd=0). anacor table=hocc2 (1,252) by wocc2(1,252) /normalisation=canonical /print=scores. * 2) Title-by-status : COMMENT OUT BECAUSE NUMBER OF UNITS TOO HIGH. *set ovars both onums both tvars both tnumbers labels. *tables /format blank missing ('.') /ftotal=ftot1 "Total" /tables (labels) + ftot1 by pseudd > (hbst2 + wbst2) /statistics count ((F5.0) ' Cases ') /title="Husband and Wife Occupational Title-by-status units". *set ovars both onums both tvars both tnumbers both. *temp. *select if (pseudd=0). *anacor table=hbst2 (1,700) by wbst2(1,700) /normalisation=canonical /print=scores. * 3) Employment status only :. set ovars both onums both tvars both tnumbers labels. tables /format blank missing ('.') /ftotal=ftot1 "Total" /tables (labels) + ftot1 by pseudd > (hempst2 + wempst2) /statistics count ((F5.0) ' Cases ') /title="Husband and Wife Occupational Employment status". set ovars both onums both tvars both tnumbers both. temp. select if (pseudd=0). anacor table=hempst2 (1,5) by wempst2(1,5) /normalisation=canonical /print=scores. * 4) Major group only :. set ovars both onums both tvars both tnumbers labels. tables /format blank missing ('.') /ftotal=ftot1 "Total" /tables (labels) + ftot1 by pseudd > (h1gp2 + w1gp2) /statistics count ((F5.0) ' Cases ') /title="Husband and Wife Occupational Major Group". set ovars both onums both tvars both tnumbers both. temp. select if (pseudd=0). anacor table=h1gp2 (1,9) by w1gp2(1,9) /normalisation=canonical /print=scores. * 5) Major group by status :. set ovars both onums both tvars both tnumbers labels. tables /format blank missing ('.') /ftotal=ftot1 "Total" /tables (labels) + ftot1 by pseudd > (h1gpst2 + w1gpst2) /statistics count ((F5.0) ' Cases ') /title="Husband and Wife Occupational Major Group by status". set ovars both onums both tvars both tnumbers both. temp. select if (pseudd=0). anacor table=h1gpst2 (1,45) by w1gpst2(1,45) /normalisation=canonical /print=scores. * 6) Minor group only :. set ovars both onums both tvars both tnumbers labels. tables /format blank missing ('.') /ftotal=ftot1 "Total" /tables (labels) + ftot1 by pseudd > (h3gp2 + w3gp2) /statistics count ((F5.0) ' Cases ') /title="Husband and Wife Occupational Minor Group". set ovars both onums both tvars both tnumbers both. temp. select if (pseudd=0). anacor table=h1gp2 (1,80) by w1gp2(1,80) /normalisation=canonical /print=scores. * 7) Minor group by status :. set ovars both onums both tvars both tnumbers labels. tables /format blank missing ('.') /ftotal=ftot1 "Total" /tables (labels) + ftot1 by pseudd > (h3gpst2 + w3gpst2) /statistics count ((F5.0) ' Cases ') /title="Husband and Wife Occupational Minor Group by status". set ovars both onums both tvars both tnumbers both. temp. select if (pseudd=0). anacor table=h3gpst2 (1,200) by w3gpst2(1,200) /normalisation=canonical /print=scores. weight off.Return to Preliminary CA models
5.1.1 Handling pseudo-diagonals in SPSS: syntax
get file="rev1pseuds1.sav". ** Create dummy indicator for all pseudo-diagonals concerned, eg :. compute m1prob=(diocc=1 | farm=1 | pub=1 | fambusi=1 | specpsd=1). weight by freq. set ovars both onums both tvars both tnumbers labels. tables /format blank missing ('.') /ftotal=ftot1 "Total" /tables (labels) + ftot1 by m1prob > (hbst4 + wbst4) /statistics count ((F5.0) ' Cases ') /title="Husband and Wife title-by-status units". set ovars both onums both tvars both tnumbers both. temp. select if (m1prob=0). correspondence table=hbst4(1 560) by wbst4(1 560) /dimensions=2 /measures=chisq /standardize=rcmean / normalization=symmetrical /print=table rpoint cpoint /plot=ndim(1,max) biplot(20). weight off.
Last modified 14 February
2002
This
document is maintained by
Paul Lambert (paul.lambert@stirling.ac.uk)