Learn R Programming

simsem (version 0.2-8)

SimModel-class: Class "SimModel"

Description

This class will save information for analysis model and be ready for data analysis.

Arguments

Objects from the Class

Objects can be created by simModel. It can also be called by new("SimModel", ...).

See Also

  • simModelfor the constructor of this class.
  • SimEqualConfor specifying equality constraints.

Examples

Run this code
showClass("SimModel")
loading <- matrix(0, 6, 2)
loading[1:3, 1] <- NA
loading[4:6, 2] <- NA
loadingValues <- matrix(0, 6, 2)
loadingValues[1:3, 1] <- 0.7
loadingValues[4:6, 2] <- 0.7
LX <- simMatrix(loading, loadingValues)
latent.cor <- matrix(NA, 2, 2)
diag(latent.cor) <- 1
RPH <- symMatrix(latent.cor, 0.5)
error.cor <- matrix(0, 6, 6)
diag(error.cor) <- 1
RTD <- symMatrix(error.cor)
CFA.Model <- simSetCFA(LX = LX, RPH = RPH, RTD = RTD)
SimModel <- simModel(CFA.Model)
summary(SimModel)

Run the code above in your browser using DataLab