SimResult-class {simsem}R Documentation

Class "SimResult": Simulation Result Object

Description

This class will save data analysis results from multiple replications, such as fit indices cutoffs or power, parameter values, model misspecification, etc.

Objects from the Class

Objects can be created by sim.

Slots

modelType:

Analysis model type (CFA, Path, or SEM)

nRep:

Number of replications have been created and run simulated data.

coef:

Parameter estimates from each replication

se:

Standard errors of parameter estimates from each replication

fit:

Fit Indices values from each replication

converged:

The convergence status of each replication: 0 = convergent, 1 = not convergent, 2 = nonconvergent in multiple imputed results, 3 = improper solutions for SE (less than 0 or NA), 4 = converged with improper solution for latent or observed (residual) covariance matrix (i.e., nonpositive definite, possible due to a Heywood case). For multiple imputations, these codes are applied when the proporion of imputed data sets with that characteristic is below the convergentCutoff threshold (see linkS4class{SimMissing}). For OpenMx analyses only, a code "7" indicates Optimal estimates could not be obtained ("Status 6" in OpenMx).

seed:

integer used to set the seed for the L'Ecuyer-CMRG pseudorandom number generator.

paramValue:

Population model underlying each simulated dataset.

stdParamValue:

Standardized parameters of the population model underlying each simulated dataset.

paramOnly:

If TRUE, the result object saves only population characteristics and do not save sample characteristics (e.g., parameter estimates and standard errors.

misspecValue:

Misspecified-parameter values that are imposed on the population model in each replication.

popFit:

The amount of population misfit. See details at summaryMisspec

FMI1:

Fraction Missing Method 1.

FMI2:

Fraction Missing Method 2.

cilower:

Lower bounds of confidence interval.

ciupper:

Upper bounds of confidence interval.

stdCoef:

Standardized coefficients from each replication

stdSe:

Standard Errors of Standardized coefficients from each replication

n:

The total sample size of the analyzed data.

nobs:

The sample size within each group.

pmMCAR:

Percent missing completely at random.

pmMAR:

Percent missing at random.

extraOut:

Extra outputs obtained from running the function specified in outfun argument in the sim function.

timing:

Time elapsed in each phase of the simulation.

Methods

The following methods are listed alphabetically. More details can be found by following the link of each method.

Author(s)

Sunthud Pornprasertmanit (psunthud@gmail.com)

See Also

Examples

showClass("SimResult")
loading <- matrix(0, 6, 1)
loading[1:6, 1] <- NA
LY <- bind(loading, 0.7)
RPS <- binds(diag(1))
RTE <- binds(diag(6))
CFA.Model <- model(LY = LY, RPS = RPS, RTE = RTE, modelType="CFA")

# We make the examples running only 5 replications to save time.
# In reality, more replications are needed.
Output <- sim(5, n=500, CFA.Model)

# Summary the simulation result
summary(Output)

# Short summary of the simulation result
summaryShort(Output)

# Find the fit index cutoff
getCutoff(Output, 0.05)

# Summary of parameter estimates
summaryParam(Output)

# Summary of population parameters
summaryPopulation(Output)

[Package simsem version 0.5-16 Index]