Description
update.asreml extracts and evaluates the call
from the fitted object, replacing any arguments with changed values. In particular, G.para
m and R.param
are automatically updated with those stored in the object.
Usage
## S3 method for class 'asreml' update(object, fixed., random., sparse., residual., keep.order = TRUE, evaluate = TRUE, ...)
Arguments
object |
A valid asreml object with a call component, the expression used to create itself. |
fixed. |
Changes to the fixed formula. This is a two sided formula where “.” is substituted for existing components in the fixed component of object$call . |
random. |
Changes to the random formula. This is a one sided formula where “.” is substituted for existing components in the right hand side of the random component of object$call . |
sparse. |
Changes to the sparse formula. This is a one sided formula where “.” is substituted for existing components in the right hand side of the sparse component of object$call . |
residual. |
Changes to the residual formula. This is a one sided formula where “.” is substituted for existing components in the right hand side of the residual component of object$call . |
keep.order |
If TRUE (the default) the ordering of terms is retained in the updated formulae. |
evaluate |
If TRUE (the default) the new call is evaluated; otherwise the call is returned as an unevaluated expression. |
... |
Additional arguments to the call, or arguments with changed values. |
Details
In addition to any other changes, update.asreml
replaces the arguments R.param
and G.param
with object\$R.param
and object\$G.param
, respectively, creating a new fitted object when run using the parameter values from a previous model as initial values.
Value
Either a new updated asreml
object, else an unevaluated expression for creating such an object.
Examples
## Not run: data(oats, package="asreml") oats.asr <- asreml(yield ~ Variety+Nitrogen, random = ~ Blocks/Wplots, data=oats) oats2.asr <- update(oats.asr, fixed = . ~ . + Variety:Nitrogen) ## End(Not run)