\HeaderA{get.index}{Function to compute indices for ordering hypotheses in Package 'multtest'}{get.index}
\keyword{htest}{get.index}
\keyword{internal}{get.index}
\begin{Description}\relax
The hypotheses tested in a multiple testing procedure (MTP), can be ordered based on the output of that procedure. This function orders hypotheses based on adjusted p-values, then unadjusted p-values (to break ties in adjusted p-values), and finally test statistics (to break remaining ties).
\end{Description}
\begin{Usage}
\begin{verbatim}
get.index(adjp, rawp, stat)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{adjp}] Numeric vector of adjusted p-values.
\item[\code{rawp}] Numeric vector of unadjusted ("raw") marginal p-values.
\item[\code{stat}] Numeric vector of test statistics.
\end{ldescription}
\end{Arguments}
\begin{Value}
Numeric vector of indices so that the hypotheses can be ordered accroding to significance (smallest p-values and largest test statistics first). This function is used in the plot method for objects of class \code{MTP} to order adjusted p-values for graphical summaries. The summary method for objects of class \code{MTP} will return these indices as its second component.
\end{Value}
\begin{Author}\relax
Katherine S. Pollard
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{MTP}{MTP}}, \code{\LinkA{plot,MTP-method}{plot,MTP.Rdash.method}}, \code{\LinkA{summary,MTP-method}{summary,MTP.Rdash.method}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
data<-matrix(rnorm(200),nr=20)
mtp<-MTP(X=data,test="t.onesamp")
index<-get.index(adjp=mtp@adjp,rawp=mtp@rawp,stat=mtp@statistic)
mtp@statistic[index]
mtp@estimate[index]
apply(data[index,],1,mean)
\end{ExampleCode}
\end{Examples}

