lr.test: Perform a log-ratio test for all models specified

lr.testR Documentation

Perform a log-ratio test for all models specified

Description

Compare model fit performance among the models specified based on log-likelihood ratio's. Different in log-likelihood is calculated and degrees of freedom are given. P values are specified assuming a chi-quared distribution.

Usage

lr.test(object,...,type="sequential")

Arguments

object

An FLSAM or FLSAMs object

...

In combination with an FLSAM object: additional objects of the same type (need at least 1)

type

The type of comparison to make. A "sequential" comparison compares object 1 against object 2, object 2 against object 3,... whilt a "first" comparison compares object 1 against object 2, object 1 against object 3,...

Value

A summary table of the test characteristics is returned

Warning!

Log-likelihood tests can only be used for nested models (i.e. model parameterisation is different) and are not appropriate for different input data or different model types.

Author(s)

Code by Anders Nielsen, implemented by Niels T. Hintzen and Mark R. Payne

See Also

looi

Examples

#- Load the data
data(HERAS.sams)

#- Run lr ratio test on example FLSAMs object
lr.test(HERAS.sams)

#- Run lr ratio test on individual FLSAM objects
lr.test(HERAS.sams[[1]],HERAS.sams[[2]],HERAS.sams[[3]])

flr/FLSAM documentation built on April 18, 2024, 4:54 p.m.