Hi everyone, I am doing a pca in Stata15 in order to reduce my 21 variables to a smaller number.
I have the following problems (feel free to just answer one or two if you prefer):
1)Stata drops one of my variable (var1) saying it has no variation, but i does (it is a dummy with sd 0.44, as you can see below)
2)I have read that people do the varimax rotation after the pca so to have more variance explained by the first n components, but when I apply it I have the opposite effect. I do not see a theoretical reason for which I shoul want to rotate my component, is there any?
4) (this is more a request of a suggestion) After plotting the screeplot (attached), the elobow of the graph seems to be at the 5th component. I would then take only the first fifth (at most sixth, since eigenvalue of the sisth is till >1) components for summarizing the data even if they only account for 48% of the variance (on the other hand, I need to take 11 to hit 70%, so it doeant seem to be a good deal). Do you think 48% var explained is definetely too little and I should take more components?
Thank you a lot in advance!
Claire
pca:
summarize of var1
varimax rotation:
I have the following problems (feel free to just answer one or two if you prefer):
1)Stata drops one of my variable (var1) saying it has no variation, but i does (it is a dummy with sd 0.44, as you can see below)
2)I have read that people do the varimax rotation after the pca so to have more variance explained by the first n components, but when I apply it I have the opposite effect. I do not see a theoretical reason for which I shoul want to rotate my component, is there any?
4) (this is more a request of a suggestion) After plotting the screeplot (attached), the elobow of the graph seems to be at the 5th component. I would then take only the first fifth (at most sixth, since eigenvalue of the sisth is till >1) components for summarizing the data even if they only account for 48% of the variance (on the other hand, I need to take 11 to hit 70%, so it doeant seem to be a good deal). Do you think 48% var explained is definetely too little and I should take more components?
Thank you a lot in advance!
Claire
pca:
Code:
global OPs var1 var2 var3 var4 var5 var6 var7 var8 var9 var10 var11 var12 var13 var14 var15 var16 var17 var18 var19 var20 var21 pca $OPs (var1 dropped because of zero variance) Principal components/correlation Number of obs = 7,529 Number of comp. = 21 Trace = 21 Rotation: (unrotated = principal) Rho = 1.0000 -------------------------------------------------------------------------- Component | Eigenvalue Difference Proportion Cumulative -------------+------------------------------------------------------------ Comp1 | 3.637 1.26165 0.1732 0.1732 Comp2 | 2.37536 .741524 0.1131 0.2863 Comp3 | 1.63383 .333266 0.0778 0.3641 Comp4 | 1.30057 .168095 0.0619 0.4260 Comp5 | 1.13247 .140003 0.0539 0.4800 Comp6 | .992469 .0864809 0.0473 0.5272 Comp7 | .905988 .0418066 0.0431 0.5704 Comp8 | .864182 .0265943 0.0412 0.6115 Comp9 | .837587 .0604207 0.0399 0.6514 Comp10 | .777166 .0147735 0.0370 0.6884 Comp11 | .762393 .011602 0.0363 0.7247 Comp12 | .750791 .0677877 0.0358 0.7605 Comp13 | .683003 .0152058 0.0325 0.7930 Comp14 | .667798 .0328472 0.0318 0.8248 Comp15 | .63495 .0395576 0.0302 0.8550 Comp16 | .595393 .0610052 0.0284 0.8834 Comp17 | .534388 .0195512 0.0254 0.9088 Comp18 | .514836 .0240903 0.0245 0.9333 Comp19 | .490746 .0251357 0.0234 0.9567 Comp20 | .46561 .0221395 0.0222 0.9789 Comp21 | .443471 . 0.0211 1.0000 --------------------------------------------------------------------------
Code:
sum var1 Variable | Obs Mean Std. Dev. Min Max -------------+---------------------------------------------------------------- var1 | 21,811 .736234 .440684 0 1
Code:
rotate, varimax Principal components/correlation Number of obs = 7,529 Number of comp. = 21 Trace = 21 Rotation: orthogonal varimax (Kaiser off) Rho = 1.0000 -------------------------------------------------------------------------- Component | Variance Difference Proportion Cumulative -------------+------------------------------------------------------------ Comp1 | 1 2.59109e-10 0.0476 0.0476 Comp2 | 1 5.34629e-10 0.0476 0.0952 Comp3 | 1 9.72773e-09 0.0476 0.1429 Comp4 | 1 -6.25539e-09 0.0476 0.1905 Comp5 | 1 -3.25017e-09 0.0476 0.2381 Comp6 | 1 -8.09346e-11 0.0476 0.2857 Comp7 | 1 -3.54605e-12 0.0476 0.3333 Comp8 | 1 -3.33094e-09 0.0476 0.3810 Comp9 | 1 3.33692e-09 0.0476 0.4286 Comp10 | 1 2.42011e-10 0.0476 0.4762 Comp11 | 1 -8.16823e-09 0.0476 0.5238 Comp12 | 1 1.55516e-08 0.0476 0.5714 Comp13 | 1 -7.62707e-09 0.0476 0.6190 Comp14 | 1 1.06927e-09 0.0476 0.6667 Comp15 | 1 -1.06431e-08 0.0476 0.7143 Comp16 | 1 8.99708e-09 0.0476 0.7619 Comp17 | 1 1.01854e-09 0.0476 0.8095 Comp18 | 1 -3.11298e-10 0.0476 0.8571 Comp19 | 1 -1.76761e-10 0.0476 0.9048 Comp20 | 1 7.10022e-10 0.0476 0.9524 Comp21 | 1 . 0.0476 1.0000 --------------------------------------------------------------------------
Comment