R: Update an 'asreml' model fit

update.asreml {asreml} | R Documentation

## Update an `asreml` model fit

### Description

Extracts and evaluates the `call` from the fitted `asreml` object, replacing any arguments with changed values. In particular, `G.param` and `R.param` are automatically updated with those stored in the object. It is also used to perform a few additional iterations of a model that has not converged.

### 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 ordering of terms is retained in the updated formulae (default = `TRUE`).
`evaluate` | If `TRUE`, the new call is evaluated; otherwise the call is returned as an unevaluated expression (default = `TRUE`).
`...` | 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

Returns either a new updated `asreml` object, or an unevaluated expression for creating such an object.

### Examples

    ## Not run:
    oats.vsr <- asreml(yield ~ Variety+Nitrogen, random = ~ Blocks/Wplots, data = oats)
    oats2.vsr <- update(oats.vsr, fixed = . ~ . + Variety:Nitrogen)

    ## End(Not run)

[Package asreml version 4.2.0.480 Index]