rt.test: Robustified t-test

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Performs robustified one-sample t-test on a vector of data.

Usage

1
2
rt.test(x, alternative = c("two.sided", "less", "greater"), 
  mu = 0, test.stat = c("TA", "TB"), conf.level = 0.95)

Arguments

x

vector of quantiles.

alternative

a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less". You can specify just the initial letter.

mu

a number indicating the true value of the mean.

test.stat

a character string specifying the test statistic.

conf.level

confidence level of the interval.

Details

Based on the empirical distributions of the TA statistic (based on median and MAD) and the TB statistic (based on Hodges-Lehmann and Shamos), this function performs one-sample robustified t-test.

Value

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

statistic

the value of the test statistic.

parameter

sample size (non-missing observations in the sample).

p.value

the p-value for the test.

conf.int

a confidence interval for the mean appropriate to the specified alternative hypothesis.

estimate

the specified hypothesized value of the median (TA) or the Hodges-Lehmann (TB).

sample.size

numeric scalar containing the number of non-missing observations in the sample used for the hypothesis test

null.value

the specified hypothesized value of the true mean.

alternative

a character string describing the alternative hypothesis.

method

a character string indicating which statistic (TA or TB) is used.

data.name

a character string giving the name(s) of the data.

Author(s)

Chanseok Park and Min Wang

References

Park, C. and M. Wang (2018). Empirical distributions of the robustified t-test statistics. ArXiv e-prints, 1807.02215. https://arxiv.org/abs/1807.02215

Jeong, R., S. B. Son, H. J. Lee, and H. Kim (2018). On the robustification of the z-test statistic. Presented at KIIE Conference, Gyeongju, Korea. April 6, 2018.

Park, C. (2018). Note on the robustification of the Student t-test statistic using the median and the median absolute deviation. ArXiv e-prints, 1805.12256. https://arxiv.org/abs/1805.12256

See Also

t.test for performing the Student t-test.
prop.test for testing the proportion.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# For robustified t-test (two-sided) using median and MAD (TA).
#    test.stat="TA" (default)
x = rnorm(10) 
rt.test(x)

# For robustified t-test (two-sided) using Hodges-Lehmann and Shamos (TB).
x = rnorm(10)
rt.test(x, test.stat="TB")

# 90% CI (two sides).
x = rnorm(10)
rt.test(x, conf.level=0.9)

# 90% CI (one side).
x = rnorm(10)
rt.test(x, alternative="less", conf.level=0.9)

rt.test documentation built on May 2, 2019, 6:02 a.m.

Related to rt.test in rt.test...