bootstrapT {maigesPack} | R Documentation |
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.
bootstrapT(x, k=20000, obs1, obs2, ...)
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. |
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
.
Gustavo H. Esteves <gesteves@vision.ime.usp.br>
t.test
from package stats.
z <- matrix(rnorm(100, 0, 1), 4, 25) bootstrapT(z, k=100, obs1=1:14, obs2=15:25)