The test statistic suggested by Neuhauser_Hothorn_2000;textuallawstat.
neuhauser.hothorn.test(y, group, location = c("median", "mean",
"trim.mean"), tail = c("right", "left", "both"), trim.alpha = 0.25,
bootstrap = FALSE, num.bootstrap = 1000,
correction.method = c("none", "correction.factor", "zero.removal",
"zero.correction"))
a numeric vector of data values.
factor of the data.
the default option is "median"
corresponding to the
robust Brown--Forsythe Levene-type procedure Brown_Forsythe_1974lawstat;
"mean"
corresponds to the classical Levene's procedure
Levene_1960lawstat, and "trim.mean"
corresponds to the robust
Levene-type procedure using the group trimmed means.
the default option is "right"
, corresponding to an increasing
trend in variances as the one-sided alternative; "left"
corresponds to a
decreasing trend in variances, and "both"
corresponds to any
(increasing or decreasing) monotonic trend in variances as the two-sided alternative.
the fraction (0 to 0.5) of observations to be trimmed from
each end of x
before the mean is computed.
a logical value identifying whether to implement bootstrap.
The default is FALSE
, i.e., no bootstrap; if set to TRUE
,
the bootstrap method described in Lim_Loh_1996;textuallawstat
for Levene's test is applied.
number of bootstrap samples to be drawn when the bootstrap
argument is set to TRUE
. The default value is 1000.
procedures to make the test more robust;
the default option is "none"
; "correction.factor"
applies the
correction factor described by OBrien_1978;textuallawstat and
Keyes_Levy_1997;textuallawstat; "zero.removal"
performs the
structural zero removal method by Hines_Hines_2000;textuallawstat;
"zero.correction"
performs a combination of the O'Brien's correction factor
and the Hines--Hines structural zero removal method Noguchi_Gel_2010lawstat.
Note that the options "zero.removal"
and "zero.correction"
are only
applicable when the location is set to "median"
, otherwise, "none"
is applied.
A list of class "htest"
with the following components:
the value of the test statistic.
the
type of test performed.
a character string giving the name of the data.
the
The test statistic is based on
the classical Levene's procedure (using the group means),
the modified Brown--Forsythe Levene-type procedure (using the group medians),
or the modified Levene-type procedure (using the group trimmed means).
More robust versions of the test using the correction factor or structural zero
removal method are also available. Two options for calculating critical values,
namely, approximated and bootstrapped, are available.
By default, NA
s are omitted from the data.
levene.test
, lnested.test
,
ltrend.test
, mma.test
, robust.mmm.test
# NOT RUN {
data(pot)
neuhauser.hothorn.test(pot[, "obs"], pot[, "type"], location = "median",
tail = "left", correction.method = "zero.correction")
## Bootstrap version of the test. The calculation may take up a few minutes
## depending on the number of bootstrap sampling.
neuhauser.hothorn.test(pot[, "obs"], pot[, "type"], location = "median",
tail = "left", correction.method = "zero.correction",
bootstrap = TRUE, num.bootstrap = 500)
# }
Run the code above in your browser using DataLab