Skip to contents

For pairs in which the restricted model is an interior special case of the full one: a parallel vs a (partially) non-parallel fit of the same model, or an uncorrelated inflated probit vs its correlated version (\(\rho = 0\)). Not appropriate for an ordered vs an inflated ordered comparison, where the restriction sits at infinity; use vuong() / inflation_test() there.

Usage

lr_test(restricted, full)

Arguments

restricted, full

Two "iord" objects on the same data; full must have the larger log-likelihood and more parameters.

Value

A data frame with the statistic, degrees of freedom, and p-value, of class "lr_test".

Examples

set.seed(4)
d <- riop(500, beta = c(0.8, -0.5), tau = c(-0.6, 0.7))
lr_test(ologit(y ~ x1 + x2, d), ologit(y ~ x1 + x2, d, parallel = FALSE))
#> Likelihood-ratio test
#>   LR = 0.0116 on 2 df, p = 0.9942