boot.t.test | R Documentation |
Performs the bootstrap t-test as described in Algorithm 16.2 in Efron and Tibshirani (1993).
boot.t.test(x, y, reps = 1000, mu = 0, alternative = c("two.sided", "less", "greater"))
x |
Vector of values from the first group. |
y |
Vector of values from the second group. |
reps |
Number of bootstrap replications to use. |
mu |
Null hypothesised difference between the group means. |
alternative |
The alternative hypothesis to use (default = "two.sided"). |
The numerator of the test statistic is calculated as (x - y) - mu
.
Returns a list containing the following items:
mu0 |
The null hypothesised difference. |
statistic |
The test statistic. |
alternative |
Alternative hypothesis. |
p.value |
The p-value for the test. |
Theo Pepler
Efron, B. and Tibshirani, R. (1993). An Introduction to the Bootstrap. Chapman and Hall/CRC.
xvec <- rnorm(15)
yvec <- rnorm(15) - 0.7
boot.t.test(x = xvec, y = yvec)
boot.t.test(x = xvec, y = yvec, mu = 0.7)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.