Description
coef.asreml extracts model coefficients from an asreml
object.
Usage
## S3 method for class 'asreml'
coef(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; default FALSE . |
pattern |
A term in the model as a character string; if an interaction then separate the term names in the string by “:”. A regular expression is constructed from pattern to extract a subset of coefficients. |
... |
Additional arguments. |
Value
If neither pattern
nor list
is set, then a list of length 3 with the following components:
fixed |
solutions to the mixed model equations for the fixed (dense) terms. |
random |
E-BLUPs for the effects in the random model. |
sparse |
solutions to the mixed model equations for the fixed sparse-stored terms. |
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; otherwise a single column matrix of effects as specified by pattern
.
Examples
## Not run: data(oats) 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") ## End(Not run)