bootstrapT {maigesPack} | R Documentation

## Calculate bootstrap p-values for t statistics

### Description

This function takes a numerical matrix and column indexes for two groups to calculate bootstrapped (by re-sampling) p-values comparing the equality of means from the two groups.

### Usage

    bootstrapT(x, k=20000, obs1, obs2, ...)

### Arguments

`x` | numerical matrix to be bootstrapped. The t statistics is calculated by row using the column indexes given by `obs1` and `obs2` for the two groups tested.
`k` | number of bootstrap re-samplings to be done. Defaults to 20000.
`obs1` | logical or numerical column indexes of the first group.
`obs2` | logical or numerical column indexes of the second group.
`...` | additional parameters for `t.test` function from package stats.

### Value

The result of this function is a numerical matrix with number of rows given by the rows of the argument `x` and 3 columns. The first column contain the difference of means between the two groups, the second one contain the original t statistic and the last one gives the bootstrapped p-values, for all rows of the matrix `x`.

### Author(s)

Gustavo H. Esteves <gesteves@vision.ime.usp.br>

### See Also

`t.test` from package stats.

### Examples

    z <- matrix(rnorm(100, 0, 1), 4, 25)
    bootstrapT(z, k=100, obs1=1:14, obs2=15:25)

[Package maigesPack version 1.4.0 Index]