changeTerms.asrtests | R Documentation |
The specified terms are simply added or dropped, without testing, from either the fixed or random model and/or the residual (rcov) model replaced. Also, the bounds and/or initial values of some terms can be changed. No hypothesis testing is performed, but a check is made for boundary or singular terms.
A row is added to the test.summary
data.frame
of the
asrtests.object
using the supplied label
and stating
which models have been changed. Information criteria can be included in the
row of the test.summary
. 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.
To only change the terms based on a comparison of information
criteria use changeModelOnIC.asrtests
.
## S3 method for class 'asrtests'
changeTerms(asrtests.obj,
dropFixed = NULL, addFixed = NULL,
dropRandom = NULL, addRandom = NULL,
newResidual = NULL, label = "Changed terms",
allow.unconverged = TRUE, allow.fixedcorrelation = TRUE,
checkboundaryonly = FALSE,
trace = FALSE, update = TRUE, denDF = "numeric",
set.terms = NULL, ignore.suffices = TRUE,
bounds = "P", initial.values = NA,
IClikelihood = "none", bound.exclusions = c("F","B","S","C"),
...)
asrtests.obj |
An |
dropFixed |
A single |
addFixed |
A single |
dropRandom |
A single |
addRandom |
A single |
newResidual |
A single |
label |
A |
allow.unconverged |
A |
allow.fixedcorrelation |
A |
checkboundaryonly |
If |
trace |
If TRUE then partial iteration details are displayed when ASReml-R functions are invoked; if FALSE then no output is displayed. |
update |
If |
denDF |
Specifies the method to use in computing approximate denominator
degrees of freedom when |
set.terms |
A |
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 |
IClikelihood |
A |
bound.exclusions |
A |
... |
Further arguments passed to |
An asrtests.object
containing the components (i) asreml.obj
,
(ii) wald.tab
, and (iii) test.summary
.
Chris Brien
Kenward, M. G., & Roger, J. H. (1997). Small sample inference for fixed effects from restricted maximum likelihood. Biometrics, 53, 983-997.
as.asrtests
, rmboundary.asrtests
,
testranfix.asrtests
, testresidual.asrtests
,
newfit.asreml
, reparamSigDevn.asrtests
,
chooseModel.asrtests
,
changeModelOnIC.asrtests
, infoCriteria.asreml
## Not run:
terms <- "(Date/(Sources * (Type + Species)))"
current.asrt <- changeTerms(current.asrt, addFixed = terms)
current.asrt <- changeTerms(current.asrt, dropFixed = "A + B", denDF = "algebraic")
data(Wheat.dat)
current.asr <- asreml(yield ~ Rep + WithinColPairs + Variety,
random = ~ Row + Column + units,
residual = ~ ar1(Row):ar1(Column),
data=Wheat.dat)
current.asrt <- as.asrtests(current.asr, NULL, NULL)
current.asrt <- rmboundary(current.asrt)
# Add and drop both fixed and random terms
current.asrt <- changeTerms(current.asrt,
addFixed = "vRow", dropFixed = "WithinColPairs",
addRandom = "spl(vRow)", dropRandom = "units",
checkboundaryonly = TRUE)
# Replace residual with model without Row autocorrelation
current.asrt <- changeTerms(current.asrt,
newResidual = "Row:ar1(Column)",
label="Row autocorrelation")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.