LR.test.asreml: Likelihood ratio test for two asreml-models.

Description Usage Arguments Details Value Author(s) Examples

Description

Perform a likelihood ratio test for two asreml-models that have an equal fixed part and a nested random part.

Usage

1
LR.test.asreml(model0, model1)

Arguments

model0

An asreml-object, see asreml.

model1

An asreml-object with the same fixed part as model0 and a random part that is an extension of the random part of model0.

Details

The likelihood ratio test is performed by comparing two times the difference in log-likelihood with the quantiles if the χ^2-distribution with as degrees of freedom the difference in number of variance components estimated in both models.

If the degrees of freedom equal 1, the obtained p-value is divided by 2.

Value

A list with class "htest" containing the following components:

statistic

The value of the test statistic.

parameter

The degrees of freedom for the test statistic.

p.value

The p-value for the test.

conf.int

NULL

estimate

NULL

null.value

NULL

alternative

Extended model outperforms the 'null model'.

method

Likelihood ratio test (Chi-square)

data.name

Names of the two models that were tested.

Author(s)

Ruud Derijcker, Katrien Baert

Examples

1
2
3
4
5
6
7
library(asreml)
data(oats)
model0 <- asreml(fixed = yield ~ Variety*Nitrogen, random = ~ Blocks:Wplots,
          data = oats)
model1 <- asreml(fixed = yield ~ Variety*Nitrogen, random = ~ Blocks/Wplots,
          data = oats)
LR.test.asreml(model0, model1)

digiYozhik/msc_thesis documentation built on May 14, 2019, 5:16 p.m.