Learn R Programming

simsem (version 0.2-8)

SimSet-class: Class "SimSet"

Description

Set of vectors and matrices that saves free parameters and parameter values (CFA, Path analysis, or SEM)

Arguments

Objects from the Class

Object can be created by simSetCFA, simSetPath, or simSetSEM, for CFA, Path analysis, or SEM model, respectively. Objects can be also created by calls of the form new("SimSet", ...).

See Also

  • Create an object this class by CFA, Path Analysis, or SEM model bysimSetCFA,simSetPath, orsimSetSEM, respectively.
  • See how to specify model misspecification bySimMisspec.

Examples

Run this code
showClass("SimSet")

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)
summary(LX)

latent.cor <- matrix(NA, 2, 2)
diag(latent.cor) <- 1
RPH <- symMatrix(latent.cor, 0.5)

# Error Correlation Object
error.cor <- matrix(0, 6, 6)
diag(error.cor) <- 1
RTD <- symMatrix(error.cor)

CFA.Model <- simSetCFA(LX = LX, RPH = RPH, RTD = RTD)
summary(CFA.Model)
#run(CFA.Model)

CFA.Model2 <- extract(CFA.Model, y=1:3, e=1)
summary(CFA.Model2)

Run the code above in your browser using DataLab