# RW: Robust Welch's Two Sample t-Test In RobustBF: Robust Solution to the Behrens-Fisher Problem

## Description

Performs robust Welch's (RW) two sample t-test to test the equality of means of two long-tailed symmetric (LTS) distributions when the variances are not equal.

## Usage

 1 RW(y1, y2) 

## Arguments

 y1 numeric vector of sample 1 y2 numeric vector of sample 2

## Details

RW test based on adaptive modifed maximum likelihood (AMML) estimators is proposed as a robust alternative to Welch's t-test (Welch, 1938). The test statistic is formulated as follows

RW = \frac{({\hat{μ}_{1}}-{\hat{μ}_{2}})-(μ_1-μ_2)}{√{(\hat{σ}_{1}^2/M_1)+ (\hat{σ}_{2}^2/M_2)}}.

where \hat{μ}_{i} and \hat{σ}_{i} are the AMML estimators of the location and scale parameters (i,=1,2), see e.g. Tiku and Surucu (2009), Donmez (2010).

The null distribution of RW is approximately distributed as Student's t with degrees of freedom

df = \frac{((\hat{σ}_{1}^2/M_1)+(\hat {σ}_{2}^2/M_2))^2}{{(\hat{σ}_{1}^2/M_1)^2/(n_1-1)}+{(\hat{σ}_{2}^2/M_2)^2/(n_2-1)}}.

For further details, see Guven et al. (2021)

## Value

A list with class "htest" containing the following components:

 statistic the value of the robust Welch's two sample t-test. parameter the degrees of freedom for the robust Welch's two sample t-test. p.value the p-value for the robust Welch's two sample t-test. estimate the AMML estimates of the location and scale parameters. null.value the specified hypothesized value of the mean difference. alternative a character string describing the alternative hypothesis. method a character string indicating which test is used. data.name a character string giving the name(s) of the data.

## Author(s)

Gamze Guven <gamzeguven@ogu.edu.tr>

## References

Donmez, A. (2010). Adaptive estimation and hypothesis testing methods [dissertation]. Ankara:METU.

Guven, G., Acitas, S., Samkar, H., Senoglu, B. (2021). RobustBF: An R Package for Robust Solution to the Behrens-Fisher Problem. RJournal (submitted).

Tiku, M. L. and Surucu, B. (2009). MMLEs are as good as M-estimators or better. Statistics & probability letters, 79(7):984-989.

Welch, B.L. (1938). The significance of the difference between two means when the population variances are unequal. Biometrika, 29(3/4):350–362.

## Examples

  1 2 3 4 5 6 7 8 9 10 11 12 13 # The following two samples (y1 and y2) # come from LTS distributions with # heterogeneous variances y1 <- c(0.55, 1.39, 2.01, 0.41, 0.32, -0.31, -1.06, -0.84, 1.02, 0.02, -0.96, 0.18, 0.49, 0.03, 0.77, 0.02, 0.56, 0.46, -0.65, -0.27) y2 <- c(7.25, 7.98, -0.24, 8.93, -0.16, 32.28, 3.81, 2.32, 14.73, 6.27, 8.07, 7.24, 7.18, 3.75, 11.48, 6.46, 1.01, 5.35, -0.34, 4.34) # RW test RW(y1, y2) 

RobustBF documentation built on Nov. 15, 2021, 5:08 p.m.