local_factors {l1rotation}R Documentation

Check whether local factors are present and find the rotation of the loading matrix with the smallest l1-norm.

Description

local_factors tests whether local factors are present and returns both the Principal Component estimate of the loadings and the rotation of the loadings with the smallest l1-norm. It also produces graphical illustrations of the results.

Usage

local_factors(X, r, parallel = FALSE, n_cores = NULL)

Arguments

X

A (usually standardized) t by n matrix of observations.

r

An integer denoting the number of factors in X.

parallel

A logical denoting whether the algorithm should be run in parallel.

n_cores

An integer denoting how many cores should be used, if parallel == TRUE.

Value

Returns a list with the following components:

Examples

# Minimal example with 2 factors, where X is a 224 by 207 matrix
lf <- local_factors(X = example_data, r = 2)

# Visualize Principal Component estimate of the loadings
lf$pc_plot

# Visualize l1-rotation loadings
lf$pc_rotated_plot


[Package l1rotation version 1.0.1 Index]