Extracts the REML log likelihood and the number of variance
parameters from two asreml
objects. It assumes that the
first asreml
object corresponds to the null hypothesis and
the second asreml
object to the alternative hypothesis for the
test being conducted. That is, the second
asreml
object is the result of fitting a model that is a
reduced version of the model for the first object. In the case
where the reduced model is obtained by setting positively-constrained
variance parameters in the full model to zero, the positive.zero
argument should be set to TRUE
so that
the p-value is computed using a mixture of chi-square distributions as
described in Self and Liang (1987).
The function checks that the models do not differ in either their fixed or sparse models.
# S3 method for asreml
REMLRT(h0.asreml.obj, h1.asreml.obj,
positive.zero = FALSE, bound.test.parameters = "none",
DF = NULL, bound.exclusions = c("F","B","S","C"), ...)
A data.frame
containing the log of the likelihood ratio, its degrees of
freedom, its p-value and the number of bound parameters in each of the two models
being compared.
asreml
object containing the fit under the model for the
null hypothesis.
asreml
object containing the fit under the model for the
alternative hypothesis.
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
is set.
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 "none"
, "onlybound"
and "one-and-one"
. The default is "none"
,
although if it is set to "none"
and
positive.zero
is TRUE
then
bound.test.parameters
is taken to be "onlybound"
.
When bound.test.parameters
is set to
"one-and-one"
, it signifies that there are two
parameters being tested, one of which is bound and the
other is not. For example, the latter is true for testing
a covariance and a positively-constrained variance component
that, under the reduced model, are zero.
A numeric
giving the difference between the two models in the
number of variance parameters whose estimates are not of the type
specified in bound.exclusions
. If
NULL
then this is determined from the information in
full.asreml.obj
and reduced.asreml.obj
.
A character
specifying one or more bound (constraint) codes that
will result in a variance parameter being excluded from the count of
estimated variance parameters. If set to NULL
then none will
be excluded.
Provision for passing arguments to functions called internally - not used at present.
Chris Brien
Self, S.G., and Liang, K-Y. (1987) Asymptotic Properties of Maximum Likelihood Estimators and Likelihood Ratio Tests Under Nonstandard Conditions. Journal of the American Statistical Association, 82, 605-10.
infoCriteria.asreml
, testranfix.asrtests
if (FALSE) {
REMLRT(ICV.max, ICV.red, bound.test.parameters = "onlybound")
}
Run the code above in your browser using DataLab