File: moreFitIndices.Rd

package info (click to toggle)
r-cran-semtools 0.5.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,204 kB
  • sloc: makefile: 2
file content (211 lines) | stat: -rw-r--r-- 8,967 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fitIndices.R
\name{moreFitIndices}
\alias{moreFitIndices}
\title{Calculate more fit indices}
\usage{
moreFitIndices(object, fit.measures = "all", nPrior = 1)
}
\arguments{
\item{object}{The lavaan model object provided after running the \code{cfa},
\code{sem}, \code{growth}, or \code{lavaan} functions.}

\item{fit.measures}{Additional fit measures to be calculated. All additional
fit measures are calculated by default}

\item{nPrior}{The sample size on which prior is based. This argument is used
to compute \code{bic.priorN}.}
}
\value{
A \code{numeric} \code{lavaan.vector} including any of the
following requested via \verb{fit.measures=}
\enumerate{
\item \code{gammaHat}: Gamma-Hat
\item \code{adjGammaHat}: Adjusted Gamma-Hat
\item \code{baseline.rmsea}: RMSEA of the default baseline (i.e., independence) model
\item \code{gammaHat.scaled}: Gamma-Hat using scaled \eqn{\chi^2}
\item \code{adjGammaHat.scaled}: Adjusted Gamma-Hat using scaled \eqn{\chi^2}
\item \code{baseline.rmsea.scaled}: RMSEA of the default baseline (i.e.,
independence) model using scaled \eqn{\chi^2}
\item \code{aic.smallN}: Corrected (for small sample size) AIC
\item \code{bic.priorN}: BIC with specified prior sample size
\item \code{spbic}: Scaled Unit-Information Prior BIC (SPBIC)
\item \code{hbic}: Haughton's BIC (HBIC)
\item \code{ibic}: Information-matrix-based BIC (IBIC)
\item \code{sic}: Stochastic Information Criterion (SIC)
\item \code{hqc}: Hannan-Quinn Information Criterion (HQC)
\item \code{icomp}: Bozdogan Information Complexity (ICOMP) Criteria
}
}
\description{
Calculate more fit indices that are not already provided in lavaan.
}
\details{
See \code{\link[=nullRMSEA]{nullRMSEA()}} for the further details of the computation of
RMSEA of the null model.

Gamma-Hat (\code{gammaHat}; West, Taylor, & Wu, 2012) is a global
goodness-of-fit index which can be computed (assuming equal number of
indicators across groups) by

\deqn{ \hat{\Gamma} =\frac{p}{p + 2 \times \frac{\chi^{2}_{k} - df_{k}}{N}},}

where \eqn{p} is the number of variables in the model, \eqn{\chi^{2}_{k}} is
the \eqn{\chi^2} test statistic value of the target model, \eqn{df_{k}} is
the degree of freedom when fitting the target model, and \eqn{N} is the
sample size (or sample size minus the number of groups if \code{mimic} is
set to \code{"EQS"}).

Adjusted Gamma-Hat (\code{adjGammaHat}; West, Taylor, & Wu, 2012) is a
global fit index which can be computed by

\deqn{ \hat{\Gamma}_\textrm{adj} = \left(1 - \frac{K \times p \times
  (p + 1)}{2 \times df_{k}} \right) \times \left( 1 - \hat{\Gamma} \right),}

where \eqn{K} is the number of groups (please refer to Dudgeon, 2004, for
the multiple-group adjustment for \code{adjGammaHat}).

Note that if Satorra--Bentler's or Yuan--Bentler's method is used, the fit
indices using the scaled \eqn{\chi^2} values are also provided.

The remaining indices are information criteria calculated using the
\code{object}'s \eqn{-2 \times} log-likelihood, abbreviated \eqn{-2LL}.

Corrected Akaike Information Criterion (\code{aic.smallN}; Burnham &
Anderson, 2003) is a corrected version of AIC for small sample size, often
abbreviated AICc:

\deqn{ \textrm{AIC}_{\textrm{small}-N} = AIC + \frac{2q(q + 1)}{N - q - 1},}

where \eqn{AIC} is the original AIC: \eqn{-2LL + 2q} (where \eqn{q}
= the number of estimated parameters in the target model). Note that AICc is
a small-sample correction derived for univariate regression models, so it is
probably \emph{not} appropriate for comparing SEMs.

Corrected Bayesian Information Criterion (\code{bic.priorN}; Kuha, 2004) is
similar to BIC but explicitly specifying the sample size on which the prior
is based (\eqn{N_{prior}}) using the \code{nPrior} argument.

\deqn{ \textrm{BIC}_{\textrm{prior}-N} = -2LL + q\log{( 1 + \frac{N}{N_{prior}} )}.}

Bollen et al. (2012, 2014) discussed additional BICs that incorporate more
terms from a Taylor series expansion, which the standard BIC drops.  The
"Scaled Unit-Information Prior" BIC is calculated depending on whether the
product of the vector of estimated model parameters (\eqn{\hat{\theta}}) and
the observed information matrix (FIM) exceeds the number of estimated model
parameters (Case 1) or not (Case 2), which is checked internally:

\deqn{ \textrm{SPBIC}_{\textrm{Case 1}} = -2LL + q(1 - \frac{q}{\hat{\theta}^{'} \textrm{FIM} \hat{\theta}}), \textrm{ or}}
\deqn{ \textrm{SPBIC}_{\textrm{Case 2}} = -2LL + \hat{\theta}^{'} \textrm{FIM} \hat{\theta},}

Note that this implementation of SPBIC is calculated on the assumption that
priors for all estimated parameters are centered at zero, which is
inappropriate for most SEMs (e.g., variances should not have priors centered
at the lowest possible value; Bollen, 2014, p. 6).

Bollen et al. (2014, eq. 14) credit the HBIC to Haughton (1988):

\deqn{ \textrm{HBIC} = -2LL + q\log{\frac{N}{2 \pi}}.}

Bollen et al. (2012, p. 305) proposed the information matrix (\eqn{I})-based BIC by
adding another term:

\deqn{ \textrm{IBIC} = -2LL + q\log{\frac{N}{2 \pi}} + \log{\det{\textrm{FIM}}},}

or equivalently, using the inverse information (the asymptotic sampling
covariance matrix of estimated parameters: ACOV):

\deqn{ \textrm{IBIC} = -2LL - q\log{2 \pi} - \log{\det{\textrm{ACOV}}}.}

Stochastic information criterion (SIC; see Preacher, 2006, for details) is
similar to IBIC but does not include the \eqn{q\log{2 \pi}} term that is
also in HBIC.  SIC and IBIC both account for model complexity in a model's
functional form, not merely the number of free parameters.  The SIC can be
computed as:

\deqn{ \textrm{SIC} = -2LL + q\log{N} + \log{\det{\textrm{FIM}}} = -2LL - \log{\det{\textrm{ACOV}}}.}

Hannan--Quinn Information Criterion (HQC; Hannan & Quinn, 1979) is used for
model selection, similar to AIC or BIC.

\deqn{ \textrm{HQC} = -2LL + 2q\log{(\log{N})},}

Bozdogan Information Complexity (ICOMP) Criteria (Howe et al., 2011),
instead of penalizing the number of free parameters directly,
ICOMP penalizes the covariance complexity of the model.

\deqn{ \textrm{ICOMP} = -2LL + s \times log(\frac{\bar{\lambda_a}}{\bar{\lambda_g}}) }
}
\examples{

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

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

fit2 <- cfa(HS.model, data = HolzingerSwineford1939, estimator = "mlr")
moreFitIndices(fit2)

}
\references{
Bollen, K. A., Ray, S., Zavisca, J., & Harden, J. J. (2012). A comparison of
Bayes factor approximation methods including two new methods.
\emph{Sociological Methods & Research, 41}(2), 294--324.
\doi{10.1177/0049124112452393}

Bollen, K. A., Harden, J. J., Ray, S., & Zavisca, J. (2014). BIC and
alternative Bayesian information criteria in the selection of structural
equation models. \emph{Structural Equation Modeling, 21}(1), 1--19.
\doi{10.1080/10705511.2014.856691}

Burnham, K., & Anderson, D. (2003). \emph{Model selection and
multimodel inference: A practical--theoretic approach}. New York, NY:
Springer--Verlag.

Dudgeon, P. (2004). A note on extending Steiger's (1998) multiple sample
RMSEA adjustment to other noncentrality parameter-based statistic.
\emph{Structural Equation Modeling, 11}(3), 305--319.
\doi{10.1207/s15328007sem1103_1}

Howe, E. D., Bozdogan, H., & Katragadda, S. (2011). Structural equation
modeling (SEM) of categorical and mixed-data using the novel Gifi
transformations and information complexity (ICOMP) criterion.
\emph{Istanbul University Journal of the School of Business Administration, 40}(1), 86--123.

Kuha, J. (2004). AIC and BIC: Comparisons of assumptions and performance.
\emph{Sociological Methods Research, 33}(2), 188--229.
\doi{10.1177/0049124103262065}

Preacher, K. J. (2006). Quantifying parsimony in structural equation
modeling. \emph{Multivariate Behavioral Research, 43}(3), 227--259.
\doi{10.1207/s15327906mbr4103_1}

West, S. G., Taylor, A. B., & Wu, W. (2012). Model fit and model selection
in structural equation modeling. In R. H. Hoyle (Ed.), \emph{Handbook of
structural equation modeling} (pp. 209--231). New York, NY: Guilford.
}
\seealso{
\itemize{
\item \code{\link[=miPowerFit]{miPowerFit()}} For the modification indices and their
power approach for model fit evaluation
\item \code{\link[=nullRMSEA]{nullRMSEA()}} For RMSEA of the default independence model
}
}
\author{
Sunthud Pornprasertmanit (\email{psunthud@gmail.com})

Terrence D. Jorgensen (University of Amsterdam; \email{TJorgensen314@gmail.com})

Aaron Boulton (University of Delaware)

Ruben Arslan (Humboldt-University of Berlin, \email{rubenarslan@gmail.com})

Yves Rosseel (Ghent University; \email{Yves.Rosseel@UGent.be})

Mauricio Garnier-Villarreal (Vrije Universiteit Amsterdam; \email{mgv@pm.me})

A great deal of feedback was provided by Kris Preacher regarding Bollen et
al.'s (2012, 2014) extensions of BIC.
}