SPSS Statistics

 View Only
  • 1.  Syntax for Matrix Correlation to Execute Factor Analysis

    Posted Mon March 22, 2021 04:27 PM
    Hi,

    I am trying to use the pooled bivariate correlation values from an MI analysis to ultimately run an EFA.  I created a syntax using the following template provided by the IBM resource. However, it won't run for me. My matrix is 80x80 and about half way down all the numbers are red and a message pops up saying, "for syntax that is compatible with all modes of execution, restrict line lengths to 251 bytes." Does this mean my data set is too large? Or have I set up my syntax incorrectly?
    Example:
    MATRIX DATA VARIABLES = y1 TO y4 x1 TO x4
    /N= 200
    /CONTENTS = CORR .
    BEGIN DATA.
    1
    0.484 1
    0.464 0.425 1
    0.598 0.484 0.598 1
    0.461 0.347 0.585 0.825 1
    0.655 0.323 0.56 0.683 0.655 1
    0.343 -0.006 0.253 0.543 0.47 0.438 1
    0.551 0.217 0.516 0.679 0.567 0.558 0.518 1
    END DATA.
    EXECUTE.
    FACTOR
    /MATRIX = IN (COR = *)
    /PRINT INITIAL EXTRACTION ROTATION
    /FORMAT SORT
    /CRITERIA MINEIGEN(.5) ITERATE(25)
    /EXTRACTION PC
    /CRITERIA ITERATE(25) DELTA(0)
    /ROTATION OBLIMIN
    /METHOD=CORRELATION .

    The matrix I have is actually 80x80, so much larger than what I've included. For my data I have... 

    MATRIX DATA VARIABLES = SS1 TO CLD10
    /N= 236
    /CONTENTS = CORR
    BEGIN DATA.
    1
    0.583 1
    0.764 .570 1
    0.689 0.552 0.775 1
    0.471 0.493 0.548 0.548 1
    0.607 0.632 0.667 0.590 0.613 1
    0.621 0.515 0.586 0.648 0.486 0.633 1
    0.599 0.557 0.601 0.541 0.614 0.607 0.612 1
    0.470 0.476 0.531 0.461 0.455 0.552 0.476 0.452 1
    END DATA.
    EXECUTE.
    FACTOR
    /MATRIX = IN (COR = *)
    /PRINT INITIAL EXTRACTION ROTATION
    /FORMAT SORT
    /CRITERIA MINEIGEN(.5)ITERATE(250)
    /EXTRACTION PC
    /CRITERIA ITERATE(250) DELTA(0)
    /ROTATION OBLIMIN
    /METHOD=CORRELATION.

    Any help would be appreciated, thanks!
    Allie

    ------------------------------
    Allie Dluzniewski
    ------------------------------

    #SPSSStatistics


  • 2.  RE: Syntax for Matrix Correlation to Execute Factor Analysis

    Posted Mon March 22, 2021 04:50 PM
    Actually, I think I figured out the above problem. 
    But now, I'm getting an Error message saying that CRITERIA in the "/CRITERIA ITERATE(250) DELTA(0)" command is not recognized as a SPPS command.
    Any ideas?

    Thanks!
    Allie

    ------------------------------
    Allie Dluzniewski
    ------------------------------



  • 3.  RE: Syntax for Matrix Correlation to Execute Factor Analysis

    IBM Champion
    Posted Mon March 22, 2021 05:00 PM
    What you probably figured out for the first problem is that the lines of data are too long.  The inline commands and data are limited to 255 bytes.  That's why they turned red partway through.  The solution to this is to read them from a file with the MATRIX DATA  /FILE subcommand.  Maybe that is what you did.

    But the second problem is likely that you have a blank line in the middle of the FACTOR command.  A blank line acts as a command terminator, so the CRITERIA subcommand is being interpreted as the start of the a new command, hence the error message.

    --





  • 4.  RE: Syntax for Matrix Correlation to Execute Factor Analysis

    Posted Tue March 23, 2021 12:33 PM
    Thank you both for the suggestions!
    I did more reading, made a few more adjustments but still can't get the syntax to run. SPSS keeps giving me the message that the first word in the line is not a SPSS command for everything after FACTOR. The only word that is blue after Factor is "PRINT" so I tried to just delete all the lines after that and see if it would run, and still, the message I got was "PRINT" is not a SPSS command Would you be able to help? Thanks!
    This is what the syntax is now:

    * Encoding: UTF-8.
    MATRIX DATA VARIABLES = SS1 TO SS10 CC1 TO CC10 PPB1 TO PPB10 FA1 TO FA10 AD1 TO AD10 MS1 TO MS10 ALD1 TO ALD10 CLD1 TO CLD10.
    /N= 236.
    /CONTENTS= CORR .
    EXECUTE.
    FACTOR.
    /MATRIX = IN(CORR= CORR_MATRIX.txt).
    /END MATRIX.
    /PRINT INITIAL EXTRACTION ROTATION.
    /FORMAT SORT.
    /CRITERIA MINEIGEN(1) ITERATE(250)
    /EXTRACTION= PC
    /CRITERIA ITERATE(250) DELTA(0)
    /ROTATION OBLIMIN
    /METHOD=CORRELATION .

    ------------------------------
    Allie Dluzniewski
    ------------------------------



  • 5.  RE: Syntax for Matrix Correlation to Execute Factor Analysis

    IBM Champion
    Posted Tue March 23, 2021 12:35 PM
    You have a period after FACTOR, which terminates the command.
    --





  • 6.  RE: Syntax for Matrix Correlation to Execute Factor Analysis

    Posted Tue March 23, 2021 12:44 PM
    Edited by System Fri January 20, 2023 04:23 PM
    You have periods where you don't want them:

    * Encoding: UTF-8.
    MATRIX DATA VARIABLES = SS1 TO SS10 CC1 TO CC10 PPB1 TO PPB10 FA1 TO FA10 AD1 TO AD10 MS1 TO MS10 ALD1 TO ALD10 CLD1 TO CLD10. <= no period.
    /N= 236. <= no period.
    /CONTENTS= CORR .
    EXECUTE.

    FACTOR.    <= That's a problem
    /MATRIX = IN(CORR= CORR_MATRIX.txt).  <= no period.
    /END MATRIX. <= remove this line.
    /PRINT INITIAL EXTRACTION ROTATION. <= no period
    /FORMAT SORT. <= no period
    /CRITERIA MINEIGEN(1) ITERATE(250)
    /EXTRACTION= PC
    /CRITERIA ITERATE(250) DELTA(0)
    /ROTATION OBLIMIN
    /METHOD=CORRELATION.

    ------------------------------
    Rick Marcantonio
    Quality Assurance
    IBM
    ------------------------------



  • 7.  RE: Syntax for Matrix Correlation to Execute Factor Analysis

    Posted Mon March 22, 2021 04:55 PM
    Hi.

    Put the actual matrix in a text file and use the /FILE subcmd:

    MATRIX DATA VARIABLES = y1 TO y4 x1 TO x4
     /FILE="/paths/matrix.txt"
     /N=200
     /CONTENTS=CORR.
    

    That works for me.

    ------------------------------
    Rick Marcantonio
    Quality Assurance
    IBM
    ------------------------------