summaryMisspec {simsem} | R Documentation |
Provide summary of the population misfit and misspecified-parameter values across replications
Description
This function provides the summary of the population misfit and misspecified-parameter values across replications. The summary will be summarized for the convergent replications only.
Usage
summaryMisspec(object, improper = TRUE)
Arguments
object |
|
improper |
If TRUE, include the replications that provided improper solutions |
Value
A data frame that provides the summary of population misfit and misspecified-parameter values imposed on the real parameters.
The discrepancy value (; Browne & Cudeck, 1992) is calculated by
where is the model-implied mean from the real parameters,
is the model-implied covariance matrix from the real parameters,
is the model-implied mean from the real and misspecified parameters,
is the model-implied covariance matrix from the real and misspecified parameter, p is the number of indicators. For the multiple groups, the resulting
value is the sum of this value across groups.
The root mean squared error of approximation (rmsea) is calculated by
where is the degree of freedom in the real model.
The standardized root mean squared residual (srmr) can be calculated by
where is the observed covariance between indicators i and j in group g,
is the model-implied covariance between indicators i and j in group g, p is the number of indicators.
Author(s)
Sunthud Pornprasertmanit (psunthud@gmail.com)
References
Browne, M. W., & Cudeck, R. (1992). Alternative ways of assessing model fit. Sociological Methods & Research, 21, 230-258.
See Also
SimResult
for the object input
Examples
## Not run:
path <- matrix(0, 4, 4)
path[3, 1:2] <- NA
path[4, 3] <- NA
pathVal <- matrix("", 4, 4)
pathVal[3, 1:2] <- "runif(1, 0.3, 0.5)"
pathVal[4, 3] <- "runif(1, 0.5, 0.7)"
pathMis <- matrix(0, 4, 4)
pathMis[4, 1:2] <- "runif(1, -0.1, 0.1)"
BE <- bind(path, pathVal, pathMis)
residual.error <- diag(4)
residual.error[1,2] <- residual.error[2,1] <- NA
RPS <- binds(residual.error, "rnorm(1, 0.3, 0.1)")
Path.Model <- model(RPS = RPS, BE = BE, modelType="Path")
# The number of replications in actual analysis should be much more than 5
ParamObject <- sim(5, n=200, Path.Model)
# Summarize the model misspecification that is specified in the 'pathMis' object
summaryMisspec(ParamObject)
## End(Not run)