Learn R Programming

simsem (version 0.4-6)

SimSem-class: Class "SimSem"

Description

The template containing data-generation and data-analysis specification

Arguments

Objects from the Class

Objects can be created by model.

See Also

  • Create an object this class by CFA, Path Analysis, or SEM model bymodel.

Examples

Run this code
showClass("SimSem")

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
LY <- bind(loading, loadingValues)
summary(LY)

latent.cor <- matrix(NA, 2, 2)
diag(latent.cor) <- 1
RPS <- binds(latent.cor, 0.5)

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

CFA.Model <- model(LY = LY, RPS = RPS, RTE = RTE, modelType="CFA")
summary(CFA.Model)

Run the code above in your browser using DataLab