Learn R Programming

parameters (version 0.1.0)

model_parameters.principal: Format PCA/FA from the psych package

Description

Format PCA/FA objects from the psych package (Revelle, 2016).

Usage

# S3 method for principal
model_parameters(model, sort = FALSE,
  threshold = NULL, labels = NULL, ...)

Arguments

model

PCA or FA created by the psych::principal or psych::fa functions.

sort

Sort the loadings.

threshold

A value between 0 and 1 indicates which (absolute) values from the loadings should be removed. Can also be "max", in which case it will only display the maximum loading per veriable (the most simple structure).

labels

A character vector containing labels to be added to the loadings data. Usually, the question related to the item.

...

Arguments passed to or from other methods.

Value

A data.frame of loadings.

Details

  • Complexity (Hoffman's, 1978; Pettersson and Turkheimer, 2010) represents the number of latent components needed to account for the observed variables. Whereas a perfect simple structure solution has a complexity of 1 in that each item would only load on one factor, a solution with evenly distributed items has a complexity greater than 1.

  • Uniqueness represents the variance that is 'unique' to the variable and not shared with other variables. It is equal to 1 <U+2013> communality (variance that is shared with other variables). A uniqueness of 0.20 suggests that 20% or that variable's variance is not shared with other variables in the overall factor model. The greater 'uniqueness' the lower the relevance of the variable in the factor model.

References

  • Pettersson, E., \& Turkheimer, E. (2010). Item selection, evaluation, and simple structure in personality data. Journal of research in personality, 44(4), 407-420.

  • Revelle, W. (2016). How To: Use the psych package for Factor Analysis and data reduction.

Examples

Run this code
# 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