Learn R Programming

simsem (version 0.2-8)

SimModelOut-class: Class "SimModelOut"

Description

This class will save the analysis results from a single analysis.

Arguments

Objects from the Class

Objects can be created by run on the SimModel. It can also be called from the form new("SimModelOut", ...).

Methods

  • summaryTo summarize the object
  • summaryParamTo summarize only parameter estimates, standard errors, and significance
  • createImpliedMACSTo create the model implied means and covariance matrix from the parameter estimates
  • anovafind the averages of model fit statistics and indices for nested models, as well as the differences of model fit indices among models. This function requires at least twoSimModelOutobjects. Seeanovafor further details.
  • summaryPopulationto summarize the data generation population underlying the analysis.
  • getPopulationto extract the data generation population underlying the data used in the analysis.
  • setPopulationto put the appropriate data generation model into the analysis result. If the appropriate data generation model is put (the same model as the analysis model), the covarage of population by a confidence interval will be able to be calculated by thesummaryfunction. The first argument is the result object. The second argument can be either a matrix set of parameters orSimSetof the population. See the 'modeling with covariate' in the manual for an example.

See Also

  • SimModelfor analysis model

Examples

Run this code
showClass("SimModelOut")
loading <- matrix(0, 6, 1)
loading[1:6, 1] <- NA
LX <- simMatrix(loading, 0.7)
RPH <- symMatrix(diag(1))
RTD <- symMatrix(diag(6))
CFA.Model <- simSetCFA(LY = LX, RPS = RPH, RTE = RTD)
SimData <- simData(CFA.Model, 500)
SimModel <- simModel(CFA.Model)
Data <- run(SimData)
Result <- run(SimModel, Data)
summary(Result)
summaryParam(Result)
summaryPopulation(Result)
param <- getPopulation(Result)
Result2 <- setPopulation(Result, param)
Result3 <- setPopulation(Result, CFA.Model)

Run the code above in your browser using DataLab