# mcBFtest: Monte Carlo based tests as an alternative of Welch's... In mcBFtest: Monte Carlo Based Tests for the Behrens Fisher Problem as an Alternative to Welch's t-Approximation

## Description

In the t test, it is usually the case that the assumption of equal variances on the two groups is violated. The test problem is known as the Behrens-Fisher (BF) problem when no assumption of equal population variances can be made. For the BF problem, the T statistic provides value for a given dataset and its statistical distribution is not easy to characterise.

To our knowledge, the best approximation thus far is due to Welch (1938). The Welch<e2><80><99>s test involves two layers of approximations: approximating the distribution of the statistic by a t-distribution, which in turn depends on an approximate degrees of freedom.

The Monte Carlo based tests improve upon Welch<e2><80><99>s approximate test by avoiding one layer of approximation, resulting in enhancement in statistical power than Welch's t-approximation.

## Usage

 `1` ```mcBFtest(x, y, method, MC) ```

## Arguments

 `x` a (non-empty) numeric vector of data values `y` a (non-empty) numeric vector of data values `method` if "t" is used, we will use t-test assuming equal variance and df=n+m-2. If "W" is used, we assume unequal variance and the Welch approximation is used. If "Monte Carlo", the Monte Carlo procedure is applied. `MC` a number for Monte Carlo procedure

## Value

The function returns a list including

 `p.value` the p-value for the test.

## Author(s)

You-Gan Wang, Na Wang

## References

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

Ullah, I., Paul, S., Hong, Z., & Wang, Y-G. (2019). Significance tests for analyzing gene expression data with small sample sizes. Bioinformatics, in press.

`t.test` function from package `stats`

## Examples

 ```1 2 3 4 5 6 7 8``` ```library(mcBFtest) x <- sleep[1:10,1] y <- sleep[11:20,1] mcBFtest(x, y, method = "t") mcBFtest(x, y, method = "W") mcBFtest(x, y, method = "Monte Carlo", MC = 100000) ```

mcBFtest documentation built on May 2, 2019, 8:27 a.m.