Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

popMisfitMACS

Find population misfit by sufficient statistics


Description

Find the value quantifying the amount of population misfit: F_0, RMSEA, and SRMR. See the definition of each index at summaryMisspec.

Usage

popMisfitMACS(paramM, paramCM, misspecM, misspecCM, dfParam=NULL, fit.measures="all")

Arguments

paramM

The model-implied mean from the real parameters

paramCM

The model-implied covariance matrix from the real parameters

misspecM

The model-implied mean from the real and misspecified parameters

misspecCM

The model-implied covariance matrix from the real and misspecified parameters

dfParam

The degree of freedom of the real model

fit.measures

The names of indices used to calculate population misfit. There are three types of misfit: 1) discrepancy function ("f0"; see popDiscrepancy), 2) root mean squared error of approximation ("rmsea"; Equation 12 in Browne & Cudeck, 1992), and 3) standardized root mean squared residual ("srmr")

Value

The vector of the misfit indices

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.

Examples

m1 <- rep(0, 3)
m2 <- c(0.1, -0.1, 0.05)
S1 <- matrix(c(1, 0.6, 0.5, 0.6, 1, 0.4, 0.5, 0.4, 1), 3, 3)
S2 <- matrix(c(1, 0.55, 0.55, 0.55, 1, 0.55, 0.55, 0.55, 1), 3, 3)
popMisfitMACS(m1, S1, m2, S2)

simsem

SIMulated Structural Equation Modeling

v0.5-16
GPL (>= 2)
Authors
Sunthud Pornprasertmanit [aut], Patrick Miller [aut], Alexander Schoemann [aut] (<https://orcid.org/0000-0002-8479-8798>), Terrence D. Jorgensen [aut, cre] (<https://orcid.org/0000-0001-5111-6773>), Corbin Quick [ctb]
Initial release
2021-03-28

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.