# NOT RUN {
library(parameters)
library(psych)
# }
# NOT RUN {
# Principal Component Analysis (PCA) ---------
pca <- psych::principal(attitude)
model_parameters(pca)
# }
# NOT RUN {
pca <- psych::principal(attitude, nfactors = 3, rotate = "none")
model_parameters(pca, sort = TRUE, threshold = 0.2)
principal_components(attitude, n = 3, sort = TRUE, threshold = 0.2)
# }
# NOT RUN {
# Exploratory Factor Analysis (EFA) ---------
efa <- psych::fa(attitude, nfactors = 3)
model_parameters(efa, threshold = "max", sort = TRUE, labels = as.character(1:ncol(attitude)))
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab