
Last chance! 50% off unlimited learning
Sale ends in
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.
structure.list(nvars, f.list,f=NULL, f.labels = NULL, item.labels = NULL)
phi.list(nf,f.list, f.labels = NULL)
Number of variables in the design matrix
A list of items included in each factor (for structure.list, or the factors that correlate with the specified factor for phi.list
prefix for parameters -- needed in case of creating an X set and a Y set
Names for the factors
Item labels
Number of factors in the phi matrix
a matrix of factor loadings to model
This is almost self explanatory. See the examples.
structure.graph
for drawing it, or sim.structure
for creating this data structure.
# NOT RUN {
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
# }
Run the code above in your browser using DataLab