Announcement

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

  • PCA loadings

    Hello everyone,

    How can I generate the factorial loadings after run a PCA analyses? I was comparing the SPSS results (made by other person) with Stata ones and the rotated values/scores are different from the SPSS table called "rotated component matrix".
    I also wanna to check the loadings to apply a cut-off criteria to decide which variables belong to each component.

    Example:
    pca [variables]
    screeplot
    rotate, varimax kaiser components(2)
    predict [new variable], score (it produces the same values as the 'rotate' command)

  • #2
    That is a rather factor analysis way to treat a PCA. Why not start with factor?

    I can't comment on what might differ from SPSS, as I haven't used it in this millennium, and I never rotate PCA results.

    But just in case it is of interest (to anyone interested in the thread title) I will mention pcacoefsave from SSC.

    https://www.statalist.org/forums/for...-for-pca-users
    Last edited by Nick Cox; 30 Jul 2026, 02:08.

    Comment


    • #3
      SPSS and Stata use (very) different terminology. I recommend to having a look at previous posts:

      Comment


      • #4
        Thank you so much, professors!

        The links really helped me understand where the difference was (I found the command that generated a table very similar to the one in SPSS, with the factor loadings). I will also explore the pcacoefsave as I am working with PCA now.

        The goal of the analysis would be to create an overall metric—such as a weighted sum—using the five discrete items/variables I have in my database. Does it make sense to proceed with PCA in this case?

        I explored both PCA and EFA, and the predicted scores were different. Also, I created quintiles for each generated score (I need this transformation for the analyses), and the allocation of individuals in each quintile differed between each analysis (for 12% of the sample).

        Comment


        • #5
          It's hard for me to say more usefully without seeing any results whatsoever. You're using techniques that divide the statistical world. Some would shun PCA, let alone EFA, to say nothing about quintile binning (why throw away information?). Any disinclinations may be blind prejudices or better principles, depending on where you sit (or jump).

          Unequal frequencies in quintile bins can arise for trivial reasons (for example, with 42 you can't get closer than 8, 8, 8, 9, 9 in some order) or for more fundamental reasons (ties with what you report as discrete variables). Stata won't (can't reasonably) enforce equal bins because it follows a rule that observations with the same values must be assigned to the same bin.

          There isn't really an answer to unequal bins, beyond possibly not doing it if it produces unacceptably awkward results. There is however discussion, including

          Section 4 of https://journals.sagepub.com/doi/pdf...6867X120120041

          Section 6 of https://journals.sagepub.com/doi/epd...867X1801800311

          I especially recommend quantile plots showing your bins. Here is a silly example, nevertheless showing what is elementary but also fundamental.


          Code:
          . sysuse auto, clear
          (1978 automobile data)
          
          . xtile mpg5=mpg, nq(5)
          
          . quantile mpg, ms(none) mlabel(mpg5) mlabpos(0) rlopts(lc(none))
          
          . tabstat mpg, by(mpg5) s(n min max)
          
          Summary for variables: mpg
          Group variable: mpg5 (5 quantiles of mpg)
          
              mpg5 |         N       Min       Max
          ---------+------------------------------
                 1 |        18        12        17
                 2 |        17        18        19
                 3 |        13        20        22
                 4 |        12        23        25
                 5 |        14        26        41
          ---------+------------------------------
             Total |        74        12        41
          ----------------------------------------
          Click image for larger version

Name:	quintile_bins.png
Views:	1
Size:	42.9 KB
ID:	1786957


          To expand on what has already been flagged:

          1. Stata won't separate observations with identical values. They go in the same bin, regardless.

          2. Observations can have values very close to those in other bins.

          3. Observations in the same bin don't have to be very similar.

          The example is in principle a continuous variable for which a sensible convention is to report only integers (miles per gallon). With e.g. Likert items or similar variables scored say 1 to 5 the problem is likely to be worse, even if you are using several to produce PC or factor scores.



          Comment

          Working...
          X