Extract n
principal components from the matrix mx
using irlba
, then rotate the solution using varimax
Usage
varimax_irlba(
mx,
n,
prcomp_fn = irlba::prcomp_irlba,
prcomp_opts = NULL,
varimax_fn = stats::varimax,
varimax_opts = NULL,
retx = FALSE
)
Arguments
- mx
Matrix of interest
- n
Number of principal components / varimax factors to return; can take a vector of values
- prcomp_fn
Function to use to extract principal components
- prcomp_opts
List of options to pass to
prcomp_fn
- varimax_fn
Function to use for varimax rotation
- varimax_opts
List of options to pass to
varimax_fn
Value
A list of class varimaxes
, with elements
totalvar
: Total variance, from PCAsdev
: Standard deviations of the extracted principal componentsrotation
: Rotation matrix (variable loadings) from PCAvarimaxes
: A list of classvarimaxes
, containing one fitted varimax model for each value ofn
, with further elementsloadings
: Varimax-rotated standardized loadingsrotmat
: Varimax rotation matrixscores
: Varimax-rotated observation scores