test_local_factors {l1rotation}R Documentation

Test for the presence of local factors, as in local_factors(), with additional flexibility.

Description

Test for the presence of local factors, as in local_factors(), with additional flexibility.

Usage

test_local_factors(X, r, loadings = NULL)

Arguments

X

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

r

An integer denoting the number of factors in X.

loadings

(optional) Matrix that represents a sparse basis of the loading space.

Value

Returns a list with the following components:

Examples

# Minimal example with 2 factors, where X is a 224 by 207 matrix
r <- 2
M <- nrow(example_data)
n <- ncol(example_data)

# Find minimum rotation
rotation_result <- find_local_factors(X = example_data, r)

# Test if sparse basis has local factors
test_result <- test_local_factors(
   X = example_data,
   r = r,
   loadings = rotation_result$rotated_loadings
)

test_result$has_local_factors


[Package l1rotation version 1.0.1 Index]