Learn R Programming

simsem (version 0.2-8)

SimResultParam-class: Class "SimResultParam"

Description

The parameter result object that represents the parameter values used in each replication in a simulation study. This object saves the parameter values and model misspecification of each replication and is able to summarize the population misfits.

Arguments

Objects from the Class

Object can be created by simResultParam, Objects can be also created by calls of the form new("SimResultParam", ...).

See Also

  • simResultParamfor the constructor this class
  • SimSetfor the specification of model parameter
  • SimMisspecfor the specification of misspecified parameter
  • SimEqualConfor the specification of the equality constraints

Examples

Run this code
showClass("SimResultParam")

u35 <- simUnif(0.3, 0.5)
u57 <- simUnif(0.5, 0.7)
u1 <- simUnif(-0.1, 0.1)
n31 <- simNorm(0.3, 0.1)

path.BE <- matrix(0, 4, 4)
path.BE[3, 1:2] <- NA
path.BE[4, 3] <- NA
starting.BE <- matrix("", 4, 4)
starting.BE[3, 1:2] <- "u35"
starting.BE[4, 3] <- "u57"
BE <- simMatrix(path.BE, starting.BE)

residual.error <- diag(4)
residual.error[1,2] <- residual.error[2,1] <- NA
RPS <- symMatrix(residual.error, "n31")

ME <- simVector(rep(NA, 4), 0)

Path.Model <- simSetPath(RPS = RPS, BE = BE, ME = ME)

mis.path.BE <- matrix(0, 4, 4)
mis.path.BE[4, 1:2] <- NA
mis.BE <- simMatrix(mis.path.BE, "u1")
Path.Mis.Model <- simMisspecPath(BE = mis.BE, misfitType="rmsea") #, misfitBound=c(0.05, 0.08))

# The number of replications in actual analysis should be much more than 5
ParamObject <- simResultParam(5, Path.Model, Path.Mis.Model)
summary(ParamObject)

Run the code above in your browser using DataLab