Compares an inflated ordered fit with the plain ordered model of the same
link on the same design (refit internally), reporting the Vuong test with
its AIC and BIC corrections, the information criteria, and – with
boot > 0 – a parametric-bootstrap likelihood-ratio test.
Arguments
- object
An
"iop"or"iol"fit.- boot
Number of parametric-bootstrap replications for the likelihood-ratio test (0, the default, skips it). Each replication refits both models, so the cost is
bootinflated fits and grows with the sample size (a few minutes forbpwithboot = 199on one core; tens of minutes for samples of several thousand rows): usecores =to parallelize. A seed set before the call (set.seed()) makes the replications reproducible; sequential and parallel runs use different random streams. The simulated data sets are drawn independently from the fitted ordered model; acluster =structure of the fit is not reproduced in the reference distribution.- cores
Number of parallel workers for the bootstrap refits.
Value
A list of class "inflation_test" with the Vuong table (vuong),
the log-likelihoods and information criteria of both models (fit), the
inflated-category share, and – with boot > 0 – lr (the observed
statistic, the bootstrap p-value, the number of replications, and the
bootstrap statistics).
Details
The plain ordered model is the limit of the inflated one as the
inflation intercept tends to infinity, a point on the boundary of the
parameter space, so the classical chi-squared reference for the
likelihood-ratio statistic does not apply (Andrews 2001). The applied
literature has used the Vuong (1989) test for this comparison (Harris and
Zhao 2007; Bagozzi et al. 2015), which is what vuong reports; Wilson
(2015) and Dale and Sirchenko (2021) object that the two models are
nested (the Vuong z-test is derived for non-nested or overlapping
models), and Dale and Sirchenko's Monte Carlo finds the information
criteria the most reliable selectors. The parametric bootstrap sidesteps
the boundary problem directly: boot data sets are simulated from the
fitted plain ordered model, both models are refit on each, and the
p-value is the share of bootstrap likelihood-ratio statistics at least as
large as the observed one (with the +1 correction). It is exact up to
simulation error under the null and costs boot inflated refits; 199
is a reasonable default for a reported test. Not available for
random-intercept fits.
References
Andrews, D.W.K. (2001). Testing when a parameter is on the boundary of the maintained hypothesis. Econometrica, 69, 683-734. Wilson, P. (2015). The misuse of the Vuong test for non-nested models to test for zero-inflation. Economics Letters, 127, 51-53. Dale, D. and Sirchenko, A. (2021). Estimation of nested and zero-inflated ordered probit models. Stata Journal, 21, 3-38.
See also
vuong(), lr_test(), split_test()
Other model comparison:
classification(),
compare_models(),
lr_test(),
parallel_test(),
split_test(),
vuong()
Examples
set.seed(5)
d <- riop(700, beta = c(0.8, -0.5), tau = c(-0.6, 0.7), gamma = c(0.3, 1), inflate = "top")
m <- iop(y ~ x1 + x2 | z1, d, inflate = "top")
inflation_test(m)
#> Inflation test: inflated category "2" (observed share 0.587)
#>
#> model logLik df AIC BIC
#> Inflated ordered probit (inflated category: 2) -530.82 6 1073.63 1100.94
#> Ordered probit (uninflated) -630.75 4 1269.49 1287.70
#>
#> Vuong test, inflated vs uninflated (positive favors the inflated model):
#> correction statistic p_inflated_better p_ordered_better p_two_sided
#> raw 7.967 0 1 0
#> AIC 7.808 0 1 0
#> BIC 7.445 0 1 0
#> (The plain model is nested at the boundary of the inflated one, so the Vuong test is contested for this comparison; for a reported test add the parametric-bootstrap LR with boot = 199 or more.)
# \donttest{
inflation_test(m, boot = 99) # parametric-bootstrap likelihood-ratio test
#> Inflation test: inflated category "2" (observed share 0.587)
#>
#> model logLik df AIC BIC
#> Inflated ordered probit (inflated category: 2) -530.82 6 1073.63 1100.94
#> Ordered probit (uninflated) -630.75 4 1269.49 1287.70
#>
#> Vuong test, inflated vs uninflated (positive favors the inflated model):
#> correction statistic p_inflated_better p_ordered_better p_two_sided
#> raw 7.967 0 1 0
#> AIC 7.808 0 1 0
#> BIC 7.445 0 1 0
#>
#> Parametric-bootstrap likelihood-ratio test (null: the plain ordered model; 99 of 99 replications):
#> LR = 199.860, bootstrap p = 0.01
# }