logl_test {biometryassist}R Documentation

Conduct a log-likelihood test for comparing terms in ASReml-R models

Description

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.

Value

A dataframe containing the results of the test.

Examples

## Not run: 
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

## End(Not run)


[Package biometryassist version 1.2.1 Index]