Arguments model1 and model2 should be objects
of class that has implementations of
logLik and
nobs methods. It is assumed that either model1
is nested into model2 or vice versa. More precisely it is assumed
that the model with smaller log-likelihood value is nested into the model
with greater log-likelihood value.
Arguments model1 and model2 may be the lists of models.
If model1 is a list of models then it is assumed that the number
of degrees of freedom and log-likelihood of the first model are just a sum
of degrees of freedom and log-likelihoods of the models in this list.
Similarly for model2.
If model1 or model2 is a list then the number of observations
of the associated models are calculated as the sum of the numbers of
observations of the models in corresponding lists.
However sometimes it may be misleading. For example, when bivariate probit
model (full) is tested against two independent probit models (restricted).
Then it will be assumed that the number of observations in the restricted
model is twice the number of observations in the full model that is not the
case.
Fortunately it will not affect the results of the likelihood ratio test.