Learn R Programming

psychonetrics (version 0.17.8)

simplestructure: Generate factor loadings matrix with simple structure

Description

This function generates the input for lambda arguments in latent variable models using a simple structure. The input is a vector with an element for each variable indicating the factor the variable loads on.

Usage

simplestructure(x)

Value

A binary lambda (factor loadings) matrix with one row per indicator and one column per factor, with a 1 in each cell where the indicator loads on the factor and 0 otherwise.

Arguments

x

A vector indicating which factor each indicator loads on.

Author

Sacha Epskamp <mail@sachaepskamp.com>