Displaying 1 result from an estimated 1 matches for "pcascor".
Did you mean:
pcacor
2011 Mar 22
1
Find Principal Component Score per year
...7 10
1009 1974 67 50 9 38
1011 1974 54 58 3 5
1013 1974 65 52 9 24
1001 1975 67 56 1 23
1003 1975 63 55 6 1
1005 1975 60 51 1 47
1007 1975 62 49 7 10
1009 1975 68 50 9 32
1011 1975 55 58 3 5
1013 1975 66 52 9 27"),head=TRUE))
library(psych)
pcascores<-principal(pca[,-2], nfactors=1, score=TRUE)
However, the scores should be based on the observations per year rather than
the full set of observations. The final output should be a data frame with 7
rows (one for each id) and 4 columns (one for each year) filled with the
Principal Component S...