The fitted models must be of a class for which there is a logLik
method (e.g., `secr' or `lm'). Check with methods("logLik")
.
The models must be nested (no check is performed - this is up to the
user), but either model1 or model2 may be the more general model.
The models must also be compatible by the criteria of AICcompatible
.
The test statistic is twice the difference of the maximized
likelihoods. It is compared to a chi-square distribution with df equal
to the number of extra parameters in the more complex model.