inspect {simsem} | R Documentation |
Extract information from a simulation result
Description
Extract information from a simulation result
Arguments
object |
The target |
what |
The target component to be extracted. Please see details below. |
improper |
Specify whether to include the information from the replications with improper solutions |
nonconverged |
Specify whether to include the information from the nonconvergent replications |
Details
Here are the list of information that can be specified in the what
argument. The items starting with * are the information that the improper
and nonconverged
arguments are not applicable.
*
"modeltype"
: The type of the simulation result*
"nrep"
: The number of overall replications, including converged and nonconverged replications-
"param"
: Parameter values (equivalent to thegetPopulation
function) -
"stdparam"
: Standardized parameter values (equivalent to thegetPopulation
function withstd = TRUE
) -
"coef"
: Parameter estimates (equivalent to thecoef
method) -
"se"
: Standard errors -
"fit"
: Fit indices -
"misspec"
: Misspecified parameter values -
"popfit"
: Population misfit -
"fmi1"
: Fraction missings type 1 -
"fmi2"
: Fraction missings type 2 -
"std"
: Standardized Parameter Estimates -
"stdse"
: Standard Errors of Standardized Values -
"cilower"
: Lower bounds of confidence intervals -
"ciupper"
: Upper bounds of confidence intervals -
"ciwidth"
: Widths of confidence intervals *
"seed"
: Seed number (equivalent to thesummarySeed
function)-
"ngroup"
: Sample size of each group -
"ntotal"
: Total sample size -
"mcar"
: Percent missing completely at random -
"mar"
: Percent missing at random -
"extra"
: Extra output from theoutfun
argument from thesim
function) *
"time"
: Time elapsed in running the simulation (equivalent to thesummaryTime
function)*
"converged"
: Convergence of each replication
Value
The target information depending on the what
argument
Author(s)
Sunthud Pornprasertmanit (psunthud@gmail.com)
See Also
SimResult
for the object input
Examples
## Not run:
loading <- matrix(0, 6, 2)
loading[1:3, 1] <- NA
loading[4:6, 2] <- NA
LY <- bind(loading, 0.7)
latent.cor <- matrix(NA, 2, 2)
diag(latent.cor) <- 1
RPS <- binds(latent.cor, 0.5)
RTE <- binds(diag(6))
VY <- bind(rep(NA,6),2)
CFA.Model <- model(LY = LY, RPS = RPS, RTE = RTE, modelType = "CFA")
# In reality, more than 5 replications are needed.
Output <- sim(5, CFA.Model, n=200)
inspect(Output, "coef")
inspect(Output, "param")
inspect(Output, "se", improper = TRUE, nonconverged = TRUE)
## End(Not run)