coef.asreml | R Documentation

## Use coef() on an asreml object

### Description

This is a method for the function `coef()` for objects inheriting from class `asreml`. See `coef()` for the general behavior of this function.

### Usage

    coef.asreml(object, list = FALSE, pattern = character(0))

### Arguments

`object` | an asreml object
`list` | if TRUE, the coefficients are returned in a named list of length the number of terms in the model.
`pattern` | an interaction term in the model, that is a character string of variable names separated by “:”, designed to extract a subset of coefficients for that term

### Value

If neither `pattern` or `list` is set, then a list of length 3 with the following components:

`fixed` | E-solutions to the mixed model equations for the fixed (dense) terms.
`random` | E-BLUPs for the effects in the random model.
`sparse` | E-solutions to the mixed model equations for the fixed sparse-stored terms.

If `list=TRUE`, a list object where each component corresponds to a term in the model and is a single column matrix with a `dimnames` attribute; othwerwise a single column matrix of effects as specified by `pattern`.

### Author(s)

David Butler

### See Also

`asreml` `summary.asreml`

### Examples

    ## The oats data
    data(oats, package="asreml3")
    oats.asr <- asreml(yield ~ Variety*Nitrogen, random = ~ Blocks/Wplots, data=oats)
    coef(oats.asr)
    coef(oats.asr, list=TRUE)
    coef(oats.asr, pattern="Blocks:Wplots")