coef.asreml {asreml}R Documentation

Extract model coefficients

Description

Extracts model coefficients (solutions for BLUEs or BLUPs) from an asreml object.

Usage

## S3 method for class 'asreml'
coef(object, list = FALSE, pattern = ~NULL, ...)

Arguments

object

An asreml object.

list

If TRUE, the coefficients are returned in a named list whose length is the number of terms in the model (default = FALSE).

pattern

A term in the model as a one-sided formula. A regular expression is constructed from pattern to extract a subset of coefficients.

...

Additional arguments.

Value

If neither pattern nor list are set, then a list of length two with the following components:

where each component is a matrix with a dimnames attribute.

If list = TRUE, a list object where each component is a single-column matrix corresponding to a term in the model is returned. Otherwise, a single-column matrix of effects as specified by pattern.

Examples


## Not run: 
data(oats)
oats.vsr <- asreml(yield ~ Variety*Nitrogen, random = ~ Blocks/Wplots, data = oats)
coef(oats.vsr)
coef(oats.vsr, list = TRUE)
coef(oats.vsr, pattern = ~Blocks:Wplots)

## End(Not run)


[Package asreml version 4.2.0.480 Index]