test.summary data.frame stating whether fixed or random terms
have been added or removed. Convergence in fitting the model is checked
and a note included in the action if there was not. All components of the
asrtests object are updated, although wald.tab is only updated
if it is present in the supplied asrtests object.addrm.terms.asrtests(terms = NULL, asrtests.obj, add = FALSE,
random = FALSE, label = NULL,
denDF = "default", trace = FALSE,
update = TRUE, set.terms = NULL, ignore.suffices = TRUE,
constraints = "P", initial.values = NA, ...)asrtests object for a fitted model that is a list
containing an asreml object, a wald.tab
data.frame with 4 columns, and a test.summary and
which indicates what is being tested. If label is NULL,
either Fixed terms or Random terms is used,wald.asreml is called. Can be none
to suppress the computations, numeric for numerical methods,TRUEthen update.asreml is called in removing and
adding terms to the model. In doing this the arguments R.param
and G.param are set to those in the asreml asreml-assigned names of the variance terms (i.e. the
information to the right of an "!", other than "R!") is to
be ignoterms. This vector
must be of length one or the same length as terms.
If it iterms. This vector
must be of length one or the same length as terms.
If it is of lengasreml and to wald.asreml.asrtests object, which is a list containing:
asreml.obj: anasremlobject containing the fit
of the model after all boundary and singular terms have been removed;wald.tab: a 4-columndata.framecontaining a
pseudo-anova table for the fixed terms produced bywald.asreml;test.summary: adata.framewith columnsterm,DF,denDF,pandaction. A row is added to
it for each term
that is dropped, added or tested or a note that several terms have been
added or removed. A row contains the name of the term, the
DF, the p-value and the action taken. Possible codes are:Dropped,Retained,Swapped,Unswapped,Significant,Nonsignificant,Absent,Added,RemovedandBoundary. If the changed model did not
converge,Unconvergedwill be added to the code.
Note that the logicalasreml.obj$convergealso
reflects whether there is convergence.asrtests, rmboundary.asrtests,
testranfix.asrtests, testrcov.asrtests,
newfit.asreml, sig.devn.reparam.asrtests,
choose.model.asrteststerms <- "(Date/(Sources * (Type + Species)))"
current.asrt <- addrm.terms.asrtests(terms, current.asrt, add = TRUE)
current.asrt <- addrm.terms.asrtests("A + B", current.asrt, denDF = "algebraic")Run the code above in your browser using DataLab