Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Translating SPSS factoranalysis into Stata-Syntax

    Hello Statalist-Users,

    i am trying to translate a SPSS-syntax into Stata. The syntax shows a "Principal component analysis", rotation is not allowed and the factor is predictet by the bartlett-method.

    The SPSS-syntax:

    Code:
    FACTOR
     /VARIABLES ZGINI ZPSocPreE_r ZEFIfisfree ZEFIgovsp
     /MISSING LISTWISE 
     /ANALYSIS ZGINI ZPSocPreE_r ZEFIfisfree ZEFIgovsp
     /PRINT INITIAL EXTRACTION
     /CRITERIA FACTORS(1) ITERATE(25)
     /EXTRACTION PC
     /ROTATION NOROTATE
     /SAVE BART(ALL)
     /METHOD=CORRELATION.

    The corresponding Stata-Syntax: (form my point of view)

    Code:
    pca ZGINI ZPSocPreE_r ZEFIfisfree ZEFIgovsp, factors(1)
    predict facotrscore bartlett, norot


    I am not sure, if this is the right tranformation. Especially i don't know what "ITERATE(25)" stands for and i don't know the corresponding Stata command.

    Thanks in advance,

    Amelie


    Last edited by Amelie Nickel; 26 Jun 2018, 06:44.

  • #2
    Some time back, I also was trying to duplicate an SPSS factor analysis in Stata. My recollection is that what you need here is not Stata's -pca- but rather -factor- with the pcf option. See -help factor- Few people on StataList are currently SPSS users, so this is not the best place to find out what parts of an SPSS command mean. Instead, the way to find out what iterate(25) and other specifications on the SPSS factor command mean is to read the documentation in SPSS, which I found here (https://www.ibm.com/support/knowledg...yn_factor.html), with a bit of online searching.
    It appears from that that the iterate specification in SPSS refers to a detail of the computer algorithm used to find the factor solution, which is a technical topic that is unlikely to concern you here.

    Using -help factor- in Stata will bring you to a description of Stata's factor analysis command, and you can read about the pcf option. Yes, you are correct that in Stata, factor scores are produced by using the -predict- command. What you want it therefore likely something like this:
    Code:
    factor ZGINI ZPSocPreE_r ZEFIfisfree ZEFIgovsp, pcf factors(1)
    predict facotrscore bartlett, norot
    My memory of this is that getting SPSS and Stata to produce the same factor analysis was a bit tricky, so I would strongly suggest that you compare results in Stata and SPSS for some data with known results before relying on the preceding. You likely can find some examples to compare in Stata and SPSS at https://stats.idre.ucla.edu

    Comment


    • #3
      Hello Amelie. The SPSS Command Syntax Reference manual is available here. The page you need is here. Re ITTERATE, it says this:
      ITERATE(n). Maximum number of iterations for solutions in the extraction or rotation phases. The default is 25.
      I believe the reason you are not finding the same option for Stata's -pca- command is that in SPSS, the same command (FACTOR) is used for both PCA and true factor analysis, and ITERATE is only needed for the latter. If you look in the help for Stata's -factor- command, you will find an option similar to ITERATE in SPSS:
      citerate(#) is used only with ipf and sets the number of iterations for reestimating the communalities. If citerate() is not specified, iterations continue until the change in the communalities is small. ipf with citerate(0) produces the same results that pf does.
      HTH.
      --
      Bruce Weaver
      Email: [email protected]
      Version: Stata/MP 18.5 (Windows)

      Comment


      • #4
        Thank you both for your detailed answers!

        I was trying to replicate the findings of a journal article and therefore the author of this article gave me his SPSS-Syntax. So thanks a lot Mr. Lacy! Using the Stata-syntax you suggested i came to the exactly same results.

        Thanks again and best regards,
        Amelie

        Comment

        Working...
        X