Learn R Programming

asremlPlus (version 2.0-3)

newfit.asreml: refits an asreml model with modified model formula using either a call to update.asreml or a direct call to asreml.

Description

Extracts the call from the asreml.obj and evaluates that call, replacing any arguments with changed values. If update is TRUE and set.terms is not set, the call is evaluated using update.asreml; otherwise, it is evaluated using a direct call to asreml. The principal difference is that the latter does not enforce the use of previous values of the variance parameters as initial values; it sets G.param and R.param to NULL or to values as specified for set.terms. The ... argument can be used to pass G.param and/or R.param, provided update is FALSE and set.terms is not set.

Usage

newfit.asreml(asreml.obj, fixed., random., sparse., rcov., 
              update = TRUE, keep.order = TRUE, set.terms = NULL, 
               ignore.suffices = TRUE, constraints = "P", initial.values = NA, ...)

Arguments

asreml.obj
a valid asreml object with with a component named call (from a previous call to either asreml or update.asreml).
fixed.
a character or formula specifying changes to the fixed formula. This is a two-sided formula where "." is substituted for existing components in the fixed component of asreml.obj$call.
random.
a character or formula specifying changes to the random formula. This is a one-sided formula where "." is substituted for existing components in the random component of asreml.obj$call.
sparse.
a character or formula specifying changes to the sparse formula. This is a one-sided formula where "." is substituted for existing components in the sparse component of asreml.obj$call.
rcov.
a character or formula specifying changes to the error formula. This is a one-sided formula where "." is substituted for existing components in the rcov component of asreml.obj$call.
update
a logical indicated whether to use update.asreml or asreml to evaluate the modified call. If TRUE, use update.asreml to evaluate the modified cal
keep.order
a logical value indicating whether the terms should keep their positions. If FALSE the terms are reordered so that main effects come first, followed by the interactions, all second-order, all
set.terms
a character vector specifying the terms that are to have constraints and/or initial values set prior to fitting.
ignore.suffices
a logical vector specifying whether the suffices of the asreml-assigned names of the variance terms (i.e. the information to the right of an "!", other than "R!") is to be igno
constraints
a character vector specifying the constraints to be applied to the terms specified in terms. This vector must be of length one or the same length as terms. If it i
initial.values
a character vector specifying the initial values for the terms specified in terms. This vector must be of length one or the same length as terms. If it is of leng
...
additional arguments to the call, or arguments with changed values.

Value

  • An asreml object.

References

Butler, D. G., et al. (2010). Analysis of Mixed Models for {S} language environments: {ASReml-R} reference manual. Brisbane, DPI Publications.

See Also

update.asreml, setvarianceterms.asreml

Examples

Run this code
m2.asreml <- newfit.asreml(m1.asreml, random. = "~ . - Blocks:Plots", maxiter=75)

Run the code above in your browser using DataLab