Please help me. I am new to using syntax - and not doing very well. What I
want to do is run a factor analysis on a correlation matrix. I attempted to write the following syntax - which does not seem to work (two options are included below - /contents and rowtype_ versions). Can anyone tell me what I am doing wrong. Any help would be much appreciated. With Regards. Neil McClelland University of Kitakyushu MATRIX DATA VARIABLES=F1 TO F6 /CONTENTS =CORR. BEGIN DATA 1.00 .00 1.00 .43 -.02 1.00 .55 .05 .23 1.00 .62 -.14 .56 .51 1.00 -.39 -.34 -.24 -.32 -.25 1.00 END DATA. LIST VAR = ALL. FACTOR /MATRIX IN(*) /MISSING LISTWISE /ANALYSIS F1 TO F6 /PRINT INITIAL EXTRACTION ROTATION /FORMAT SORT BLANK(.4) /PLOT EIGEN /CRITERIA MINEIGEN(1) ITERATE(25) /EXTRACTION ML /CRITERIA ITERATE(25) DELTA(0) /ROTATION OBLIMIN. MATRIX DATA VARIABLES=ROWTYPE_ F1 TO F6. BEGIN DATA CORR 1.00 CORR .00 1.00 CORR .43 -.02 1.00 CORR .55 .05 .23 1.00 CORR .62 -.14 .52 .51 1.00 CORR -.39 -.34 -.24 -.32 -.25 1.00 END DATA. LIST VAR = ALL. FACTOR /MATRIX IN(*) /MISSING LISTWISE /ANALYSIS F1 TO F6 /PRINT INITIAL EXTRACTION ROTATION /FORMAT SORT BLANK(.4) /PLOT EIGEN /CRITERIA MINEIGEN(1) ITERATE(25) /EXTRACTION ML /CRITERIA ITERATE(25) DELTA(0) /ROTATION OBLIMIN. ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
Administrator
|
To create a model of a matrix data file that will work as input for FACTOR, run some correlations with MATRIX OUT. E.g.,
CORRELATIONS /VARIABLES=educ paeduc maeduc speduc prestg80 /PRINT=TWOTAIL NOSIG /MATRIX=out(*) /MISSING=LISTWISE. The resulting matrix file looks like this: ROWTYPE_ VARNAME_ educ paeduc maeduc speduc prestg80 MEAN 13.7211538 10.7961538 10.8346154 13.4153846 45.1673077 STDDEV 2.7463647 3.9124307 3.1895110 2.9031499 13.1678393 N 520.000000 520.000000 520.000000 520.000000 520.000000 CORR educ 1.0000000 .3983482 .4117756 .5694070 .5422923 CORR paeduc .3983482 1.0000000 .6487286 .3804975 .2382280 CORR maeduc .4117756 .6487286 1.0000000 .4221452 .2160521 CORR speduc .5694070 .3804975 .4221452 1.0000000 .3257418 CORR prestg80 .5422923 .2382280 .2160521 .3257418 1.0000000 Number of cases read: 8 Number of cases listed: 8 Judging by that, I'd try adding means, standard deviations and Ns to your matrix file. Indeed, the following command runs on the matrix file shown above, but fails when I delete the first 3 rows. FACTOR /MATRIX IN(COR=*) /MISSING LISTWISE /ANALYSIS educ paeduc maeduc speduc prestg80 /PRINT INITIAL EXTRACTION /PLOT EIGEN /CRITERIA MINEIGEN(1) ITERATE(25) /EXTRACTION PAF /ROTATION NOROTATE /METHOD=CORRELATION.
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
In reply to this post by Neil McClelland
The syntax in green shows changes that made your syntax work.
This line is new. n 500 500 500 500 500 500 this line changed the file specification. /MATRIX IN(cor=*) If you are new to syntax you may be new to factor analysis. OBLIMIN allows the factors to be correlated. The correlation of.14 between the factors is fairly small so it may not be a problem. If you are trying to create scales, you would do better to stick with varimax rotation in order to have divergent validity. If the grouping of variables makes sense scale A would be the sum of F5, F1, F4, and F3. Scale B would be the sum of F6 and F2 reflected. But beware F6 is a "splitter", so depending on your goals you may want to stick with scale A only. An edited set of tested syntax follows. MATRIX DATA VARIABLES=ROWTYPE_ F1 TO F6. BEGIN DATA n 500 500 500 500 500 500 CORR 1.00 CORR .00 1.00 CORR .43 -.02 1.00 CORR .55 .05 .23 1.00 CORR .62 -.14 .52 .51 1.00 CORR -.39 -.34 -.24 -.32 -.25 1.00 END DATA. LIST VAR = ALL. FACTOR /MATRIX IN(cor=*) /MISSING LISTWISE /ANALYSIS F1 TO F6 /PRINT INITIAL EXTRACTION ROTATION /FORMAT SORT BLANK(.40) /PLOT EIGEN /CRITERIA MINEIGEN(1) ITERATE(25) /EXTRACTION ML /CRITERIA ITERATE(25) DELTA(0) /ROTATION OBLIMIN. Art Kendall Social Research Consultants On 11/25/2010 7:57 PM, Neil McClelland wrote: ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARDPlease help me. I am new to using syntax - and not doing very well. What I want to do is run a factor analysis on a correlation matrix. I attempted to write the following syntax - which does not seem to work (two options are included below - /contents and rowtype_ versions). Can anyone tell me what I am doing wrong. Any help would be much appreciated. With Regards. Neil McClelland University of Kitakyushu <snip> MATRIX DATA VARIABLES=ROWTYPE_ F1 TO F6. BEGIN DATA CORR 1.00 CORR .00 1.00 CORR .43 -.02 1.00 CORR .55 .05 .23 1.00 CORR .62 -.14 .52 .51 1.00 CORR -.39 -.34 -.24 -.32 -.25 1.00 END DATA. LIST VAR = ALL. FACTOR /MATRIX IN(*) /MISSING LISTWISE /ANALYSIS F1 TO F6 /PRINT INITIAL EXTRACTION ROTATION /FORMAT SORT BLANK(.4) /PLOT EIGEN /CRITERIA MINEIGEN(1) ITERATE(25) /EXTRACTION ML /CRITERIA ITERATE(25) DELTA(0) /ROTATION OBLIMIN. ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Art Kendall
Social Research Consultants |
Free forum by Nabble | Edit this page |