constrainFun: Fix a Model Parameter and Conduct Likelihood Ratio Test

View source: R/constrainFun.R

constrainFunR Documentation

Fix a Model Parameter and Conduct Likelihood Ratio Test

Description

Given a model object from asreml and a range of estimates of the parameter, the function will supply the likelihood ratio test statistic for the comparison of the full model to one where the parameter of interest is constrained.

Usage

constrainFun(parameter.val, full, fm2, comp, G, mit = 600)

Arguments

parameter.val

a value for which the log-Likelihood of a model is to be calculated

full

the full model asreml object

fm2

starting values for the full model

comp

which variance component to constrain

G

logical, indicating if the component is part of the G structure

mit

numeric, indicating maximum number of iterations for the constrained asreml model

Value

A vector of length 1 returning either a numeric value corresponding to the likelihood ratio test statistic or else the missing value indicator NA.

Author(s)

matthewwolak@gmail.com

See Also

See also LRTest


nadiv documentation built on May 29, 2024, 10:40 a.m.