I have a panel of 190 industries over the 2000-2018 period. my data-set contains 4 variables (x1-x4) that are correlated and convey similar information. I would like to do a principal component analysis and extract one variable that accounts for the common variability and correlation of the 4 variables. I type the following
Code:
bysort industry: pca x1 x2 x3 x4
Code:
bysort industry: predict p1, score
Code:
predict may not be combined with by r(190);
https://www.statalist.org/forums/for...-in-panel-data
Should I give up on the PCA analysis in a panel data setting. One option is to split my dataset by industry and do PCA analysis 190 times, which is nonsense.
Any suggestions?
0 Response to Principal component analysis in panel data setting
Post a Comment