asrtests.obj
and records their removal in an asrtests.object
.Any terms specified in the random model that are
estimated on the boundary or are singular and can be removed are removed from the fit
stored in the asreml
object stored in the asrtests.object
.
Terms that specify multiple parameters in the random model cannot be removed
(e.g. terms specified using the at
function with more than one level of the
factor) and terms in residual
model are not removed. Terms that can be removed
are selected for removal in the following order based on whether they involve:
(i) a dev
function, (ii) only factors, (iii) an spl
function,
(iv) a pol
function and (v) a lin
function or a variable that
is an integer
or a numeric
. It should be noted that this order of removal
presumes that random deviation terms are specified via the dev
function
rather than via a random factor. Once the earliest of the above classes
with a boundary term is identified, a term within this class is selected for
removal. For all classes, except for factor-only terms, the smallest term
with the largest number of variables/factors is removed.
Amongst factor-only terms, the smallest term with the smallest number of
variables/factors is removed. After each
variance component is removed, a row for it is added to the
test.summary
data.frame
and the model refitted. If there are further
boundary or singular terms, one is removed using the above strategy.
This process continues until there are no further boundary or singular
variance components that are removable. Other types of boundary or singular terms,
which cannot be removed, are reported in warning messages.
# S3 method for asrtests
rmboundary(asrtests.obj, checkboundaryonly = FALSE,
IClikelihood = "none", trace = FALSE, update = TRUE,
set.terms = NULL, ignore.suffices = TRUE,
bounds = "P", initial.values = NA, ...)
An asrtests.object
containing the components (i) asreml.obj
,
(ii) wald.tab
, and (iii) test.summary
.
an asrtests.object
containing the components (i) asreml.obj
,
(ii) wald.tab
, and (iii) test.summary
.
If TRUE
then boundary and singular terms are not removed by
rmboundary.asrtests
; a warning is issued instead.
A character
that controls both the occurrence and the type
of likelihood for information criterion in the test.summary
of the new asrtests.object
. If none
, none are
included. Otherwise, if REML
, then the AIC and BIC based
on the Restricted Maximum Likelihood are included; if full
,
then the AIC and BIC based on the full likelihood, evaluated using
REML estimates, are included.
(See also infoCriteria.asreml
.)
If TRUE
then partial iteration details are displayed when ASReml-R
functions are invoked; if FALSE then no output is displayed.
If TRUE
, and set.terms
is NULL
, then
newfit.asreml
is called to fit the model with any boundary
terms removed and using the values of the variance parameters stored in
the asreml.object
, that is stored in asrtests.obj
, as starting values.
If FALSE
or set.terms
is not NULL
, then
newfit.asreml
will not use the stored variance parameter
values as starting values when fitting the model without the boundary
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 vparameters
component of the
asreml.obj
component in the asrtests.object
.
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 ignored in matching elements of terms
.
If TRUE
for an element of terms
, the suffices
are stripped from the asreml
-assigned names.
If FALSE
for an element of terms
, the element
must exactly match an asreml
-assigned name for a
variance term. This vector must be of length one or the
same length as terms
. If it is of length one then
the same action is applied to the asreml
-assigned
suffices for all the terms in terms
.
A character
vector specifying the bounds to be applied
to the terms specified in set.terms
. This vector
must be of length one or the same length as set.terms
.
If it is of length one then the same constraint is
applied to all the terms in set.terms
.
If any of the bounds are equal to NA then they are
left unchanged for those terms.
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 length one then the same initial value is
applied to all the terms in terms
.
If any of the initial.values are equal to NA then they are
left unchanged for those terms.
Further arguments, including asreml
arguments, passed to newfit.asreml
.
Chris Brien
as.asrtests
, changeTerms.asrtests
,
testranfix.asrtests
, testresidual.asrtests
,
newfit.asreml
, reparamSigDevn.asrtests
,
chooseModel.asrtests
if (FALSE) {
current.asrt <- rmboundary(current.asrt)
}
Run the code above in your browser using DataLab