score | R Documentation |
score
calculates principal component or factor scores
based on the model generated by PCA
and FA
functions
score(data, model)
data |
the data frame used to generate a PCA or FA model. |
model |
the model generated by the |
The score
function adds component or factor scores to a data frame. Scores
are calculated using the regression method.
the data frame with component or factor scores appended.
ratings <- read.csv("https://www.promptcloud.com/wp-content/uploads/2017/02/EFA.csv") fit.pca <- PCA(ratings, nfactors=2, rotate="varimax") newdf <- score(ratings, fit.pca) head(newdf)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.