lr.test | R Documentation |
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.
lr.test(object,...,type="sequential")
object |
An |
... |
In combination with an |
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,... |
A summary table of the test characteristics is returned
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.
Code by Anders Nielsen, implemented by Niels T. Hintzen and Mark R. Payne
looi
#- 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]])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.