Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

structure.list

Create factor model matrices from an input list


Description

When creating a structural diagram or a structural model, it is convenient to not have to specify all of the zero loadings in a structural matrix. structure.list converts list input into a design matrix. phi.list does the same for a correlation matrix. Factors with NULL values are filled with 0s.

Usage

structure.list(nvars, f.list,f=NULL, f.labels = NULL, item.labels = NULL)
phi.list(nf,f.list, f.labels = NULL)

Arguments

nvars

Number of variables in the design matrix

f.list

A list of items included in each factor (for structure.list, or the factors that correlate with the specified factor for phi.list

f

prefix for parameters – needed in case of creating an X set and a Y set

f.labels

Names for the factors

item.labels

Item labels

nf

Number of factors in the phi matrix

Details

This is almost self explanatory. See the examples.

Value

factor.matrix

a matrix of factor loadings to model

See Also

structure.graph for drawing it, or sim.structure for creating this data structure.

Examples

fx <- structure.list(9,list(F1=c(1,2,3),F2=c(4,5,6),F3=c(7,8,9)))
fy <- structure.list(3,list(Y=c(1,2,3)),"Y")
phi <- phi.list(4,list(F1=c(4),F2=c(1,4),F3=c(2),F4=c(1,2,3)))
fx
phi
fy

psych

Procedures for Psychological, Psychometric, and Personality Research

v2.1.3
GPL (>= 2)
Authors
William Revelle [aut, cre] (<https://orcid.org/0000-0003-4880-9610>)
Initial release
2021-03-21

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.