Learn R Programming

semTools (version 0.1-0)

moreFitIndices: Calculate more fit indices

Description

Calculate more fit indices that are not already provided in lavaan.

Usage

moreFitIndices(object, nPrior = 1)

Arguments

object
The lavaan model object provided after running the cfa or the sem functions.
nPrior
The sample size on which prior is based. This argument is used to compute BIC*.

Value

    1. nfi
    Normed Fit Index
  • ifi
  • Incremental Fit Index
  • gfi*
  • Gamma Hat
  • agfi*
  • Adjusted Gamma Hat
  • aicc
  • Corrected Akaike Information Criterion
  • ecvi
  • Expected Value of Cross-Validation Index
  • sic
  • Stochastic Information Criterion
  • bic*
  • Bayesian Information Criterion with specifying the prior sample size
  • hqc
  • Hannan-Quinn Information Criterion

Details

Normed Fit Index (nfi; West, Taylor, & Wu, 2012) is one of the relative fit indices which can be computed by $$nfi =\frac{\chi^{2}_{0} - \chi^{2}_{k}}{\chi^{2}_{0}},$$ where $\chi^{2}_{k}$ is the chi-square test statistic value of the target model, $\chi^{2}_{0}$ is the chi-square test statistic value of the null model. Incremental Fit Index (ifi; West, Taylor, & Wu, 2012) is one of the relative fit indices which can be computed by $$ifi =\frac{\chi^{2}_{0} - \chi^{2}_{k}}{\chi^{2}_{0} - df_{k}},$$ where $df_{k}$ is the degree of freedom when fitting the target model Gamma Hat (gfi*; West, Taylor, & Wu, 2012) is one of the relative fit indices which can be computed by $$gfi* =\frac{p}{p + 2 \times \frac{\chi^{2}_{k} - df_{k}}{N - 1}},$$ where $N$ is the sample size, $p$ is the number of variables in the model. Adjusted Gamma Hat (agfi*; West, Taylor, & Wu, 2012) is one of the relative fit indices which can be computed by $$agfi* = \left(1 - \frac{p \times (p + 1)}{2 \times df_{k}} \right) \times \left( 1 - gfi* \right) ,$$ Corrected Akaike Information Criterion (AICc; Burnham & Anderson, 2003) is the corrected version of aic for small sample size: $$aicc = f + \frac{2k(k + 1)}{N - k - 1},$$ where $f$ is the minimized discrepancy function, which is the product of the log likelihood and -2, and $k$ is the number of parameters in the target model. Expected Value of Cross-Validation Index (ECVI; West, Taylor, & Wu, 2012) is the average discrepancy in the fitted covariance matrices between two samples of equal sample size across all possible combinations of two samples from the same population: $$ecvi = f + \frac{2 \times k}{N},$$ Stochastic information criterion (sic; Preacher, 2006) is similar to aic or bic. This index will account for model complexity in the model's function form, in addition to the number of free parameters. sic can be computed by $$sic = \frac{1}{2}\left(f - \log{\det{I(\hat{\theta})}}\right),$$ where $I(\hat{\theta})$ is the information matrix of the parameters. Corrected Bayesian Information Criterion (BIC*; Kuha, 2004) is similar to bic but explicitly specifying the sample size on which the prior is based ($N_{prior}$). $$bicc = f + k\log{(1 + N/N_{prior})},$$ Hannan-Quinn Information Criterion (hqc; Hannan & Quinn, 1979) is used for model selection similar to aic or bic. $$hqc = f + 2k\log{(\log{N})},$$

References

Burnham, K., & Anderson, D. (2003). Model selection and multimodel inference: A practical-theoretic approach. New York, NY: Springer-Verlag. Kuha, J. (2004). AIC and BIC: Comparisons of assumptions and performance. Sociological Methods Research, 33, 188-229. Preacher, K. J. (2006). Quantifying parsimony in structural equation modeling. Multivariate Behavioral Research, 43, 227-259. West, S. G., Taylor, A. B., & Wu, W. (2012). Model fit and model selection in structural equation modeling. In R. H. Hoyle (Ed.), Handbook of Structural Equation Modeling. New York: Guilford.

Examples

Run this code
HS.model <- ' visual  =~ x1 + x2 + x3
              textual =~ x4 + x5 + x6
              speed   =~ x7 + x8 + x9 '

fit <- cfa(HS.model, data=HolzingerSwineford1939)
moreFitIndices(fit)

Run the code above in your browser using DataLab