asremlreml.lrt.asreml. It compares the fit of the model in
asreml.obj and the newly fitted model without the term.
If the newly fitted model is retained, any boundary terms are then removed
using rmboundary.asrtests.
For a fixed term, the probability of the Wald
statistics is extracted from the pseudo-anova table produced by
wald.asreml. If this is available in the asrtests object, it is
used; otherwise wald.asreml is called to add it to the asrtests
object. Whether nonsignificant terms are dropped is controlled by drop.ran.ns
for random terms and drop.fix.ns for fixed terms. A row is
added to the test.summary data.frame for the term that is tested.testranfix.asrtests(term=NULL, asrtests.obj, alpha = 0.05,
drop.ran.ns = TRUE, positive.zero = FALSE,
drop.fix.ns = FALSE, denDF="default", dDF.na = "none",
dDF.values = NULL, trace = FALSE, update = TRUE,
set.terms = NULL, ignore.suffices = TRUE,
constraints = "P", initial.values = NA, ...)asreml, stored
as a character.asrtests object for a fitted model that is a list
containing an asreml object, a wald.tab
data.frame with 4 columns, and a wald.asreml is called. Can be none
to suppress the computations, numeric for numerical methods,NA. If
dDF.na = "none", no subtitute denominator degrees of freedom
vector of values to be used when dDF.na = "supplied".
Its values will be used when denDF in a test for a fixed effect
is NA. This vector must be the same length as the nuTRUE then update.asreml is called to fit the model
to be tested. 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
after thetermhas been tested; it will be a new model if
thetermis nonsignificant and the appropriate argument
out ofdrop.ran.nsanddrop.fix.nsisTRUE;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 tested, the row containing the name of the term,
the degrees of freedom (numerator DF for a Wald test and the number of
extra paramters for a REML ratio tests), the p-value and a for the
action taken. Possible codes are:Dropped,Retained,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.term is not in the model, then the supplied asreml
object will be returned. Also, reml.test will have the likelihood
ratio and the p-value set to NA and the degrees of freedom to zero.
Similarly, the row of test.summary for the term will have
its name, DF set to NA, p-value set to NA, and action set to Absent.asremlPlus-package, asrtests,
choose.model.asrtests, reml.lrt.asreml,
rmboundary.asrtests,
newfit.asreml, sig.devn.reparam.asrtests,
addrm.terms.asrtestsdata(Wheat.dat)
current.asr <- asreml(yield ~ Rep + WithinColPairs + Variety,
random = ~ Row + Column + units,
rcov = ~ ar1(Row):ar1(Column),
data=Wheat.dat)
current.asrt <- asrtests(current.asr, NULL, NULL)
current.asrt <- rmboundary.asrtests(current.asrt)
# Test nugget term
current.asrt <- testranfix.asrtests("units", current.asrt, positive=TRUE)Run the code above in your browser using DataLab