Announcement

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

  • Factor Command


    Hello,

    I have an observation about the Factor command. I'd be interested in anyone's thoughts.

    My understanding about factor models, including what is see in the STATA Factor Methods and Formulas, is that when I change the number of factors used, all of the loadings should change because the Unique Effects matrix will change. But I'm not seeing that. For example, the addition of a third factor doesn't change the loadings for the first 2 factors:

    Code:
        -------------------------------------------------
    
            Variable |  Factor1   Factor2 |   Uniqueness
    
        -------------+--------------------+--------------
    
               sp_sq |   0.3567    0.1766 |      0.8416  
    
             baml_sq |   0.5766   -0.1127 |      0.6548  
    
         tbill_ds_sq |   0.2186   -0.1298 |      0.9354  
    
              wti_sq |   0.3099    0.0112 |      0.9038  
    
             gold_sq |   0.2100    0.2460 |      0.8954  
    
             usuk_sq |   0.2276    0.1811 |      0.9154  
    
            ust10_sq |   0.5281   -0.1248 |      0.7055  
    
        -------------------------------------------------
    Code:
        -----------------------------------------------------------
    
            Variable |  Factor1   Factor2   Factor3 |   Uniqueness
    
        -------------+------------------------------+--------------
    
               sp_sq |   0.3567    0.1766    0.0240 |      0.8410  
    
             baml_sq |   0.5766   -0.1127   -0.0066 |      0.6547  
    
         tbill_ds_sq |   0.2186   -0.1298    0.0919 |      0.9269  
    
              wti_sq |   0.3099    0.0112   -0.0648 |      0.8996  
    
             gold_sq |   0.2100    0.2460    0.0468 |      0.8932  
    
             usuk_sq |   0.2276    0.1811   -0.0310 |      0.9144  
    
            ust10_sq |   0.5281   -0.1248   -0.0142 |      0.7053  
    
        -----------------------------------------------------------


    The other issue I'm having is that the factors(#) option has no effect on the output - I always get 3 factors reported (for my dataset). To get the results above I went into the factor.ado and set the factors variable directly. That may be related to the observation above if I didn't change the .ado correctly.

    Joe

  • #2
    To begin with, I really hope you kept a copy of the unedited version of factor.ado and can replace your edited version with the original. Which you should do before doing anything else.

    You wrote
    My understanding about factor models, including what is see in the STATA Factor Methods and Formulas, is that when I change the number of factors used, all of the loadings should change because the Unique Effects matrix will change.
    From the the Methods and formulas section of the documentation for factor we have
    Suppose that there are p variables and q factors. Let Ψ represent the p × p diagonal matrix of uniquenesses, ...
    and from that I infer that the matrix of uniquenesses is a function of the number of variables and not of the number of factors.

    From the same documentation we can read that the factors() option selects the maximum number of factors to be retained, but also, factors correspondting to eigenvalues below that specficied by the mineigen() option will not be retained. You need to take both into account.
    Code:
    . webuse bg2, clear
    (Physician-cost data)
    
    . factor bg2cost1-bg2cost6, pcf factors(3)
    (obs=568)
    
    Factor analysis/correlation                      Number of obs    =        568
        Method: principal-component factors          Retained factors =          2
        Rotation: (unrotated)                        Number of params =         11
    
        --------------------------------------------------------------------------
             Factor  |   Eigenvalue   Difference        Proportion   Cumulative
        -------------+------------------------------------------------------------
            Factor1  |      1.70622      0.30334            0.2844       0.2844
            Factor2  |      1.40288      0.49422            0.2338       0.5182
            Factor3  |      0.90865      0.18567            0.1514       0.6696
            Factor4  |      0.72298      0.05606            0.1205       0.7901
            Factor5  |      0.66692      0.07456            0.1112       0.9013
            Factor6  |      0.59236            .            0.0987       1.0000
        --------------------------------------------------------------------------
        LR test: independent vs. saturated:  chi2(15) =  269.07 Prob>chi2 = 0.0000
    
    Factor loadings (pattern matrix) and unique variances
    
        -------------------------------------------------
            Variable |  Factor1   Factor2 |   Uniqueness
        -------------+--------------------+--------------
            bg2cost1 |   0.3581    0.6279 |      0.4775  
            bg2cost2 |  -0.4850    0.5244 |      0.4898  
            bg2cost3 |  -0.5326    0.5725 |      0.3886  
            bg2cost4 |  -0.4919    0.3254 |      0.6521  
            bg2cost5 |   0.6238    0.3962 |      0.4539  
            bg2cost6 |   0.6543    0.3780 |      0.4290  
        -------------------------------------------------
    
    . factor bg2cost1-bg2cost6, pcf mineigen(.8)
    (obs=568)
    
    Factor analysis/correlation                      Number of obs    =        568
        Method: principal-component factors          Retained factors =          3
        Rotation: (unrotated)                        Number of params =         15
    
        --------------------------------------------------------------------------
             Factor  |   Eigenvalue   Difference        Proportion   Cumulative
        -------------+------------------------------------------------------------
            Factor1  |      1.70622      0.30334            0.2844       0.2844
            Factor2  |      1.40288      0.49422            0.2338       0.5182
            Factor3  |      0.90865      0.18567            0.1514       0.6696
            Factor4  |      0.72298      0.05606            0.1205       0.7901
            Factor5  |      0.66692      0.07456            0.1112       0.9013
            Factor6  |      0.59236            .            0.0987       1.0000
        --------------------------------------------------------------------------
        LR test: independent vs. saturated:  chi2(15) =  269.07 Prob>chi2 = 0.0000
    
    Factor loadings (pattern matrix) and unique variances
    
        -----------------------------------------------------------
            Variable |  Factor1   Factor2   Factor3 |   Uniqueness
        -------------+------------------------------+--------------
            bg2cost1 |   0.3581    0.6279   -0.2586 |      0.4106  
            bg2cost2 |  -0.4850    0.5244   -0.4741 |      0.2650  
            bg2cost3 |  -0.5326    0.5725    0.0626 |      0.3847  
            bg2cost4 |  -0.4919    0.3254    0.6926 |      0.1725  
            bg2cost5 |   0.6238    0.3962    0.3650 |      0.3207  
            bg2cost6 |   0.6543    0.3780    0.0137 |      0.4288  
        -----------------------------------------------------------
    
    .
    Last edited by William Lisowski; 14 May 2020, 13:20.

    Comment


    • #3
      You should probably post the correlation matrix, so that we can run the factormat-command to check your results.
      As far as I understand the factor-option, only the display of the output should change, but there will always as many factors as there are variables. Only the number of retained factors can change by setting the factor-option

      Comment


      • #4
        Thank guys, Yes, William, of course I made my own copy of the ado file and put it in my personal directory. I find delving into Stata's code is a good way to improve my own Stata programming skills. Stats Tech Services gave my some good guidance on my question:

        Dear Joe,

        Let me start by describing how the -factor- command works,
        so I can also explain why this makes sense.

        Let's see the description for the -factors()- option:

        "factors(#) sets the maximum number of factors to be retained
        for later use by the postestimation commands"

        It doesn't refer to how many factors are computed; it refers to
        how many factors will be retained for further computations.

        When you call -factor- with -factors()- option, the command
        will compute all the factors (i.e., as many factors as variables
        you have). This will explain 100% of the variance.

        also, from the documentation,
        "factor always prints the full set of eigenvalues but prints
        the corresponding eigenvectors only for retained factors"
        (which answers your last question).

        Now, let's look at "Methods and Formulas". My guess is that you
        are looking at the equation

        x = f*Delta' + e
        and wondering why the solution with q<p would be equivalent to
        obtaining just the first q factors of the solution computed with
        p factors. I'll try to write an intuitive explanation.

        The key is in the orthogonality. If I want to find a subspace
        of dimension q=3 that minimizes the error, this subspace will
        certainly contain the subspace of dimension 2 (2 equations) that
        minimizes the error. But because my factors are orthogonal, I
        can express the subspace for q=3 as f1, f2, f3, when f1 and f2 are
        the solution from q=2, and f3 is a new vector, orthogonal to f1
        and f2.

        Of course, all this can be rotated, but this particular solution
        allows us to have a clear sort order for the factors.

        Sincerely,
        Isabel

        Isabel Canette, Ph.D.
        Principal Mathematician & Statistician
        StataCorp LLC
        One strange thing though. I wrote a Python program to try to replicate Stata's methodology. I included estimates of the diagonal unique variance matrix. I matched their PCA results exactly but didn't come anywhere close to their FACTOR (unrotated) results.

        Comment


        • #5
          You do not tell us the exact commands whose results you are comparing, so let me say that if you are comparing your Python program to the results of pca and to the results of factor, then you should use
          Code:
          factor ..., pcf
          to get results comparable to pca.
          Code:
          . webuse bg2
          (Physician-cost data)
          
          . 
          . * Principal Components Analysis
          . quietly pca bg2cost1-bg2cost6
          
          . matrix list e(Ev)
          
          e(Ev)[1,6]
               Eigenvalues:  Eigenvalues:  Eigenvalues:  Eigenvalues:  Eigenvalues:  Eigenvalues:
                     Comp1         Comp2         Comp3         Comp4         Comp5         Comp6
          r1     1.7062152     1.4028764     .90865173     .72297905      .6669203     .59235727
          
          . 
          . * Principal factors
          . quietly factor bg2cost1-bg2cost6
          
          . matrix list e(Ev)
          
          e(Ev)[1,6]
                          Factor1     Factor2     Factor3     Factor4     Factor5     Factor6
          Eigenvalues    .8538927   .54107173   .02321134  -.14966742  -.18917716   -.2511521
          
          . 
          . * Principal component factors
          . quietly factor bg2cost1-bg2cost6, pcf
          
          . matrix list e(Ev)
          
          e(Ev)[1,6]
                         Factor1    Factor2    Factor3    Factor4    Factor5    Factor6
          Eigenvalues  1.7062152  1.4028764  .90865173  .72297905   .6669203  .59235727

          Comment


          • #6
            For PCA I'm using:
            Code:
            correlate *sq
            matrix m_corr = r(C)
            pcamat m_corr, n(8881)
            And for FACTOR:
            Code:
            correlate *sq
            matrix m_corr = r(C)
            factormat m_corr, n(8881)
            I realize if I use the pcf option I can get FACTORMAT to do PCA. What's bothering me is I set up my Python code to do FACTOR (without pcf) and it's instead giving me PCA results instead of FACTOR (without pcf) results.

            I realize the question can't be answered here, without delving into my Python code. So more of an observation. I did follow the approach in the Stata documentation, which is the same as that in Rencher, A. C. 1998. Multivariate Statistical Inference and Applications, New York: Wiley. I always wonder if I really know what I'm getting when I use a Stats package instead of doing it myself.

            Comment


            • #7
              I'm still struggling with the STATA FACTORMAT command output. I wrote python code following their approach and got very different results. Independently, the popular FactorAnalyzer python module results agree exactly with mine. The three sets of output are below. I also attached my data.

              Stata technical services hasn't responded to my request to refer this to their programmers.

              STATA:
              Code:
              . correlate dm*
              (obs=8,881)
              
                           | dm_sq_sp dm_sq_~l dm_sq_~s dm_sq_~i dm_sq_~d dm_sq_~k dm_sq~10
              -------------+---------------------------------------------------------------
                  dm_sq_sp |   1.0000
                dm_sq_baml |   0.1450   1.0000
              dm_sq_tbil~s |   0.0238   0.0766   1.0000
                 dm_sq_wti |   0.0881   0.1008  -0.0038   1.0000
                dm_sq_gold |   0.1398   0.0893   0.0448   0.1002   1.0000
                dm_sq_usuk |   0.0938   0.0875  -0.0123   0.0779   0.1037   1.0000
               dm_sq_ust10 |   0.1402   0.5072   0.0393   0.0898   0.0831   0.1878   1.0000
              
              
              . matrix m_corr = r(C)
              
              . noisily factormat m_corr, n(8881)
              (obs=8,881)
              
              Factor analysis/correlation                      Number of obs    =      8,881
                  Method: principal factors                    Retained factors =          3
                  Rotation: (unrotated)                        Number of params =         18
              
                  --------------------------------------------------------------------------
                       Factor  |   Eigenvalue   Difference        Proportion   Cumulative
                  -------------+------------------------------------------------------------
                      Factor1  |      0.96859      0.79038            1.3361       1.3361
                      Factor2  |      0.17821      0.13988            0.2458       1.5819
                      Factor3  |      0.03833      0.07148            0.0529       1.6348
                      Factor4  |     -0.03315      0.02620           -0.0457       1.5891
                      Factor5  |     -0.05935      0.05372           -0.0819       1.5072
                      Factor6  |     -0.11308      0.14154           -0.1560       1.3512
                      Factor7  |     -0.25462            .           -0.3512       1.0000
                  --------------------------------------------------------------------------
                  LR test: independent vs. saturated:  chi2(21) = 3848.50 Prob>chi2 = 0.0000
              
              Factor loadings (pattern matrix) and unique variances
              
                  -----------------------------------------------------------
                      Variable |  Factor1   Factor2   Factor3 |   Uniqueness
                  -------------+------------------------------+--------------
                      dm_sq_sp |   0.2670    0.1801    0.0339 |      0.8952  
                    dm_sq_baml |   0.6014   -0.1474    0.0226 |      0.6161  
                  dm_sq_tbil~s |   0.0857   -0.0211    0.1561 |      0.9679  
                     dm_sq_wti |   0.1909    0.1694   -0.0161 |      0.9346  
                    dm_sq_gold |   0.2063    0.2398    0.0523 |      0.8972  
                    dm_sq_usuk |   0.2500    0.1491   -0.0904 |      0.9071  
                   dm_sq_ust10 |   0.6220   -0.1233   -0.0340 |      0.5968  
                  -----------------------------------------------------------
              FactorAnalyzer:
              Code:
              common eigenvalues
              [1.2275 0.3476 0.168 ]
              factor loadings
              [[ 0.2438  0.7677  0.0796  0.1689  0.2011  0.2444  0.6661]
               [ 0.2089 -0.2384 -0.0102  0.1661  0.366   0.2865 -0.0583]
               [ 0.0824  0.1176  0.1144  0.0387  0.1985 -0.2652 -0.1517]]
              communalities
              [0.1099 0.66   0.0195 0.0576 0.2138 0.2122 0.4701]
              My Code:
              Code:
              common eigenvalues
              [[1.2275 0.3477 0.168 ]]
              factor loadings
              [[-0.2438 -0.7678 -0.0796 -0.1689 -0.2011 -0.2444 -0.666 ]
               [-0.2089  0.2384  0.0102 -0.1661 -0.3661 -0.2865  0.0583]
               [ 0.0823  0.1175  0.1144  0.0387  0.1986 -0.2652 -0.1518]]
              communalities
              [0.1098 0.6601 0.0195 0.0576 0.2139 0.2122 0.47  ]
              Attached Files
              Last edited by Joe Prendergast; 20 May 2020, 14:51.

              Comment


              • #8
                The following four examples suggest to me that the factorization technique you need in Stata is ml (maximum likelihood factor) or ipf (iterated principal factor).
                Code:
                preserve
                collapse (mean) dm*
                mkmat dm*, matrix(fa_m)
                restore, preserve
                collapse (sd) dm*
                mkmat dm*, matrix(fa_s)
                restore
                correlate dm*
                matrix m_corr = r(C)
                
                factormat m_corr, n(8881) means(fa_m) sds(fa_s)
                factormat m_corr, n(8881) means(fa_m) sds(fa_s) pcf
                factormat m_corr, n(8881) means(fa_m) sds(fa_s) ipf
                factormat m_corr, n(8881) means(fa_m) sds(fa_s) ml
                Code:
                . factormat m_corr, n(8881) means(fa_m) sds(fa_s)
                (obs=8,881)
                
                Factor analysis/correlation                      Number of obs    =      8,881
                    Method: principal factors                    Retained factors =          3
                    Rotation: (unrotated)                        Number of params =         18
                
                    --------------------------------------------------------------------------
                         Factor  |   Eigenvalue   Difference        Proportion   Cumulative
                    -------------+------------------------------------------------------------
                        Factor1  |      0.96859      0.79039            1.3361       1.3361
                        Factor2  |      0.17821      0.13988            0.2458       1.5819
                        Factor3  |      0.03833      0.07148            0.0529       1.6348
                        Factor4  |     -0.03315      0.02620           -0.0457       1.5891
                        Factor5  |     -0.05935      0.05372           -0.0819       1.5072
                        Factor6  |     -0.11308      0.14154           -0.1560       1.3512
                        Factor7  |     -0.25462            .           -0.3512       1.0000
                    --------------------------------------------------------------------------
                    LR test: independent vs. saturated:  chi2(21) = 3848.52 Prob>chi2 = 0.0000
                
                Factor loadings (pattern matrix) and unique variances
                
                    -----------------------------------------------------------
                        Variable |  Factor1   Factor2   Factor3 |   Uniqueness 
                    -------------+------------------------------+--------------
                        dm_sq_sp |   0.2670    0.1801    0.0339 |      0.8952  
                      dm_sq_baml |   0.6014   -0.1474    0.0226 |      0.6161  
                    dm_sq_tbil~s |   0.0857   -0.0211    0.1561 |      0.9679  
                       dm_sq_wti |   0.1909    0.1694   -0.0161 |      0.9346  
                      dm_sq_gold |   0.2063    0.2398    0.0523 |      0.8972  
                      dm_sq_usuk |   0.2500    0.1491   -0.0904 |      0.9071  
                     dm_sq_ust10 |   0.6220   -0.1233   -0.0340 |      0.5968  
                    -----------------------------------------------------------
                
                . factormat m_corr, n(8881) means(fa_m) sds(fa_s) pcf
                (obs=8,881)
                
                Factor analysis/correlation                      Number of obs    =      8,881
                    Method: principal-component factors          Retained factors =          3
                    Rotation: (unrotated)                        Number of params =         18
                
                    --------------------------------------------------------------------------
                         Factor  |   Eigenvalue   Difference        Proportion   Cumulative
                    -------------+------------------------------------------------------------
                        Factor1  |      1.75948      0.67933            0.2514       0.2514
                        Factor2  |      1.08015      0.06657            0.1543       0.4057
                        Factor3  |      1.01359      0.08889            0.1448       0.5505
                        Factor4  |      0.92470      0.02416            0.1321       0.6826
                        Factor5  |      0.90054      0.05948            0.1286       0.8112
                        Factor6  |      0.84106      0.36059            0.1202       0.9314
                        Factor7  |      0.48047            .            0.0686       1.0000
                    --------------------------------------------------------------------------
                    LR test: independent vs. saturated:  chi2(21) = 3848.52 Prob>chi2 = 0.0000
                
                Factor loadings (pattern matrix) and unique variances
                
                    -----------------------------------------------------------
                        Variable |  Factor1   Factor2   Factor3 |   Uniqueness 
                    -------------+------------------------------+--------------
                        dm_sq_sp |   0.4426    0.3484    0.1472 |      0.6611  
                      dm_sq_baml |   0.7430   -0.4152   -0.0430 |      0.2738  
                    dm_sq_tbil~s |   0.1413   -0.2238    0.8753 |      0.1638  
                       dm_sq_wti |   0.3293    0.4447   -0.0669 |      0.6894  
                      dm_sq_gold |   0.3604    0.5654    0.3199 |      0.4481  
                      dm_sq_usuk |   0.4101    0.2877   -0.2987 |      0.6598  
                     dm_sq_ust10 |   0.7650   -0.3690   -0.1669 |      0.2508  
                    -----------------------------------------------------------
                
                . factormat m_corr, n(8881) means(fa_m) sds(fa_s) ipf
                (obs=8,881)
                
                Factor analysis/correlation                      Number of obs    =      8,881
                    Method: iterated principal factors           Retained factors =          6
                    Rotation: (unrotated)                        Number of params =         21
                
                    --------------------------------------------------------------------------
                         Factor  |   Eigenvalue   Difference        Proportion   Cumulative
                    -------------+------------------------------------------------------------
                        Factor1  |      1.22107      0.89575            0.6764       0.6764
                        Factor2  |      0.32532      0.16265            0.1802       0.8565
                        Factor3  |      0.16267      0.09531            0.0901       0.9466
                        Factor4  |      0.06736      0.04208            0.0373       0.9840
                        Factor5  |      0.02529      0.02137            0.0140       0.9980
                        Factor6  |      0.00392      0.00416            0.0022       1.0001
                        Factor7  |     -0.00024            .           -0.0001       1.0000
                    --------------------------------------------------------------------------
                    LR test: independent vs. saturated:  chi2(21) = 3848.52 Prob>chi2 = 0.0000
                
                Factor loadings (pattern matrix) and unique variances
                
                    -----------------------------------------------------------------------------------------
                        Variable |  Factor1   Factor2   Factor3   Factor4   Factor5   Factor6 |   Uniqueness 
                    -------------+------------------------------------------------------------+--------------
                        dm_sq_sp |   0.2512    0.2372    0.0828   -0.0219   -0.1112    0.0233 |      0.8604  
                      dm_sq_baml |   0.6976   -0.1820    0.1531   -0.0574    0.0128    0.0166 |      0.4530  
                    dm_sq_tbil~s |   0.0812   -0.0062    0.1804    0.1731    0.0600    0.0171 |      0.9270  
                       dm_sq_wti |   0.1762    0.2015    0.0283   -0.1574    0.0878    0.0013 |      0.8951  
                      dm_sq_gold |   0.1967    0.3474    0.1238    0.0522    0.0031   -0.0368 |      0.8212  
                      dm_sq_usuk |   0.2461    0.2401   -0.2462    0.0639    0.0350    0.0282 |      0.8150  
                     dm_sq_ust10 |   0.7310   -0.1300   -0.1519    0.0455   -0.0145   -0.0257 |      0.4227  
                    -----------------------------------------------------------------------------------------
                
                . factormat m_corr, n(8881) means(fa_m) sds(fa_s) ml
                (obs=8,881)
                number of factors adjusted to 3
                Iteration 0:   log likelihood = -390.03776
                Iteration 1:   log likelihood =  -25.96514
                Iteration 2:   log likelihood = -16.395233
                Iteration 3:   log likelihood = -6.0827653
                Iteration 4:   log likelihood = -4.1684206
                Iteration 5:   log likelihood = -4.1449844
                Iteration 6:   log likelihood = -4.1449523
                
                Factor analysis/correlation                      Number of obs    =      8,881
                    Method: maximum likelihood                   Retained factors =          3
                    Rotation: (unrotated)                        Number of params =         18
                                                                 Schwarz's BIC    =     171.94
                    Log likelihood = -4.144952                   (Akaike's) AIC   =    44.2899
                
                    --------------------------------------------------------------------------
                         Factor  |   Eigenvalue   Difference        Proportion   Cumulative
                    -------------+------------------------------------------------------------
                        Factor1  |      1.20624      0.83971            0.6898       0.6898
                        Factor2  |      0.36653      0.19050            0.2096       0.8993
                        Factor3  |      0.17603            .            0.1007       1.0000
                    --------------------------------------------------------------------------
                    LR test: independent vs. saturated:  chi2(21) = 3848.52 Prob>chi2 = 0.0000
                    LR test:   3 factors vs. saturated:  chi2(3)  =    8.29 Prob>chi2 = 0.0405
                
                Factor loadings (pattern matrix) and unique variances
                
                    -----------------------------------------------------------
                        Variable |  Factor1   Factor2   Factor3 |   Uniqueness 
                    -------------+------------------------------+--------------
                        dm_sq_sp |   0.2128    0.2258    0.1131 |      0.8909  
                      dm_sq_baml |   0.7978   -0.1365    0.0672 |      0.3404  
                    dm_sq_tbil~s |   0.0845   -0.0134    0.1085 |      0.9809  
                       dm_sq_wti |   0.1461    0.1759    0.0726 |      0.9425  
                      dm_sq_gold |   0.1518    0.3547    0.2531 |      0.7870  
                      dm_sq_usuk |   0.1921    0.3685   -0.2283 |      0.7752  
                     dm_sq_ust10 |   0.6604    0.0648   -0.1597 |      0.5343  
                    -----------------------------------------------------------

                Comment


                • #9
                  Thank you. I am iterating in my code and evidently so evidently is the FactorAnalyzer python module.

                  Comment


                  • #10
                    A quick search of the web led me to

                    https://factor-analyzer.readthedocs.io/en/latest/

                    where we see

                    The factor_analyzer package allows users to perfrom EFA using either (1) a minimum residual (MINRES) solution, (2) a maximum likelihood (ML) solution, or (3) a principal factor solution.
                    and further reading shows

                    method ({'minres', 'ml', 'principal'}, optional) – The fitting method to use, either MINRES or Maximum Likelihood. Defaults to ‘minres’.
                    It's often useful to read the fine material provided by the authors of software packages.

                    Comment


                    • #11
                      I knew that factor_analyzer was doing the iterative minimization because that's what I did with my own python code and I matched factor_analyzer exactly. What I missed was that I needed to use the ipf option in STATA to match my results and the factor_analyzer results.

                      Comment

                      Working...
                      X