| testswapran.asrtests | R Documentation |
asrtests.object.Fits a new random model using asreml by removing oldterms
and adding newterms. 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. The test is a REML 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
asrtests.obj. A row is added to the test.summary
data.frame using the supplied label. If the newly fitted model
is retained, any boundary terms are then removed using
rmboundary.asrtests. If the models are not nested, then using
changeModelOnIC.asrtests may be the more appropriate approach
for comparing models.
## S3 method for class 'asrtests'
testswapran(asrtests.obj, oldterms = NULL, newterms = NULL,
label = "Swap in random 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",
trace = FALSE, update = TRUE,
set.terms = NULL, ignore.suffices = TRUE,
bounds = "P", initial.values = NA, ...)
asrtests.obj |
an |
oldterms |
Terms, stored as a |
newterms |
Terms, stored as a |
simpler |
A logical indicating whether the new model to be fitted. after the
changes made as a result of swapping |
alpha |
The significance level for the test. |
allow.unconverged |
A |
allow.fixedcorrelation |
A |
checkboundaryonly |
If |
label |
A character string to use as the label in |
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 |
trace |
If TRUE then partial iteration details are displayed when ASReml-R functions are invoked; if FALSE then no output is displayed. |
update |
If |
set.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 |
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 |
... |
Further arguments passed to |
An asrtests.object for a fitted model that is a list
containing the components (i) asreml.obj, (ii) wald.tab
(iii) test.summary.
If the 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, 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.
as.asrtests, chooseModel.asrtests,
REMLRT.asreml, rmboundary.asrtests,
newfit.asreml, testresidual.asrtests,
changeModelOnIC.asrtests,
changeTerms.asrtests, reparamSigDevn.asrtests
## Not run:
current.asrt <- testswapran(current.asrt, oldterms = "str(~ Cart/xDays, ~us(2):id(184))",
newterms = "Cart/xDays", pos = FALSE,
label = "Intercept/Slope correlation",
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.