logliktest: Likelihood ratio test for two likfit models

Description Usage Arguments Value Note Author(s) Examples

Description

Never have to remember which way to subtract again!

Usage

1
logliktest(likfit1, likfit2)

Arguments

likfit1

The first model returned from likfit

likfit1

The second model returned from likfit. It doesn't matter which is which.

Value

The p-value from the associated likelihood ratio test

Note

Don't even think about using non-nested models, or the wrath of Dr. Barry will haunt you for the rest of your days.

Author(s)

Matt Tyers

Examples

1
2
3
4
5
6
data(lnLa)
model1 <- likfit(lnLa,cov.model="exponential",ini.cov.pars=c(1,18))
model2 <- likfit(lnLa,cov.model="exponential",ini.cov.pars=c(1,18),trend="1st")

logliktest(model1,model2)
logliktest(model2,model1)

mbtyers/rasterblaster documentation built on May 22, 2019, 12:58 p.m.