\HeaderA{bootstrapT}{Calculate bootstrap p-values for t statistics}{bootstrapT}
\keyword{methods}{bootstrapT}
\begin{Description}\relax
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.
\end{Description}
\begin{Usage}
\begin{verbatim}
bootstrapT(x, k=20000, obs1, obs2, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] numerical matrix to be bootstrapped. The t statistics is
calculated by row using the column indexes given by \code{obs1} and
\code{obs2} for the two groups tested.
\item[\code{k}] number of bootstrap re-samplings to be done. Defaults to 20000.
\item[\code{obs1}] logical or numerical column indexes of the first group.
\item[\code{obs2}] logical or numerical column indexes of the second group.
\item[\code{...}] additional parameters for \code{\LinkA{t.test}{t.test}}
function from package \emph{stats}.
\end{ldescription}
\end{Arguments}
\begin{Value}
The result of this function is a numerical matrix with number of rows
given by the rows of the argument \code{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 \code{x}.
\end{Value}
\begin{Author}\relax
Gustavo H. Esteves <\email{gesteves@vision.ime.usp.br}>
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{t.test}{t.test}} from package \emph{stats}.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
z <- matrix(rnorm(100, 0, 1), 4, 25)
bootstrapT(z, k=100, obs1=1:14, obs2=15:25)
\end{ExampleCode}
\end{Examples}

