likelihood.ratio.test: Evaluates likelihood ratio test Compares the goodness of fit...

likelihood.ratio.testR Documentation

Evaluates likelihood ratio test Compares the goodness of fit of a null model (LO) against an alternative model (L1)

Description

Evaluates likelihood ratio test

Compares the goodness of fit of a null model (LO) against an alternative model (L1)

Usage

likelihood.ratio.test(L0, L1)

Arguments

L0

null model likelihood

L1

alternative model likelihood

Value

p value assessing the goodness of fit

Author(s)

Alessia Visconti

Examples

data(mtcars)
model0 <- lm(qsec ~ 1, data=mtcars)
model1 <- lm(qsec ~ cyl, data=mtcars)
likelihood.ratio.test(logLik(model0), logLik(model1))

alesssia/timesaveR documentation built on Jan. 26, 2024, 5:21 p.m.