| newfit.asreml {asremlPlus} | R Documentation | 
Refits an asreml model with changed arguments by extracting, modifying 
and evaluating its call - an alternate to update.asreml.
Description
Extracts the call from the asreml.obj and evaluates that call, 
replacing supplied asreml arguments with changed values. 
If update is TRUE and set.terms is NULL, 
the call is evaluated using the variance parameter estimates 
from the call stored in asreml.obj; if some 
variance terms in the newly fitted model are singular (S) or 
bound (B), a refit of the model will be tried in which the 
variance parameter estimates in asreml.obj are not used 
and will become the fitted model if its boundary terms are a 
subset of those in the fitted model stored in asreml.obj. 
If update is FALSE or set.terms is not 
NULL, the previous values of the variance parameters 
are not used as initial values for fitting the new model; 
G.param and R.param are set 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 NULL.
Usage
## S3 method for class 'asreml'
newfit(asreml.obj, fixed., random., sparse., 
       residual., rcov., update = TRUE, trace = FALSE, 
       allow.unconverged = TRUE, allow.fixedcorrelation = TRUE,
       keep.order = TRUE, 
       set.terms = NULL, ignore.suffices = TRUE, 
       bounds = "P", initial.values = NA, ...)
Arguments
asreml.obj | 
 A valid   | 
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   | 
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   | 
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   | 
residual. | 
 A character or formula specifying changes to the error 
formula, used when version 4 or later of ASReml-R is loaded.
This is a one-sided formula 
where "." is substituted for existing components in the 
residual component of   | 
rcov. | 
 A character or formula specifying changes to the error 
formula, used when version 3 of ASReml-R is loaded. 
This is a one-sided formula 
where "." is substituted for existing components in the 
residual component of   | 
update | 
 A logical indicating whether to use the variance parameter 
estimates in fitting a new model using   | 
trace | 
 A   | 
allow.unconverged | 
 A   | 
allow.fixedcorrelation | 
 A   | 
keep.order | 
 A logical value indicating whether the terms should keep 
their positions. If   | 
set.terms | 
 A character vector specifying the terms that are to have 
bounds and/or initial values set prior to fitting.
The names must match those in the   | 
ignore.suffices | 
 A logical vector specifying whether the suffices of the 
  | 
bounds | 
 A   | 
initial.values | 
 A character vector specifying the initial values for  
the terms specified in   | 
... | 
 additional arguments to the call, or arguments with changed values.  | 
Value
An asreml object.
Author(s)
Chris Brien
References
Butler, D. G., Cullis, B. R., Gilmour, A. R., Gogel, B. J. and Thompson, R. (2023). ASReml-R Reference Manual Version 4.2. VSN International Ltd, https://asreml.kb.vsni.co.uk/.
See Also
convAsremlobj.asreml, update.asreml, setvarianceterms.call
Examples
## Not run: 
    m2.asreml <- newfit(m1.asreml, random. = "~ . - Blocks:Plots", maxiter=75)
## End(Not run)