d_robust: Estimates the robust standardized mean difference based on...

View source: R/robust_lm_inferences.R

d_robustR Documentation

Estimates the robust standardized mean difference based on trimmed means and pooled winsorized standard deviation.

Description

Estimates the robust standardized mean difference based on trimmed means and pooled winsorized standard deviation.

Usage

d_robust(x, y, trim = 0.2)

Arguments

x

Vector of observations from the first group.

y

Vector of observations from the second group.

trim

The proportion of observations to trim from each tail within each group.

Value

Returns the robust standardized mean difference $d_r$ from Algina, Keselman, and Penfield (2005) based on the trimmed means and the pooled winsorized standard deviation. The estimate for the robust standardized mean difference is adjusted to be equal to that of the standardized mean difference based on normal distribution with equal variances. The adjustment factor depends on the level of trimming.

Examples

x <- c(-2.40, -1.87, -0.60, -0.54, -0.12, -0.02, 0.12, 0.34, 0.40, 0.53, 0.55, 0.62, 0.92, 1.21,
        1.49, 1.55, 1.57, 1.57, 1.82, 1.87, 1.90, 1.91, 1.93, 2.34, 2.37)
y <- c(-1.32, -1.25, -0.91, -0.62, -0.55, -0.41,-0.40, -0.31, -0.28, -0.21, -0.18, -0.16, -0.03,
       -0.02, 0.04, 0.22, 0.38, 0.51, 0.53, 0.61, 1.09, 1.47, 1.59, 2.39, 2.47)
d_robust(x, y, trim=.20)

jbiesanz/fabs documentation built on July 15, 2022, 11:02 p.m.