trimmed_t {robnptests}R Documentation

Test statistic for the two-sample trimmed t-test (Yuen's t-test)

Description

trimmed_t calculates the test statistic for the two-sample trimmed t-test.

Usage

trimmed_t(x, y, gamma = 0.2, na.rm = FALSE)

Arguments

x

a (non-empty) numeric vector of data values.

y

a (non-empty) numeric vector of data values.

gamma

a numeric value in [0, 0.5] specifying the fraction of observations to be trimmed from each end of the sample before calculating the mean. The default value is 0.2.

na.rm

a logical value indicating whether NA values in x and y should be stripped before the computation proceeds. The default is na.rm = FALSE.

Value

A named list containing the following components:

statistic

the value of the test statistic.

estimates

the trimmed means for both samples.

df

the degrees of freedom for the test statistic.

References

Yuen KK, Dixon WT (1973). “The approximate behaviour and performance of the two-sample trimmed t.” Biometrika, 60(2), 369–374. doi:10.2307/2334550.

Yuen KK (1974). “The two-sample trimmed t for unequal population variances.” Biometrika, 61(1), 165–170. doi:10.2307/2334299.

Examples

# Generate random samples
set.seed(108)
x <- rnorm(20); y <- rnorm(20)

# Compute trimmed t-statistic
trimmed_t(x, y, gamma = 0.2)


[Package robnptests version 1.1.0 Index]