testresidual.asrtests | R Documentation |
asrtests.object
.Fits a new residual formula
using asreml-R4
(replaces the rcov
formula
of asreml-R3) and tests
whether the change is significant. If simpler = FALSE
the model
to be fitted must be more complex than the one whose fit has been stored in
asrtests.obj
. That is, the new model must have more parameters.
However, if simpler = TRUE
the model to be fitted must be simpler
than the one whose fit has been stored in asrtests.obj
in that it
must have fewer parameters. Any boundary terms are removed using
rmboundary.asrtests
, which may mean that the models are not
nested. The test is a REML likelihood ratio test that is performed using
REMLRT.asreml
, which is only valid if the models are nested.
It compares the newly fitted model with the fit of the model in
asrtest.obj
. If the two models have the same number of variance
parameters, then no change is made to the residual. A row is added to the
test.summary
data.frame
using the supplied label
.
## S3 method for class 'asrtests'
testresidual(asrtests.obj, terms=NULL, label = "R model",
simpler = FALSE, alpha = 0.05,
allow.unconverged = TRUE, allow.fixedcorrelation = TRUE,
checkboundaryonly = FALSE, positive.zero = FALSE,
bound.test.parameters = "none",
bound.exclusions = c("F","B","S","C"), REMLDF = NULL,
denDF="numeric", IClikelihood = "none",
update = TRUE, trace = FALSE,
set.terms = NULL, ignore.suffices = TRUE,
bounds = "P", initial.values = NA, ...)
asrtests.obj |
an |
terms |
A model for the |
label |
A character string to use as the label in |
simpler |
A logical indicating whether the new model to be fitted is
simpler than the already fitted model whose fit is stored in
|
alpha |
The significance level for the test. |
allow.unconverged |
A |
allow.fixedcorrelation |
A |
checkboundaryonly |
If |
positive.zero |
Indicates whether the hypothesized values for the
variance components being tested are on the boundary
of the parameter space. For example, this is true
for positively-constrained variance components that,
under the reduced model, are zero. This argument does
not need to be set if |
bound.test.parameters |
Indicates whether for the variance components
being tested, at least some of the hypothesized values
are on the boundary of the parameter space.
The possibilities are |
bound.exclusions |
A |
REMLDF |
A |
denDF |
Specifies the method to use in computing approximate denominator
degrees of freedom when |
IClikelihood |
A |
update |
If |
trace |
If |
set.terms |
A |
ignore.suffices |
A |
bounds |
A |
initial.values |
A character vector specifying the initial values for
the terms specified in |
... |
Further arguments passed to |
An asrtests.object
containing the components (i) asreml.obj
,
(ii) wald.tab
, and (iii) test.summary
.
If the term
is not in the model, then the supplied asreml.obj
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, a p-value set to NA
, and action set to Absent.
Chris Brien
Kenward, M. G., & Roger, J. H. (1997). Small sample inference for fixed effects from restricted maximum likelihood. Biometrics, 53, 983-997.
asremlPlus-package
, as.asrtests
, changeTerms.asrtests
,
chooseModel.asrtests
,
REMLRT.asreml
, rmboundary.asrtests
,
newfit.asreml
, testswapran.asrtests
,
changeModelOnIC.asrtests
,
changeTerms.asrtests
, reparamSigDevn.asrtests
## Not run:
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)
# Test Row autocorrelation
current.asrt <- testresidual(current.asrt, "~ Row:ar1(Column)",
label="Row autocorrelation", simpler=TRUE)
print(current.asrt)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.