Learn R Programming

datana (version 1.0.6)

lrt: Computes a likelihood ratio test between a reduced model and a full model

Description

Computes a likelihood ratio test between a reduced model (modr) and a full model (modf). Both models must be previously fitted by maximum likelihood.

Usage

lrt(modr, modf)

Value

This function returns an object having the following elements: "loglik.Modr" maximized log-likelihood of modr; "loglik.Modf" maximized log-likelihood of modf; "dif.loglik" difference in log-likelihood between both models, and "dif.df" difference in degrees of freedong of both models, and "p-value" is the p-value for the LRT.

Arguments

modr

is a previously fitted model having less parameters than modf

modf

is a previously fitted model having more parameters than modr

Author

Christian Salas-Eljatib.

Details

Double-check the order of the reduced and full model, before of using the model

References

Pinheiro JC, and Bates DM. 2000. Mixed-effects models in S and Splus. Springer-Verlag, New York, NY. 528 p.

Examples

Run this code

#not yet implemented

Run the code above in your browser using DataLab