I an trying to perform a PCA analysis by company on panel data.
The goal is to create an index out of multiple variables for each company which should use the same variable name (aware_pca_test) for all companies.
Currently my code looks like this
Code:
levelsof gvkey, local(gvkeys) foreach i of local gvkeys{ pca Awareness_score womexposure_score if gvkey == `" `i'"' rotate predict aware_pca_test if gvkey == `" `i'"' }
Any advice would be most appreciated.
Thanks and best,
Micha
0 Response to Performing PCA by group
Post a Comment