to_loadingmatrix: Convert a Factor Loading Vector to a Factor Loading Matrix

View source: R/to_loadingmatrix.R

to_loadingmatrixR Documentation

Convert a Factor Loading Vector to a Factor Loading Matrix

Description

The function to_loadingmatrix converts a vector of factor loadings to a p x m factor loading matrix in a confirmatory factor analysis model. This creates a loading matrix with no cross-factor loadings.

Usage

to_loadingmatrix(loading_vec, model)

Arguments

loading_vec

This is a vector of factor loadings for each item listed in order of item1, item2,..., itemp.

model

is a list object specifying items in each factor in order. See the example.

Value

to_loadingmatrix will return a p x m matrix of factor loadings according to the confirmatory factor analysis (CFA) model provided, where p is the total number of items, and m is the total number of dimensions.

Examples

library(AUTTT)

lambs <- runif(12, .7, .95)
mymodel <- list(c(1,2,3,4), c(5,6,7), c(8, 9,10, 11, 12))
to_loadingmatrix(loading_vec = lambs, model = mymodel)

Boklauth/AUTTT documentation built on Dec. 9, 2022, 7:37 a.m.