| 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 |
list |
If |
pattern |
A term in the model as a one-sided formula. A regular
expression is constructed from |
... |
Additional arguments. |
Value
If neither pattern nor list are set, then a list of
length two with the following components:
fixed: Solutions to the mixed model equations for the fixed terms.random: E-BLUPs for the effects in the random model.
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)