chooseModel.asrtests | R Documentation |
asrtests.object
,
taking into account the hierarchy or marginality relations of the terms.Performs a series of hypothesis tests on a set of fixed and/or random terms taking
into account the marginality of terms. In particular, a term will not be tested if it is
marginal to (or nested in) one that is significant. For example, if A:B is significant, then
neither A nor B will be tested. For a random term, the term is removed from
the model fit, any boundary terms are removed using rmboundary.asrtests
and a REML likelihood ratio test is performed using REMLRT.asreml
.
If it is not significant and drop.ran.ns
is TRUE, the term is permanently removed
from the model. Note that if boundary terms are removed, the reduced model may not
be nested in the full model in which case the test is not valid. For fixed terms,
the Wald tests are performed and the p-value for the term obtained. If it is not
significant and drop.fix.ns
is TRUE, the term is permanently removed
from the model. A row that records the outcome of a test is added to
test.summary
for each term that is tested.
## S3 method for class 'asrtests'
chooseModel(object, terms.marginality=NULL,
alpha = 0.05, allow.unconverged = TRUE,
allow.fixedcorrelation = TRUE,
checkboundaryonly = FALSE, drop.ran.ns=TRUE,
positive.zero = FALSE, bound.test.parameters = "none",
drop.fix.ns=FALSE, denDF = "numeric", dDF.na = "none",
dDF.values = NULL, trace = FALSE, update = TRUE,
set.terms = NULL, ignore.suffices = TRUE,
bounds = "P", initial.values = NA,
IClikelihood = "none", ...)
object |
an |
terms.marginality |
A square matrix of ones and zeros with row and column names
being the names of the terms to be tested.
The names of fixed terms must match those in the |
alpha |
The significance level for the test. |
allow.unconverged |
A |
allow.fixedcorrelation |
A |
checkboundaryonly |
If |
drop.ran.ns |
A logical indicating whether to drop nonsignificant random terms from the model. |
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 |
drop.fix.ns |
A logical indicating whether to drop a fixed term from the model when it is nonsignificant |
denDF |
Specifies the method to use in computing approximate denominator
degrees of freedom when |
dDF.na |
The method to use to obtain substitute denominator degrees of freedom.
when the numeric or algebraic methods produce an |
dDF.values |
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 |
IClikelihood |
A |
... |
further arguments passed to |
A list containing:
asrtests.obj
: an asrtests.object
containing the
components (i) asreml.obj
, (ii) wald.tab
, and
(iii) test.summary
.;
sig.tests
: a character vector
whose elements are the
significant terms amongst those tested.
Chris Brien
Kenward, M. G., & Roger, J. H. (1997). Small sample inference for fixed effects from restricted maximum likelihood. Biometrics, 53, 983-997.
chooseModel
, chooseModel.data.frame
,
as.asrtests
, testranfix.asrtests
,
testresidual.asrtests
, REMLRT.asreml
,
rmboundary.asrtests
, newfit.asreml
,
changeModelOnIC.asrtests
, changeTerms.asrtests
,
reparamSigDevn.asrtests
## Not run:
data(WaterRunoff.dat)
asreml.options(keep.order = TRUE) #required for asreml-R4 only
current.asr <- asreml(log.Turbidity ~ Benches + (Sources * (Type + Species)) * Date,
random = ~Benches:MainPlots:SubPlots:spl(xDay),
data = WaterRunoff.dat, keep.order = TRUE)
current.asrt <- as.asrtests(current.asr, NULL, NULL)
terms.treat <- c("Sources", "Type", "Species",
"Sources:Type", "Sources:Species")
terms <- sapply(terms.treat,
FUN=function(term){paste("Date:",term,sep="")},
simplify=TRUE)
terms <- c("Date", terms)
terms <- unname(terms)
marginality <- matrix(c(1,0,0,0,0,0, 1,1,0,0,0,0, 1,0,1,0,0,0,
1,0,1,1,0,0, 1,1,1,0,1,0, 1,1,1,1,1,1), nrow=6)
rownames(marginality) <- terms
colnames(marginality) <- terms
choose <- chooseModel(current.asrt, marginality)
current.asrt <- choose$asrtests.obj
sig.terms <- choose$sig.terms
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.