Extract information from a simulation result
Extract information from a simulation result
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 |
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 the getPopulation function)
"stdparam": Standardized parameter values (equivalent to the getPopulation function with std = TRUE)
"coef": Parameter estimates (equivalent to the coef 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 the summarySeed 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 the outfun argument from the sim function)
*"time": Time elapsed in running the simulation (equivalent to the summaryTime function)
*"converged": Convergence of each replication
The target information depending on the what argument
Sunthud Pornprasertmanit (psunthud@gmail.com)
SimResult for the object input
## 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)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.