summaryMisspec: Provide summary of the population misfit and...

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/summarySimResult.R

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

1
summaryMisspec(object, improper = TRUE)

Arguments

object

SimResult object being described

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 (f_0; Browne & Cudeck, 1992) is calculated by

F_0 = tr≤ft( \tilde{Σ} Σ^{-1} \right) - \log{≤ft| \tilde{Σ} Σ^{-1} \right|} - p + ≤ft( \tilde{μ} - μ \right)^{\prime} Σ^{-1} ≤ft( \tilde{μ} - μ \right).

where μ is the model-implied mean from the real parameters, Σ is the model-implied covariance matrix from the real parameters, \tilde{μ} is the model-implied mean from the real and misspecified parameters, \tilde{Σ} is the model-implied covariance matrix from the real and misspecified parameter, p is the number of indicators. For the multiple groups, the resulting f_0 value is the sum of this value across groups.

The root mean squared error of approximation (rmsea) is calculated by

rmsea = √{\frac{f_0}{df}}

where df is the degree of freedom in the real model.

The standardized root mean squared residual (srmr) can be calculated by

srmr = √{\frac{2∑_{g} ∑_{i} ∑_{j ≤ i} ≤ft( \frac{s_{gij}}{√{s_{gii}}√{s_{gjj}}} - \frac{\hat{σ}_{gij}}{√{\hat{σ}_{gii}}√{\hat{σ}_{gjj}}} \right)}{g \times p(p + 1)}}

where s_{gij} is the observed covariance between indicators i and j in group g, \hat{σ}_{ij} 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## 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)

simsem documentation built on March 29, 2021, 1:07 a.m.