rob_scale calculates an estimator for the within-sample dispersion
based on two samples.
rob_scale(
x,
y,
type = c("S1", "S2", "S3", "S4"),
na.rm = FALSE,
check.for.zero = FALSE
)An estimate of the pooled variance of the two samples.
a (non-empty) numeric vector of data values.
a (non-empty) numeric vector of data values.
character that specifies the estimator for the variance, can be
"S1", "S2", "S3" and "S4";
see details for description of the scale estimators.
a logical value indicating whether NA values in x and
y should be stripped before the computation proceeds. The
default is na.rm = FALSE.
logical value indicating a warning should be triggered
if the scale estimate is zero. The default is
FALSE.
For definitions of the scale estimators, see Fried and Dehling (2011).
If check.for.zero = TRUE, an error is thrown when the scale estimate
is zero. This argument is only included because the function is used in
rob_perm_statistic to compute values of robust test statistics
where the scale estimate is used for standardization. A scale estimate of zero
leads to a non-existing test statistic, so that the corresponding test cannot
be performed.
FriDeh11roburobnptests