Announcement

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

  • Factor analyses, Barlett scores - SPSS vs. Stata

    Hello all,

    I have conducted Principal Component Factor Analysis (PCFA without rotation) and Exploratory Factor Analysis (EFA) using both SPSS and Stata, but I am getting differing results for the Bartlett scores. I plan to share the code and data files from both platforms and would greatly appreciate any feedback or guidance on whether I might be making an error in the process.

    Thank you in advance for your help.

    Stata codes:
    Code:
    pca ind1 ind2 ind3 ind4 ind5
    factor ind1 ind2 ind3 ind4 ind5, ipf factors(1)
    predict bartlett_stata, bartlett
    Stata shows the following outputs on the Results window:


    . pca ind1 ind2 ind3 ind4 ind5

    Principal components/correlation Number of obs = 251,401
    Number of comp. = 5
    Trace = 5
    Rotation: (unrotated = principal) Rho = 1.0000

    --------------------------------------------------------------------------
    Component | Eigenvalue Difference Proportion Cumulative
    -------------+------------------------------------------------------------
    Comp1 | 4.32578 4.03587 0.8652 0.8652
    Comp2 | .289908 .0526725 0.0580 0.9231
    Comp3 | .237236 .141594 0.0474 0.9706
    Comp4 | .0956419 .0442101 0.0191 0.9897
    Comp5 | .0514318 . 0.0103 1.0000
    --------------------------------------------------------------------------

    Principal components (eigenvectors)

    ------------------------------------------------------------------------------
    Variable | Comp1 Comp2 Comp3 Comp4 Comp5 | Unexplained
    -------------+--------------------------------------------------+-------------
    ind1 | 0.4646 -0.1185 -0.2180 -0.5552 0.6437 | 0
    ind2 | 0.4420 -0.0073 -0.7487 0.4618 -0.1757 | 0
    ind3 | 0.4402 -0.4946 0.5249 0.4971 0.1977 | 0
    ind4 | 0.4658 -0.1719 0.1577 -0.4652 -0.7157 | 0
    ind5 | 0.4220 0.8437 0.3027 0.1227 0.0590 | 0
    ------------------------------------------------------------------------------

    . factor ind1 ind2 ind3 ind4 ind5, ipf factors(1)
    (obs=251,401)

    Factor analysis/correlation Number of obs = 251,401
    Method: iterated principal factors Retained factors = 1
    Rotation: (unrotated) Number of params = 5

    --------------------------------------------------------------------------
    Factor | Eigenvalue Difference Proportion Cumulative
    -------------+------------------------------------------------------------
    Factor1 | 4.16953 4.10169 1.0000 1.0000
    Factor2 | 0.06785 0.05953 0.0163 1.0163
    Factor3 | 0.00831 0.04568 0.0020 1.0183
    Factor4 | -0.03736 0.00144 -0.0090 1.0093
    Factor5 | -0.03881 . -0.0093 1.0000
    --------------------------------------------------------------------------
    LR test: independent vs. saturated: chi2(10) = 1.6e+06 Prob>chi2 = 0.0000

    Factor loadings (pattern matrix) and unique variances

    ---------------------------------------
    Variable | Factor1 | Uniqueness
    -------------+----------+--------------
    ind1 | 0.9719 | 0.0554
    ind2 | 0.8925 | 0.2034
    ind3 | 0.8871 | 0.2130
    ind4 | 0.9761 | 0.0472
    ind5 | 0.8298 | 0.3114
    ---------------------------------------

    . predict bartlett_stata, bartlett

    Scoring coefficients (method = Bartlett)

    ------------------------
    Variable | Factor1
    -------------+----------
    ind1 | 0.37276
    ind2 | 0.09327
    ind3 | 0.08850
    ind4 | 0.43947
    ind5 | 0.05663
    ------------------------


    The data on indicators and the generated Barlett scores are below:

    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input float(ind1 ind2 ind3 ind4 ind5 bartlett_stata)
         -.0625 -.036781464 -1.1741071 -1.8214285      -.625  -.6910955
         -.0625 -.036781464 -1.1741071 -1.8214285      -.625  -.6910955
         -.0625 -.036781464 -1.1741071 -1.8214285      -.625  -.6910955
         -.0625 -.036781464 -1.1741071 -1.8214285      -.625  -.6910955
         -.0625 -.036781464 -1.1741071 -1.8214285      -.625  -.6910955
         -.0625 -.036781464 -1.1741071 -1.8214285      -.625  -.6910955
         -.0625 -.036781464 -1.1741071 -1.8214285      -.625  -.6910955
     -.08181819  -.06459768 -1.0636363  -2.040909  -.6636364  -.8296663
     -.08181819  -.06459768 -1.0636363  -2.040909  -.6636364  -.8296663
     -.08181819  -.06459768 -1.0636363  -2.040909  -.6636364  -.8296663
     -.08181819  -.06459768 -1.0636363  -2.040909  -.6636364  -.8296663
     -.08181819  -.06459768 -1.0636363  -2.040909  -.6636364  -.8296663
     -.08181819  -.06459768 -1.0636363  -2.040909  -.6636364  -.8296663
     -.08181819  -.06459768 -1.0636363  -2.040909  -.6636364  -.8296663
     -.08482143  -.05161264  -1.232143    -2.1875  -.6339286  -.8594399
     -.08482143  -.05161264  -1.232143    -2.1875  -.6339286  -.8594399
     -.08482143  -.05161264  -1.232143    -2.1875  -.6339286  -.8594399
     -.08482143  -.05161264  -1.232143    -2.1875  -.6339286  -.8594399
     -.08482143  -.05161264  -1.232143    -2.1875  -.6339286  -.8594399
     -.08482143  -.05161264  -1.232143    -2.1875  -.6339286  -.8594399
     -.07563026  -.04610478 -1.0798318 -1.8781513   -.487395  -.7490912
     -.07563026  -.04610478 -1.0798318 -1.8781513   -.487395  -.7490912
     -.07563026  -.04610478 -1.0798318 -1.8781513   -.487395  -.7490912
     -.07563026  -.04610478 -1.0798318 -1.8781513   -.487395  -.7490912
     -.07563026  -.04610478 -1.0798318 -1.8781513   -.487395  -.7490912
    -.072072074  -.04458895  -1.054054 -1.5585586 -.45045045  -.6758538
    -.072072074  -.04458895  -1.054054 -1.5585586 -.45045045  -.6758538
    -.072072074  -.04458895  -1.054054 -1.5585586 -.45045045  -.6758538
    -.072072074  -.04458895  -1.054054 -1.5585586 -.45045045  -.6758538
    -.072072074  -.04458895  -1.054054 -1.5585586 -.45045045  -.6758538
     -.04639175 -.023575464  -.6701031  -.9536083 -.25773194  -.4185079
     -.04639175 -.023575464  -.6701031  -.9536083 -.25773194  -.4185079
     -.04639175 -.023575464  -.6701031  -.9536083 -.25773194  -.4185079
     -.04639175 -.023575464  -.6701031  -.9536083 -.25773194  -.4185079
     -.04639175 -.023575464  -.6701031  -.9536083 -.25773194  -.4185079
     -.05529954 -.033672657  -.8156682 -1.1658986 -.23963134  -.5079807
     -.05529954 -.033672657  -.8156682 -1.1658986 -.23963134  -.5079807
     -.05529954 -.033672657  -.8156682 -1.1658986 -.23963134  -.5079807
     -.05529954 -.033672657  -.8156682 -1.1658986 -.23963134  -.5079807
     -.05529954 -.033672657  -.8156682 -1.1658986 -.23963134  -.5079807
     -.05882353 -.032646295  -.8823529  -1.276018  -.3076923 -.54626346
     -.05882353 -.032646295  -.8823529  -1.276018  -.3076923 -.54626346
     -.05882353 -.032646295  -.8823529  -1.276018  -.3076923 -.54626346
     -.05882353 -.032646295  -.8823529  -1.276018  -.3076923 -.54626346
     -.05882353 -.032646295  -.8823529  -1.276018  -.3076923 -.54626346
     -.06603774  -.04337633 -1.1084905 -1.5990566   -.495283  -.6638943
     -.06603774  -.04337633 -1.1084905 -1.5990566   -.495283  -.6638943
     -.06603774  -.04337633 -1.1084905 -1.5990566   -.495283  -.6638943
     -.06603774  -.04337633 -1.1084905 -1.5990566   -.495283  -.6638943
     -.06603774  -.04337633 -1.1084905 -1.5990566   -.495283  -.6638943
     -.04524887 -.029801706  -.8099548 -1.0542986  -.4343891  -.4555836
     -.04524887 -.029801706  -.8099548 -1.0542986  -.4343891  -.4555836
     -.04524887 -.029801706  -.8099548 -1.0542986  -.4343891  -.4555836
     -.04524887 -.029801706  -.8099548 -1.0542986  -.4343891  -.4555836
     -.04524887 -.029801706  -.8099548 -1.0542986  -.4343891  -.4555836
     -.03902439 -.032034155  -.6780487  -.8878049  -.3707317  -.3952117
     -.03902439 -.032034155  -.6780487  -.8878049  -.3707317  -.3952117
     -.03902439 -.032034155  -.6780487  -.8878049  -.3707317  -.3952117
     -.03902439 -.032034155  -.6780487  -.8878049  -.3707317  -.3952117
     -.03902439 -.032034155  -.6780487  -.8878049  -.3707317  -.3952117
     -.05777778   -.0412924  -.8355556  -1.231111 -.50222224  -.5515569
     -.05777778   -.0412924  -.8355556  -1.231111 -.50222224  -.5515569
     -.05777778   -.0412924  -.8355556  -1.231111 -.50222224  -.5515569
     -.05777778   -.0412924  -.8355556  -1.231111 -.50222224  -.5515569
     -.05777778   -.0412924  -.8355556  -1.231111 -.50222224  -.5515569
           -.05 -.031434774  -.7454545 -1.1227273 -.50454545  -.4868877
           -.05 -.031434774  -.7454545 -1.1227273 -.50454545  -.4868877
           -.05 -.031434774  -.7454545 -1.1227273 -.50454545  -.4868877
           -.05 -.031434774  -.7454545 -1.1227273 -.50454545  -.4868877
           -.05 -.031434774  -.7454545 -1.1227273 -.50454545  -.4868877
           -.05 -.031434774  -.7454545 -1.1227273 -.50454545  -.4868877
     -.04524887  -.02705348  -.6153846 -1.1266968  -.5022625     -.4567
     -.04524887  -.02705348  -.6153846 -1.1266968  -.5022625     -.4567
     -.04524887  -.02705348  -.6153846 -1.1266968  -.5022625     -.4567
     -.04524887  -.02705348  -.6153846 -1.1266968  -.5022625     -.4567
     -.04524887  -.02705348  -.6153846 -1.1266968  -.5022625     -.4567
     -.04524887  -.02705348  -.6153846 -1.1266968  -.5022625     -.4567
     -.04186046  -.02881936  -.4930233 -1.0837209 -.52093023 -.43229425
     -.04186046  -.02881936  -.4930233 -1.0837209 -.52093023 -.43229425
     -.04186046  -.02881936  -.4930233 -1.0837209 -.52093023 -.43229425
     -.04186046  -.02881936  -.4930233 -1.0837209 -.52093023 -.43229425
     -.04186046  -.02881936  -.4930233 -1.0837209 -.52093023 -.43229425
    -.027522936 -.016006246 -.32110095  -.6743119 -.28899083 -.27144468
    -.027522936 -.016006246 -.32110095  -.6743119 -.28899083 -.27144468
    -.027522936 -.016006246 -.32110095  -.6743119 -.28899083 -.27144468
    -.027522936 -.016006246 -.32110095  -.6743119 -.28899083 -.27144468
    -.027522936 -.016006246 -.32110095  -.6743119 -.28899083 -.27144468
    -.027522936 -.016006246 -.32110095  -.6743119 -.28899083 -.27144468
    -.035353538 -.023640804  -.4040405  -.7575758 -.27272728  -.3283239
    -.035353538 -.023640804  -.4040405  -.7575758 -.27272728  -.3283239
    -.035353538 -.023640804  -.4040405  -.7575758 -.27272728  -.3283239
    -.035353538 -.023640804  -.4040405  -.7575758 -.27272728  -.3283239
    -.035353538 -.023640804  -.4040405  -.7575758 -.27272728  -.3283239
    -.035353538 -.023640804  -.4040405  -.7575758 -.27272728  -.3283239
     -.04591837  -.03204689  -.6530613 -1.2142857  -.6989796  -.4919703
     -.04591837  -.03204689  -.6530613 -1.2142857  -.6989796  -.4919703
     -.04591837  -.03204689  -.6530613 -1.2142857  -.6989796  -.4919703
     -.04591837  -.03204689  -.6530613 -1.2142857  -.6989796  -.4919703
     -.04591837  -.03204689  -.6530613 -1.2142857  -.6989796  -.4919703
     -.04591837  -.03204689  -.6530613 -1.2142857  -.6989796  -.4919703
    end
    Below is the "same" excercise performed on SPSS. I am sharing the syntax, the results and the generated Barlett scores:

    SPSS Syntax

    Code:
    DATASET ACTIVATE DataSet1.
    FACTOR
      /VARIABLES ind1 ind2 ind3 ind4 ind5
      /MISSING LISTWISE
      /ANALYSIS ind1 ind2 ind3 ind4 ind5
      /PRINT INITIAL CORRELATION SIG DET KMO EXTRACTION
      /CRITERIA MINEIGEN(1) ITERATE(25)
      /EXTRACTION PC
      /ROTATION NOROTATE
      /SAVE BART(ALL)
      /METHOD=CORRELATION.
    Here is the output on the Results window:


    Factor Analysis
    Notes
    Output Created 18-JUN-2025 12:36:55
    Comments
    Input Active Dataset DataSet1
    Filter <none>
    Weight <none>
    Split File <none>
    N of Rows in Working Data File 251401
    Missing Value Handling Definition of Missing MISSING=EXCLUDE: User-defined missing values are treated as missing.
    Cases Used LISTWISE: Statistics are based on cases with no missing values for any variable used.
    Syntax FACTOR
    /VARIABLES ind1 ind2 ind3 ind4 ind5
    /MISSING LISTWISE
    /ANALYSIS ind1 ind2 ind3 ind4 ind5
    /PRINT INITIAL CORRELATION SIG DET KMO EXTRACTION
    /CRITERIA MINEIGEN(1) ITERATE(25)
    /EXTRACTION PC
    /ROTATION NOROTATE
    /SAVE BART(ALL)
    /METHOD=CORRELATION.
    Resources Processor Time 00:00:00.22
    Elapsed Time 00:00:00.19
    Maximum Memory Required 4576 (4.469K) bytes
    Variables Created FAC1_1 Component score 1
    Correlation Matrixa
    ind1 ind2 ind3 ind4 ind5
    Correlation ind1 1.000 .897 .855 .935 .799
    ind2 .897 1.000 .770 .849 .756
    ind3 .855 .770 1.000 .902 .727
    ind4 .935 .849 .902 1.000 .812
    ind5 .799 .756 .727 .812 1.000
    Sig. (1-tailed) ind1 .000 .000 .000 .000
    ind2 .000 .000 .000 .000
    ind3 .000 .000 .000 .000
    ind4 .000 .000 .000 .000
    ind5 .000 .000 .000 .000
    a. Determinant = .001
    KMO and Bartlett's Test
    Kaiser-Meyer-Olkin Measure of Sampling Adequacy. .878
    Bartlett's Test of Sphericity Approx. Chi-Square 1640856.417
    df 10
    Sig. .000
    Communalities
    Initial Extraction
    ind1 1.000 .934
    ind2 1.000 .845
    ind3 1.000 .838
    ind4 1.000 .938
    ind5 1.000 .770
    Extraction Method: Principal Component Analysis.
    Total Variance Explained
    Component Initial Eigenvalues Extraction Sums of Squared Loadings
    Total % of Variance Cumulative % Total % of Variance Cumulative %
    1 4.326 86.516 86.516 4.326 86.516 86.516
    2 .290 5.798 92.314
    3 .237 4.745 97.059
    4 .096 1.913 98.971
    5 .051 1.029 100.000
    Extraction Method: Principal Component Analysis.
    Component Matrixa
    Component
    1
    ind1 .966
    ind2 .919
    ind3 .915
    ind4 .969
    ind5 .878
    Extraction Method: Principal Component Analysis.a
    a. 1 components extracted.



    And here is the generated Barlett scores by SPSS, you can compare it with the Stata generated scores right next to it.



    Code:
    ind1    ind2    ind3    ind4    ind5    bartlett_stata    bartlett_SPSS
    -.062500000000000    -.036781500000000    -1.1741070    -1.8214290    -.625000000000000    -.691095500000000    -.67392
    -.062500000000000    -.036781500000000    -1.1741070    -1.8214290    -.625000000000000    -.691095500000000    -.67392
    -.062500000000000    -.036781500000000    -1.1741070    -1.8214290    -.625000000000000    -.691095500000000    -.67392
    -.062500000000000    -.036781500000000    -1.1741070    -1.8214290    -.625000000000000    -.691095500000000    -.67392
    -.062500000000000    -.036781500000000    -1.1741070    -1.8214290    -.625000000000000    -.691095500000000    -.67392
    -.062500000000000    -.036781500000000    -1.1741070    -1.8214290    -.625000000000000    -.691095500000000    -.67392
    -.062500000000000    -.036781500000000    -1.1741070    -1.8214290    -.625000000000000    -.691095500000000    -.67392
    -.081818200000000    -.064597700000000    -1.0636360    -2.0409090    -.663636400000000    -.829666300000000    -.80200
    -.081818200000000    -.064597700000000    -1.0636360    -2.0409090    -.663636400000000    -.829666300000000    -.80200
    -.081818200000000    -.064597700000000    -1.0636360    -2.0409090    -.663636400000000    -.829666300000000    -.80200
    -.081818200000000    -.064597700000000    -1.0636360    -2.0409090    -.663636400000000    -.829666300000000    -.80200
    -.081818200000000    -.064597700000000    -1.0636360    -2.0409090    -.663636400000000    -.829666300000000    -.80200
    -.081818200000000    -.064597700000000    -1.0636360    -2.0409090    -.663636400000000    -.829666300000000    -.80200
    -.081818200000000    -.064597700000000    -1.0636360    -2.0409090    -.663636400000000    -.829666300000000    -.80200
    -.084821400000000    -.051612600000000    -1.2321430    -2.1875000    -.633928600000000    -.859439900000000    -.80558
    -.084821400000000    -.051612600000000    -1.2321430    -2.1875000    -.633928600000000    -.859439900000000    -.80558
    -.084821400000000    -.051612600000000    -1.2321430    -2.1875000    -.633928600000000    -.859439900000000    -.80558
    -.084821400000000    -.051612600000000    -1.2321430    -2.1875000    -.633928600000000    -.859439900000000    -.80558
    -.084821400000000    -.051612600000000    -1.2321430    -2.1875000    -.633928600000000    -.859439900000000    -.80558
    -.084821400000000    -.051612600000000    -1.2321430    -2.1875000    -.633928600000000    -.859439900000000    -.80558
    -.075630300000000    -.046104800000000    -1.0798320    -1.8781510    -.487395000000000    -.749091200000000    -.69577
    -.075630300000000    -.046104800000000    -1.0798320    -1.8781510    -.487395000000000    -.749091200000000    -.69577
    -.075630300000000    -.046104800000000    -1.0798320    -1.8781510    -.487395000000000    -.749091200000000    -.69577
    -.075630300000000    -.046104800000000    -1.0798320    -1.8781510    -.487395000000000    -.749091200000000    -.69577
    -.075630300000000    -.046104800000000    -1.0798320    -1.8781510    -.487395000000000    -.749091200000000    -.69577
    -.072072100000000    -.044588900000000    -1.0540540    -1.5585590    -.450450500000000    -.675853800000000    -.64565
    -.072072100000000    -.044588900000000    -1.0540540    -1.5585590    -.450450500000000    -.675853800000000    -.64565
    -.072072100000000    -.044588900000000    -1.0540540    -1.5585590    -.450450500000000    -.675853800000000    -.64565
    -.072072100000000    -.044588900000000    -1.0540540    -1.5585590    -.450450500000000    -.675853800000000    -.64565
    -.072072100000000    -.044588900000000    -1.0540540    -1.5585590    -.450450500000000    -.675853800000000    -.64565
    -.046391800000000    -.023575500000000    -.6701031    -.9536083    -.257731900000000    -.418507900000000    -.39080
    -.046391800000000    -.023575500000000    -.6701031    -.9536083    -.257731900000000    -.418507900000000    -.39080
    -.046391800000000    -.023575500000000    -.6701031    -.9536083    -.257731900000000    -.418507900000000    -.39080
    -.046391800000000    -.023575500000000    -.6701031    -.9536083    -.257731900000000    -.418507900000000    -.39080
    -.046391800000000    -.023575500000000    -.6701031    -.9536083    -.257731900000000    -.418507900000000    -.39080
    -.055299500000000    -.033672700000000    -.8156682    -1.1658990    -.239631300000000    -.507980700000000    -.47353
    -.055299500000000    -.033672700000000    -.8156682    -1.1658990    -.239631300000000    -.507980700000000    -.47353
    -.055299500000000    -.033672700000000    -.8156682    -1.1658990    -.239631300000000    -.507980700000000    -.47353
    -.055299500000000    -.033672700000000    -.8156682    -1.1658990    -.239631300000000    -.507980700000000    -.47353
    -.055299500000000    -.033672700000000    -.8156682    -1.1658990    -.239631300000000    -.507980700000000    -.47353
    -.058823500000000    -.032646300000000    -.8823529    -1.2760180    -.307692300000000    -.546263500000000    -.50984
    -.058823500000000    -.032646300000000    -.8823529    -1.2760180    -.307692300000000    -.546263500000000    -.50984
    -.058823500000000    -.032646300000000    -.8823529    -1.2760180    -.307692300000000    -.546263500000000    -.50984
    -.058823500000000    -.032646300000000    -.8823529    -1.2760180    -.307692300000000    -.546263500000000    -.50984
    -.058823500000000    -.032646300000000    -.8823529    -1.2760180    -.307692300000000    -.546263500000000    -.50984
    -.066037700000000    -.043376300000000    -1.1084900    -1.5990570    -.495283000000000    -.663894300000000    -.64784
    -.066037700000000    -.043376300000000    -1.1084900    -1.5990570    -.495283000000000    -.663894300000000    -.64784
    -.066037700000000    -.043376300000000    -1.1084900    -1.5990570    -.495283000000000    -.663894300000000    -.64784
    -.066037700000000    -.043376300000000    -1.1084900    -1.5990570    -.495283000000000    -.663894300000000    -.64784
    -.066037700000000    -.043376300000000    -1.1084900    -1.5990570    -.495283000000000    -.663894300000000    -.64784
    -.045248900000000    -.029801700000000    -.8099548    -1.0542990    -.434389100000000    -.455583600000000    -.46444
    -.045248900000000    -.029801700000000    -.8099548    -1.0542990    -.434389100000000    -.455583600000000    -.46444
    -.045248900000000    -.029801700000000    -.8099548    -1.0542990    -.434389100000000    -.455583600000000    -.46444
    -.045248900000000    -.029801700000000    -.8099548    -1.0542990    -.434389100000000    -.455583600000000    -.46444
    -.045248900000000    -.029801700000000    -.8099548    -1.0542990    -.434389100000000    -.455583600000000    -.46444
    -.039024400000000    -.032034200000000    -.6780487    -.8878049    -.370731700000000    -.395211700000000    -.41189
    -.039024400000000    -.032034200000000    -.6780487    -.8878049    -.370731700000000    -.395211700000000    -.41189
    -.039024400000000    -.032034200000000    -.6780487    -.8878049    -.370731700000000    -.395211700000000    -.41189
    -.039024400000000    -.032034200000000    -.6780487    -.8878049    -.370731700000000    -.395211700000000    -.41189
    -.039024400000000    -.032034200000000    -.6780487    -.8878049    -.370731700000000    -.395211700000000    -.41189
    -.057777800000000    -.041292400000000    -.8355556    -1.2311110    -.502222200000000    -.551556900000000    -.55440
    -.057777800000000    -.041292400000000    -.8355556    -1.2311110    -.502222200000000    -.551556900000000    -.55440
    -.057777800000000    -.041292400000000    -.8355556    -1.2311110    -.502222200000000    -.551556900000000    -.55440
    -.057777800000000    -.041292400000000    -.8355556    -1.2311110    -.502222200000000    -.551556900000000    -.55440
    -.057777800000000    -.041292400000000    -.8355556    -1.2311110    -.502222200000000    -.551556900000000    -.55440
    -.050000000000000    -.031434800000000    -.7454545    -1.1227270    -.504545500000000    -.486887700000000    -.48892
    -.050000000000000    -.031434800000000    -.7454545    -1.1227270    -.504545500000000    -.486887700000000    -.48892
    -.050000000000000    -.031434800000000    -.7454545    -1.1227270    -.504545500000000    -.486887700000000    -.48892
    -.050000000000000    -.031434800000000    -.7454545    -1.1227270    -.504545500000000    -.486887700000000    -.48892
    -.050000000000000    -.031434800000000    -.7454545    -1.1227270    -.504545500000000    -.486887700000000    -.48892
    -.050000000000000    -.031434800000000    -.7454545    -1.1227270    -.504545500000000    -.486887700000000    -.48892
    -.045248900000000    -.027053500000000    -.6153846    -1.1266970    -.502262500000000    -.456700000000000    -.44818
    -.045248900000000    -.027053500000000    -.6153846    -1.1266970    -.502262500000000    -.456700000000000    -.44818
    -.045248900000000    -.027053500000000    -.6153846    -1.1266970    -.502262500000000    -.456700000000000    -.44818
    -.045248900000000    -.027053500000000    -.6153846    -1.1266970    -.502262500000000    -.456700000000000    -.44818
    -.045248900000000    -.027053500000000    -.6153846    -1.1266970    -.502262500000000    -.456700000000000    -.44818
    -.045248900000000    -.027053500000000    -.6153846    -1.1266970    -.502262500000000    -.456700000000000    -.44818
    -.041860500000000    -.028819400000000    -.4930233    -1.0837210    -.520930200000000    -.432294200000000    -.42755
    -.041860500000000    -.028819400000000    -.4930233    -1.0837210    -.520930200000000    -.432294200000000    -.42755
    -.041860500000000    -.028819400000000    -.4930233    -1.0837210    -.520930200000000    -.432294200000000    -.42755
    -.041860500000000    -.028819400000000    -.4930233    -1.0837210    -.520930200000000    -.432294200000000    -.42755
    -.041860500000000    -.028819400000000    -.4930233    -1.0837210    -.520930200000000    -.432294200000000    -.42755
    -.027522900000000    -.016006200000000    -.3211010    -.6743119    -.288990800000000    -.271444700000000    -.26006
    -.027522900000000    -.016006200000000    -.3211010    -.6743119    -.288990800000000    -.271444700000000    -.26006
    -.027522900000000    -.016006200000000    -.3211010    -.6743119    -.288990800000000    -.271444700000000    -.26006
    -.027522900000000    -.016006200000000    -.3211010    -.6743119    -.288990800000000    -.271444700000000    -.26006
    -.027522900000000    -.016006200000000    -.3211010    -.6743119    -.288990800000000    -.271444700000000    -.26006
    -.027522900000000    -.016006200000000    -.3211010    -.6743119    -.288990800000000    -.271444700000000    -.26006
    -.035353500000000    -.023640800000000    -.4040405    -.7575758    -.272727300000000    -.328323900000000    -.31411
    -.035353500000000    -.023640800000000    -.4040405    -.7575758    -.272727300000000    -.328323900000000    -.31411
    -.035353500000000    -.023640800000000    -.4040405    -.7575758    -.272727300000000    -.328323900000000    -.31411
    -.035353500000000    -.023640800000000    -.4040405    -.7575758    -.272727300000000    -.328323900000000    -.31411
    -.035353500000000    -.023640800000000    -.4040405    -.7575758    -.272727300000000    -.328323900000000    -.31411
    -.035353500000000    -.023640800000000    -.4040405    -.7575758    -.272727300000000    -.328323900000000    -.31411
    -.045918400000000    -.032046900000000    -.6530613    -1.2142860    -.698979600000000    -.491970300000000    -.51075
    -.045918400000000    -.032046900000000    -.6530613    -1.2142860    -.698979600000000    -.491970300000000    -.51075
    -.045918400000000    -.032046900000000    -.6530613    -1.2142860    -.698979600000000    -.491970300000000    -.51075
    -.045918400000000    -.032046900000000    -.6530613    -1.2142860    -.698979600000000    -.491970300000000    -.51075
    -.045918400000000    -.032046900000000    -.6530613    -1.2142860    -.698979600000000    -.491970300000000    -.51075
    -.045918400000000    -.032046900000000    -.6530613    -1.2142860    -.698979600000000    -.491970300000000    -.51075

    I tried to be as clear as possible, please let me know if you need more information that would help to clarify the discrepency.

    Thank you in advance,
    Nick
    Last edited by Nick Baradar; 18 Jun 2025, 04:50.

  • #2
    Originally posted by Nick Baradar View Post
    I have conducted . . . Exploratory Factor Analysis (EFA) using both SPSS and Stata, but I am getting differing results . . .

    Stata codes:
    Code:
    . . . 
    factor ind1 ind2 ind3 ind4 ind5, ipf factors(1)
    . . .

    SPSS Syntax

    Code:
    . . . 
    FACTOR
    /VARIABLES ind1 ind2 ind3 ind4 ind5
    . . .
    /EXTRACTION PC
    . . .
    They're close, given that you used different methods of extracting factors. Maybe try
    Code:
    factor ind?, factors(1) pcf
    and see whether the factor loadings and Bartlett factor score predictions are closer to what you get with SPSS.

    I plan to share the code and data files from both platforms . .
    -dataex- doesn't really "share the data", which have 251401 observations each. For that, you'd have to attach the datasets to your post.

    Comment


    • #3
      Perhaps Stata and SPSS use different algorithm when running factor analysis. I found that you can get nearly same results using ml option. And hope the following link be helpful in further discussion:https://stats.stackexchange.com/ques...-stata-after-r
      https://www.statalist.org/forums/for...ferent-results
      https://www.stata.com/statalist/arch.../msg00891.html
      Code:
      factor ind1 ind2 ind3 ind4 ind5, ml factors(1)
      predict bartlett_ml_stata, bartlett
      Code:
      FACTOR
        /VARIABLES ind1 ind2 ind3 ind4 ind5
        /MISSING LISTWISE
        /ANALYSIS ind1 ind2 ind3 ind4 ind5
        /PRINT INITIAL EXTRACTION
        /CRITERIA FACTORS(1) ITERATE(25)
        /EXTRACTION ML
        /ROTATION NOROTATE
        /SAVE BART(ALL).
      Code:
      * Example generated by -dataex-. To install: ssc install dataex
      clear
      input float(ind1 ind2 ind3 ind4 ind5 bartlett_ml_stata bartlett_ml_spss)
           -.0625 -.036781464 -1.1741071 -1.8214285      -.625  -.6793013   -.6793
           -.0625 -.036781464 -1.1741071 -1.8214285      -.625  -.6793013   -.6793
           -.0625 -.036781464 -1.1741071 -1.8214285      -.625  -.6793013   -.6793
           -.0625 -.036781464 -1.1741071 -1.8214285      -.625  -.6793013   -.6793
           -.0625 -.036781464 -1.1741071 -1.8214285      -.625  -.6793013   -.6793
           -.0625 -.036781464 -1.1741071 -1.8214285      -.625  -.6793013   -.6793
           -.0625 -.036781464 -1.1741071 -1.8214285      -.625  -.6793013   -.6793
        -.0818182  -.06459768 -1.0636363  -2.040909  -.6636364 -1.6808355 -1.68085
        -.0818182  -.06459768 -1.0636363  -2.040909  -.6636364 -1.6808355 -1.68085
        -.0818182  -.06459768 -1.0636363  -2.040909  -.6636364 -1.6808355 -1.68085
        -.0818182  -.06459768 -1.0636363  -2.040909  -.6636364 -1.6808355 -1.68085
        -.0818182  -.06459768 -1.0636363  -2.040909  -.6636364 -1.6808355 -1.68085
        -.0818182  -.06459768 -1.0636363  -2.040909  -.6636364 -1.6808355 -1.68085
        -.0818182  -.06459768 -1.0636363  -2.040909  -.6636364 -1.6808355 -1.68085
       -.08482143  -.05161264  -1.232143    -2.1875  -.6339286  -1.825172  -1.8251
       -.08482143  -.05161264  -1.232143    -2.1875  -.6339286  -1.825172  -1.8251
       -.08482143  -.05161264  -1.232143    -2.1875  -.6339286  -1.825172  -1.8251
       -.08482143  -.05161264  -1.232143    -2.1875  -.6339286  -1.825172  -1.8251
       -.08482143  -.05161264  -1.232143    -2.1875  -.6339286  -1.825172  -1.8251
       -.08482143  -.05161264  -1.232143    -2.1875  -.6339286  -1.825172  -1.8251
       -.07563026  -.04610478 -1.0798318 -1.8781513   -.487395  -1.211704 -1.21165
       -.07563026  -.04610478 -1.0798318 -1.8781513   -.487395  -1.211704 -1.21165
       -.07563026  -.04610478 -1.0798318 -1.8781513   -.487395  -1.211704 -1.21165
       -.07563026  -.04610478 -1.0798318 -1.8781513   -.487395  -1.211704 -1.21165
       -.07563026  -.04610478 -1.0798318 -1.8781513   -.487395  -1.211704 -1.21165
      -.072072074  -.04458895  -1.054054 -1.5585586 -.45045045  -.8832554  -.88323
      -.072072074  -.04458895  -1.054054 -1.5585586 -.45045045  -.8832554  -.88323
      -.072072074  -.04458895  -1.054054 -1.5585586 -.45045045  -.8832554  -.88323
      -.072072074  -.04458895  -1.054054 -1.5585586 -.45045045  -.8832554  -.88323
      -.072072074  -.04458895  -1.054054 -1.5585586 -.45045045  -.8832554  -.88323
       -.04639175 -.023575464  -.6701031  -.9536083 -.25773194    .698051   .69808
       -.04639175 -.023575464  -.6701031  -.9536083 -.25773194    .698051   .69808
       -.04639175 -.023575464  -.6701031  -.9536083 -.25773194    .698051   .69808
       -.04639175 -.023575464  -.6701031  -.9536083 -.25773194    .698051   .69808
       -.04639175 -.023575464  -.6701031  -.9536083 -.25773194    .698051   .69808
       -.05529954 -.033672657  -.8156682 -1.1658986 -.23963134  .12936646   .12938
       -.05529954 -.033672657  -.8156682 -1.1658986 -.23963134  .12936646   .12938
       -.05529954 -.033672657  -.8156682 -1.1658986 -.23963134  .12936646   .12938
       -.05529954 -.033672657  -.8156682 -1.1658986 -.23963134  .12936646   .12938
       -.05529954 -.033672657  -.8156682 -1.1658986 -.23963134  .12936646   .12938
       -.05882353 -.032646295  -.8823529  -1.276018  -.3076923 -.08048948  -.08045
       -.05882353 -.032646295  -.8823529  -1.276018  -.3076923 -.08048948  -.08045
       -.05882353 -.032646295  -.8823529  -1.276018  -.3076923 -.08048948  -.08045
       -.05882353 -.032646295  -.8823529  -1.276018  -.3076923 -.08048948  -.08045
       -.05882353 -.032646295  -.8823529  -1.276018  -.3076923 -.08048948  -.08045
       -.06603774  -.04337633 -1.1084905 -1.5990566   -.495283  -.7016497  -.70166
       -.06603774  -.04337633 -1.1084905 -1.5990566   -.495283  -.7016497  -.70166
       -.06603774  -.04337633 -1.1084905 -1.5990566   -.495283  -.7016497  -.70166
       -.06603774  -.04337633 -1.1084905 -1.5990566   -.495283  -.7016497  -.70166
       -.06603774  -.04337633 -1.1084905 -1.5990566   -.495283  -.7016497  -.70166
       -.04524887 -.029801706  -.8099548 -1.0542986  -.4343891   .5683508   .56831
       -.04524887 -.029801706  -.8099548 -1.0542986  -.4343891   .5683508   .56831
       -.04524887 -.029801706  -.8099548 -1.0542986  -.4343891   .5683508   .56831
       -.04524887 -.029801706  -.8099548 -1.0542986  -.4343891   .5683508   .56831
       -.04524887 -.029801706  -.8099548 -1.0542986  -.4343891   .5683508   .56831
       -.03902439 -.032034155  -.6780487  -.8878049  -.3707317   .9202397   .92015
       -.03902439 -.032034155  -.6780487  -.8878049  -.3707317   .9202397   .92015
       -.03902439 -.032034155  -.6780487  -.8878049  -.3707317   .9202397   .92015
       -.03902439 -.032034155  -.6780487  -.8878049  -.3707317   .9202397   .92015
       -.03902439 -.032034155  -.6780487  -.8878049  -.3707317   .9202397   .92015
       -.05777778   -.0412924  -.8355556  -1.231111 -.50222224 -.08735464  -.08739
       -.05777778   -.0412924  -.8355556  -1.231111 -.50222224 -.08735464  -.08739
       -.05777778   -.0412924  -.8355556  -1.231111 -.50222224 -.08735464  -.08739
       -.05777778   -.0412924  -.8355556  -1.231111 -.50222224 -.08735464  -.08739
       -.05777778   -.0412924  -.8355556  -1.231111 -.50222224 -.08735464  -.08739
             -.05 -.031434774  -.7454545 -1.1227273 -.50454545   .3631036   .36309
             -.05 -.031434774  -.7454545 -1.1227273 -.50454545   .3631036   .36309
             -.05 -.031434774  -.7454545 -1.1227273 -.50454545   .3631036   .36309
             -.05 -.031434774  -.7454545 -1.1227273 -.50454545   .3631036   .36309
             -.05 -.031434774  -.7454545 -1.1227273 -.50454545   .3631036   .36309
             -.05 -.031434774  -.7454545 -1.1227273 -.50454545   .3631036   .36309
       -.04524887  -.02705348  -.6153846 -1.1266968  -.5022625   .6142027   .61421
       -.04524887  -.02705348  -.6153846 -1.1266968  -.5022625   .6142027   .61421
       -.04524887  -.02705348  -.6153846 -1.1266968  -.5022625   .6142027   .61421
       -.04524887  -.02705348  -.6153846 -1.1266968  -.5022625   .6142027   .61421
       -.04524887  -.02705348  -.6153846 -1.1266968  -.5022625   .6142027   .61421
       -.04524887  -.02705348  -.6153846 -1.1266968  -.5022625   .6142027   .61421
       -.04186046  -.02881936  -.4930233 -1.0837209 -.52093023   .7885916   .78859
       -.04186046  -.02881936  -.4930233 -1.0837209 -.52093023   .7885916   .78859
       -.04186046  -.02881936  -.4930233 -1.0837209 -.52093023   .7885916   .78859
       -.04186046  -.02881936  -.4930233 -1.0837209 -.52093023   .7885916   .78859
       -.04186046  -.02881936  -.4930233 -1.0837209 -.52093023   .7885916   .78859
      -.027522936 -.016006246 -.32110095  -.6743119 -.28899083   1.715414  1.71541
      -.027522936 -.016006246 -.32110095  -.6743119 -.28899083   1.715414  1.71541
      -.027522936 -.016006246 -.32110095  -.6743119 -.28899083   1.715414  1.71541
      -.027522936 -.016006246 -.32110095  -.6743119 -.28899083   1.715414  1.71541
      -.027522936 -.016006246 -.32110095  -.6743119 -.28899083   1.715414  1.71541
      -.027522936 -.016006246 -.32110095  -.6743119 -.28899083   1.715414  1.71541
      -.035353538 -.023640804  -.4040405  -.7575758 -.27272728  1.2982354  1.29823
      -.035353538 -.023640804  -.4040405  -.7575758 -.27272728  1.2982354  1.29823
      -.035353538 -.023640804  -.4040405  -.7575758 -.27272728  1.2982354  1.29823
      -.035353538 -.023640804  -.4040405  -.7575758 -.27272728  1.2982354  1.29823
      -.035353538 -.023640804  -.4040405  -.7575758 -.27272728  1.2982354  1.29823
      -.035353538 -.023640804  -.4040405  -.7575758 -.27272728  1.2982354  1.29823
       -.04591837  -.03204689  -.6530613 -1.2142857  -.6989796   .4709206   .47089
       -.04591837  -.03204689  -.6530613 -1.2142857  -.6989796   .4709206   .47089
       -.04591837  -.03204689  -.6530613 -1.2142857  -.6989796   .4709206   .47089
       -.04591837  -.03204689  -.6530613 -1.2142857  -.6989796   .4709206   .47089
       -.04591837  -.03204689  -.6530613 -1.2142857  -.6989796   .4709206   .47089
       -.04591837  -.03204689  -.6530613 -1.2142857  -.6989796   .4709206   .47089
      end

      Comment


      • #4
        Originally posted by Joseph Coveney View Post
        They're close, given that you used different methods of extracting factors. Maybe try
        Code:
        factor ind?, factors(1) pcf
        and see whether the factor loadings and Bartlett factor score predictions are closer to what you get with SPSS.

        -dataex- doesn't really "share the data", which have 251401 observations each. For that, you'd have to attach the datasets to your post.
        Thank you, Joseph! I tried the pdf option after the factor command, but it did not generate the same Bartlett scores as SPSS. I’m still unsure where this discrepancy arises from.

        Comment


        • #5
          Originally posted by Chen Samulsion View Post
          Perhaps Stata and SPSS use different algorithm when running factor analysis. I found that you can get nearly same results using ml option. And hope the following link be helpful in further discussion:https://stats.stackexchange.com/ques...-stata-after-r
          https://www.statalist.org/forums/for...ferent-results
          https://www.stata.com/statalist/arch.../msg00891.html
          Code:
          factor ind1 ind2 ind3 ind4 ind5, ml factors(1)
          predict bartlett_ml_stata, bartlett
          Code:
          FACTOR
          /VARIABLES ind1 ind2 ind3 ind4 ind5
          /MISSING LISTWISE
          /ANALYSIS ind1 ind2 ind3 ind4 ind5
          /PRINT INITIAL EXTRACTION
          /CRITERIA FACTORS(1) ITERATE(25)
          /EXTRACTION ML
          /ROTATION NOROTATE
          /SAVE BART(ALL).
          Code:
          * Example generated by -dataex-. To install: ssc install dataex
          clear
          input float(ind1 ind2 ind3 ind4 ind5 bartlett_ml_stata bartlett_ml_spss)
          -.0625 -.036781464 -1.1741071 -1.8214285 -.625 -.6793013 -.6793
          -.0625 -.036781464 -1.1741071 -1.8214285 -.625 -.6793013 -.6793
          -.0625 -.036781464 -1.1741071 -1.8214285 -.625 -.6793013 -.6793
          -.0625 -.036781464 -1.1741071 -1.8214285 -.625 -.6793013 -.6793
          -.0625 -.036781464 -1.1741071 -1.8214285 -.625 -.6793013 -.6793
          -.0625 -.036781464 -1.1741071 -1.8214285 -.625 -.6793013 -.6793
          -.0625 -.036781464 -1.1741071 -1.8214285 -.625 -.6793013 -.6793
          -.0818182 -.06459768 -1.0636363 -2.040909 -.6636364 -1.6808355 -1.68085
          -.0818182 -.06459768 -1.0636363 -2.040909 -.6636364 -1.6808355 -1.68085
          -.0818182 -.06459768 -1.0636363 -2.040909 -.6636364 -1.6808355 -1.68085
          -.0818182 -.06459768 -1.0636363 -2.040909 -.6636364 -1.6808355 -1.68085
          -.0818182 -.06459768 -1.0636363 -2.040909 -.6636364 -1.6808355 -1.68085
          -.0818182 -.06459768 -1.0636363 -2.040909 -.6636364 -1.6808355 -1.68085
          -.0818182 -.06459768 -1.0636363 -2.040909 -.6636364 -1.6808355 -1.68085
          -.08482143 -.05161264 -1.232143 -2.1875 -.6339286 -1.825172 -1.8251
          -.08482143 -.05161264 -1.232143 -2.1875 -.6339286 -1.825172 -1.8251
          -.08482143 -.05161264 -1.232143 -2.1875 -.6339286 -1.825172 -1.8251
          -.08482143 -.05161264 -1.232143 -2.1875 -.6339286 -1.825172 -1.8251
          -.08482143 -.05161264 -1.232143 -2.1875 -.6339286 -1.825172 -1.8251
          -.08482143 -.05161264 -1.232143 -2.1875 -.6339286 -1.825172 -1.8251
          -.07563026 -.04610478 -1.0798318 -1.8781513 -.487395 -1.211704 -1.21165
          -.07563026 -.04610478 -1.0798318 -1.8781513 -.487395 -1.211704 -1.21165
          -.07563026 -.04610478 -1.0798318 -1.8781513 -.487395 -1.211704 -1.21165
          -.07563026 -.04610478 -1.0798318 -1.8781513 -.487395 -1.211704 -1.21165
          -.07563026 -.04610478 -1.0798318 -1.8781513 -.487395 -1.211704 -1.21165
          -.072072074 -.04458895 -1.054054 -1.5585586 -.45045045 -.8832554 -.88323
          -.072072074 -.04458895 -1.054054 -1.5585586 -.45045045 -.8832554 -.88323
          -.072072074 -.04458895 -1.054054 -1.5585586 -.45045045 -.8832554 -.88323
          -.072072074 -.04458895 -1.054054 -1.5585586 -.45045045 -.8832554 -.88323
          -.072072074 -.04458895 -1.054054 -1.5585586 -.45045045 -.8832554 -.88323
          -.04639175 -.023575464 -.6701031 -.9536083 -.25773194 .698051 .69808
          -.04639175 -.023575464 -.6701031 -.9536083 -.25773194 .698051 .69808
          -.04639175 -.023575464 -.6701031 -.9536083 -.25773194 .698051 .69808
          -.04639175 -.023575464 -.6701031 -.9536083 -.25773194 .698051 .69808
          -.04639175 -.023575464 -.6701031 -.9536083 -.25773194 .698051 .69808
          -.05529954 -.033672657 -.8156682 -1.1658986 -.23963134 .12936646 .12938
          -.05529954 -.033672657 -.8156682 -1.1658986 -.23963134 .12936646 .12938
          -.05529954 -.033672657 -.8156682 -1.1658986 -.23963134 .12936646 .12938
          -.05529954 -.033672657 -.8156682 -1.1658986 -.23963134 .12936646 .12938
          -.05529954 -.033672657 -.8156682 -1.1658986 -.23963134 .12936646 .12938
          -.05882353 -.032646295 -.8823529 -1.276018 -.3076923 -.08048948 -.08045
          -.05882353 -.032646295 -.8823529 -1.276018 -.3076923 -.08048948 -.08045
          -.05882353 -.032646295 -.8823529 -1.276018 -.3076923 -.08048948 -.08045
          -.05882353 -.032646295 -.8823529 -1.276018 -.3076923 -.08048948 -.08045
          -.05882353 -.032646295 -.8823529 -1.276018 -.3076923 -.08048948 -.08045
          -.06603774 -.04337633 -1.1084905 -1.5990566 -.495283 -.7016497 -.70166
          -.06603774 -.04337633 -1.1084905 -1.5990566 -.495283 -.7016497 -.70166
          -.06603774 -.04337633 -1.1084905 -1.5990566 -.495283 -.7016497 -.70166
          -.06603774 -.04337633 -1.1084905 -1.5990566 -.495283 -.7016497 -.70166
          -.06603774 -.04337633 -1.1084905 -1.5990566 -.495283 -.7016497 -.70166
          -.04524887 -.029801706 -.8099548 -1.0542986 -.4343891 .5683508 .56831
          -.04524887 -.029801706 -.8099548 -1.0542986 -.4343891 .5683508 .56831
          -.04524887 -.029801706 -.8099548 -1.0542986 -.4343891 .5683508 .56831
          -.04524887 -.029801706 -.8099548 -1.0542986 -.4343891 .5683508 .56831
          -.04524887 -.029801706 -.8099548 -1.0542986 -.4343891 .5683508 .56831
          -.03902439 -.032034155 -.6780487 -.8878049 -.3707317 .9202397 .92015
          -.03902439 -.032034155 -.6780487 -.8878049 -.3707317 .9202397 .92015
          -.03902439 -.032034155 -.6780487 -.8878049 -.3707317 .9202397 .92015
          -.03902439 -.032034155 -.6780487 -.8878049 -.3707317 .9202397 .92015
          -.03902439 -.032034155 -.6780487 -.8878049 -.3707317 .9202397 .92015
          -.05777778 -.0412924 -.8355556 -1.231111 -.50222224 -.08735464 -.08739
          -.05777778 -.0412924 -.8355556 -1.231111 -.50222224 -.08735464 -.08739
          -.05777778 -.0412924 -.8355556 -1.231111 -.50222224 -.08735464 -.08739
          -.05777778 -.0412924 -.8355556 -1.231111 -.50222224 -.08735464 -.08739
          -.05777778 -.0412924 -.8355556 -1.231111 -.50222224 -.08735464 -.08739
          -.05 -.031434774 -.7454545 -1.1227273 -.50454545 .3631036 .36309
          -.05 -.031434774 -.7454545 -1.1227273 -.50454545 .3631036 .36309
          -.05 -.031434774 -.7454545 -1.1227273 -.50454545 .3631036 .36309
          -.05 -.031434774 -.7454545 -1.1227273 -.50454545 .3631036 .36309
          -.05 -.031434774 -.7454545 -1.1227273 -.50454545 .3631036 .36309
          -.05 -.031434774 -.7454545 -1.1227273 -.50454545 .3631036 .36309
          -.04524887 -.02705348 -.6153846 -1.1266968 -.5022625 .6142027 .61421
          -.04524887 -.02705348 -.6153846 -1.1266968 -.5022625 .6142027 .61421
          -.04524887 -.02705348 -.6153846 -1.1266968 -.5022625 .6142027 .61421
          -.04524887 -.02705348 -.6153846 -1.1266968 -.5022625 .6142027 .61421
          -.04524887 -.02705348 -.6153846 -1.1266968 -.5022625 .6142027 .61421
          -.04524887 -.02705348 -.6153846 -1.1266968 -.5022625 .6142027 .61421
          -.04186046 -.02881936 -.4930233 -1.0837209 -.52093023 .7885916 .78859
          -.04186046 -.02881936 -.4930233 -1.0837209 -.52093023 .7885916 .78859
          -.04186046 -.02881936 -.4930233 -1.0837209 -.52093023 .7885916 .78859
          -.04186046 -.02881936 -.4930233 -1.0837209 -.52093023 .7885916 .78859
          -.04186046 -.02881936 -.4930233 -1.0837209 -.52093023 .7885916 .78859
          -.027522936 -.016006246 -.32110095 -.6743119 -.28899083 1.715414 1.71541
          -.027522936 -.016006246 -.32110095 -.6743119 -.28899083 1.715414 1.71541
          -.027522936 -.016006246 -.32110095 -.6743119 -.28899083 1.715414 1.71541
          -.027522936 -.016006246 -.32110095 -.6743119 -.28899083 1.715414 1.71541
          -.027522936 -.016006246 -.32110095 -.6743119 -.28899083 1.715414 1.71541
          -.027522936 -.016006246 -.32110095 -.6743119 -.28899083 1.715414 1.71541
          -.035353538 -.023640804 -.4040405 -.7575758 -.27272728 1.2982354 1.29823
          -.035353538 -.023640804 -.4040405 -.7575758 -.27272728 1.2982354 1.29823
          -.035353538 -.023640804 -.4040405 -.7575758 -.27272728 1.2982354 1.29823
          -.035353538 -.023640804 -.4040405 -.7575758 -.27272728 1.2982354 1.29823
          -.035353538 -.023640804 -.4040405 -.7575758 -.27272728 1.2982354 1.29823
          -.035353538 -.023640804 -.4040405 -.7575758 -.27272728 1.2982354 1.29823
          -.04591837 -.03204689 -.6530613 -1.2142857 -.6989796 .4709206 .47089
          -.04591837 -.03204689 -.6530613 -1.2142857 -.6989796 .4709206 .47089
          -.04591837 -.03204689 -.6530613 -1.2142857 -.6989796 .4709206 .47089
          -.04591837 -.03204689 -.6530613 -1.2142857 -.6989796 .4709206 .47089
          -.04591837 -.03204689 -.6530613 -1.2142857 -.6989796 .4709206 .47089
          -.04591837 -.03204689 -.6530613 -1.2142857 -.6989796 .4709206 .47089
          end
          Thank you, Chen! Using the maximum likelihood option on both Stata and SPSS does indeed generate the same Bartlett scores. However, I’m specifically interested in PCF.

          Comment


          • #6
            Originally posted by Nick Baradar View Post
            I tried the pdf option after the factor command, but it did not generate the same Bartlett scores as SPSS. I’m still unsure where this discrepancy arises from.
            The discrepancy arises because with SPSS,
            Code:
            FACTOR
            . . .
            /EXTRACTION PC
            doesn't do exploratory (common) factor analysis (EFA) at all. According to this tutorial, that syntax does principal component analysis (PCA) instead, despite the name of the procedure.

            So, if you want to follow that SPSS syntax, then you would use Stata's pca command, but you mentioned immediately above in #5 that you're "specifically interested in PCF." I'm not familiar with SPSS's FACTOR procedure, but in the tutorial linked to above, "PAF" (principal axis factoring) is mentioned as an option specifically for EFA and might be what you're looking for if you're looking to perform EFA.

            Comment


            • #7
              Dear Joseph Coveney do you mean that extraction pc in SPSS equals pca in Stata?

              Comment


              • #8
                Originally posted by Chen Samulsion View Post
                . . . do you mean that extraction pc in SPSS equals pca in Stata?
                Yes.

                The only difference is that Stata's pca by default reports the principal component loadings scaled so that their sum squares equal one, while SPSS reports them scaled so that their sum squares equal the eigenvalue. You can display SPSS's preferred scaling with the postestimation command estat loadings, cnorm(eigen).

                I illustrate below with the first example from that tutorial that I linked to above.
                Code:
                version 19
                
                clear *
                
                import spss using "https://stats.idre.ucla.edu/wp-content/uploads/2018/05/SAQ8.sav"
                
                /*
                FACTOR
                 /VARIABLES q01 q02 q03 q04 q05 q06 q07 q08
                 /MISSING LISTWISE 
                 /ANALYSIS q01 q02 q03 q04 q05 q06 q07 q08
                 /PRINT INITIAL EXTRACTION
                 /PLOT EIGEN
                 /CRITERIA FACTORS(8) ITERATE(100)
                 /EXTRACTION PC
                 /ROTATION NOROTATE
                 /METHOD=CORRELATION.
                */
                
                pca q0?, components(8) correlation
                estat loadings, cnorm(eigen)
                
                exit
                The results match those shown there.

                Comment


                • #9
                  Thank you, Joseph Coveney ! Indeed, the differences in the terminologies and actual procedures are confusing. My goal is to combine these five indicators using principal component factor analysis on Stata and determine whether they load onto a single factor. I will then need to save the Bartlett factor scores.

                  Comment


                  • #10
                    You should ask yourself whether it is wise to use principal components analysis (PCA) if you goal is to combine items of the same factor (for example to create an item mean or sum score, even when using factor scores): Factor analysis (when using the term correctly) and PCA are different procedures that in certain situations produce substantially different results, see for example Preacher & MacCallum (2003) [reference below]: In most situations of analysis of scale items the assumption is that latent factors (plus item specific factors often called "error") affect the observed responses, whereas this is not the case in PCA. In such situations factor analysis is more appropriate than PCA (the latter can be used to determine whether variable used as predictors in regression analysis should be collapsed or removed because of collinearity).

                    SPSS is famous for using sloppy terminology (language), and if you goal is true factor analysis nearly all defaults are bad: (1) Many users want factor analysis but are misled by incorrect terminology to use PCA, instead; (2) the default is to determine the number of factors using the loadings > 1 (parallel analysis would be more appropriate in small samples even when using PCA; the eigenvalue criterion of 1 is not appropriate in factor analysis); (3) the default is varimax rotation (= uncorrelated factors) whereas in scale analysis correlated factors are far more plausible. You can bet that when researchers are using SPSS to apply "factor analysis" the majority is using PCA with these bad defaults without being aware of the implicit and questionable decisions.

                    Hence, it is a feature of Stata not to offer PCA (called pcf here) by default when using factor.

                    Reference
                    Preacher, K. J., & MacCallum, R. C. (2003). Repairing Tom Swift’s electric factor analysis machine. Understanding Statistics, 2(1), 13–43. [DOI: 10.1207/S15328031US0201_02]
                    Last edited by Dirk Enzmann; 07 Jul 2025, 09:27. Reason: small corrections

                    Comment

                    Working...
                    X