Conduct a log-likelihood test for comparing terms in ASReml-R models
Source:R/logltest.R
logl_test.Rd
Conduct a log-likelihood test for comparing terms in ASReml-R models
Usage
logl_test(
model.obj,
rand.terms = NULL,
resid.terms = NULL,
decimals = 3,
numeric = FALSE,
quiet = FALSE
)
Arguments
- model.obj
An ASReml-R model object
- rand.terms
Random terms from the model. Default is NULL.
- resid.terms
Residual terms from the model. Default is NULL.
- decimals
Controls rounding of decimal places in output. Default is 3 decimal places.
- numeric
Return p-values as numeric? Default is that they are characters, where very small values shown as less than a small number. See
details
for more.- quiet
Logical (default:
FALSE
). Hide warnings and messages?
Details
Typically p-values cannot be 0, and are usually just below some threshold of accuracy in calculation of probability.
Examples
if (FALSE) {
library(asreml)
dat <- asreml::oats
dat <- dat[order(dat$Row, dat$Column),]
#Fit ASReml Model
model.asr <- asreml(yield ~ Nitrogen + Variety + Nitrogen:Variety,
random = ~ Blocks + Blocks:Wplots,
residual = ~ ar1(Row):ar1(Column),
data = dat)
oats.logl <- logl_test(
model.obj = model.asr, rand.terms = c("Blocks", "Blocks:Wplots"),
resid.terms = c("ar1(Row)", "ar1(Column)")
)
oats.logl
}