score: Factor and component scores

Description Usage Arguments Details Value See Also Examples

View source: R/score.R

Description

score calculates principal component or factor scores based on the model generated by PCA and FA functions

Usage

1
score(data, model)

Arguments

data

the data frame used to generate a PCA or FA model.

model

the model generated by the PCA or FA functions.

Details

The score function adds component or factor scores to a data frame. Scores are calculated using the regression method.

Value

the data frame with component or factor scores appended.

See Also

PCA, FA.

Examples

1
2
3
4
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)

Rkabacoff/qacr documentation built on March 20, 2021, 3:03 p.m.