Likelihood-ratio tests of the parallel-regression assumption
Source:R/extensions.R
parallel_test.RdFor every outcome-equation term currently held parallel, fits the model with that term's effect made category-specific and reports the likelihood-ratio test of the parallel restriction (the likelihood-based counterpart of the Brant test), together with the omnibus test that relaxes every term at once. Works for all four models; in inflated models the inflation equation is unchanged.
Value
A data frame of class "parallel_test": one row per term plus an
all terms row, with LR, df, p.value, and the log-likelihood of the
relaxed fit.
See also
lr_test(), the parallel argument of oprobit()
Other model comparison:
classification(),
compare_models(),
inflation_test(),
lr_test(),
split_test(),
vuong()
Examples
set.seed(1)
d <- riop(700, beta = c(0.8, -0.5), tau = c(-0.6, 0.4, 1.3))
parallel_test(ologit(y ~ x1 + x2, d))
#> Likelihood-ratio tests of the parallel-regression assumption (relax one term at a time; last row relaxes all)
#> term LR df p.value logLik
#> x1 1.132 2 0.568 -761.07
#> x2 0.508 2 0.776 -761.38
#> all terms 1.430 4 0.839 -760.92
## automatic relaxation: the steps are stored on the fit
m_auto <- ologit(y ~ x1 + x2, d, parallel = "auto")
m_auto$autofit$relaxed
#> character(0)