alrtest: Adjusted Likelihood Ratio Test of Nested Models

Description Usage Arguments Details Value References See Also

View source: R/adj_loglik_methods.R


alrtest is a helper function to simulate the functions lmtest::waldtest() and lmtest::lrtest() for adjusted chantrics objects. The method can be employed to compare nested models (see details).


alrtest(object, ...)



a chantrics object as returned from adj_loglik().


further object specifications (see details), as well as named parameters that will be passed to chandwich::compare_models(). The type of adjustment, out of "vertical", "cholesky", "spectral", "none", as specified in the parameter type, can also be specified here.


This function is a helper function that creates an interface to anova.chantrics() that is similar to lmtest::waldtest() and lmtest::lrtest().

The standard method is to compare the fitted model object object with the models in .... Instead of passing the fitted models into ..., other specifications are possible. Note that the types of specifications cannot be mixed, except between numerics/characters. The type of the second object supplied determines the algorithm used.

Then, the adjusted likelihood ratio test statistic (ALRTS), as described in Section 3.5 of Chandler and Bate (2007), is computed by anova.chantrics().

If a single unnamed object is passed in ..., sequential ANOVA is performed on object.


An object of class "anova" inheriting from class "data.frame". The columns are as follows:


The residual number of degrees of freedom in the model.


The increase in residual degrees of freedom with respect to the model in the row above.


The adjusted likelihood ratio statistic.


The p-value of the test that the model above is a "significantly better" model as the one in the current row.


R. E. Chandler and S. Bate, Inference for clustered data using the independence loglikelihood, Biometrika, 94 (2007), pp. 167–183. doi: 10.1093/biomet/asm015.

See Also

anova.chantrics() for the implementation of the computations of the test statistics.

lmtest::waldtest() and lmtest::lrtest() for syntax.

chantrics documentation built on Sept. 29, 2021, 9:08 a.m.