alrtest {chantrics}R Documentation

Adjusted Likelihood Ratio Test of Nested Models

Description

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).

Usage

alrtest(object, ...)

Arguments

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.

Details

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.

Value

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

Resid.df

The residual number of degrees of freedom in the model.

df

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

ALRTS

The adjusted likelihood ratio statistic.

Pr(>ALRTS)

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

References

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.


[Package chantrics version 1.0.0 Index]