For every term of the model, tests that its coefficients are zero in all
equations at once: the Wald form from the fitted covariance, or the
likelihood-ratio form by refitting without the term (Stata's mlogtest, wald and lr). For a generic coefficient on an alternative-specific
covariate the test has one degree of freedom. The terms are those of the
outcome equations; for an inflated model the split-equation coefficients
are not included (test them by lr_test() between two imnl() fits that
differ in the split equation, or from the infl_ rows of
summary.choicemodel()).
Usage
term_test(object, type = c("wald", "lr"))Details
The likelihood-ratio form works as follows:
The model without the term is fitted as the estimators fit a model, multistart and saddle step included, so that both log-likelihoods are maxima; a warning says when that fit did not converge or still stops at a saddle.
For a maximum-likelihood fit of separated data (
mnl(),rologit()without unit fixed effects or inflation), it compares the suprema of the log-likelihoods, not where the optimizer stopped (seelr_test()). The method line says so.For a penalized fit (
firth = TRUEor a prior), it is the penalized likelihood ratio: the term's coefficients are set to zero in the full model's penalized log-likelihood.
The Wald form of a penalized fit uses the penalized estimates and their
covariance; for a separated coefficient it can be far off (see
summary.choicemodel()).
The likelihood-ratio form assumes independent cases (a fit's cluster does not enter it); the Wald form uses the fit's covariance, cluster-robust when the fit has one.
See also
Other specification tests:
captivity_test(),
combine_test(),
hl_test(),
rank_test()