\HeaderA{rowpAUCs}{Rowwise ROC and pAUC}{rowpAUCs}
\keyword{math}{rowpAUCs}
\begin{Description}\relax
Fast rowwise calculation of ROC curves and pAUC.
\end{Description}
\begin{Usage}
\begin{verbatim}
rowpAUCs(x, fac, cutpts, p=0.1)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] \code{exprSet} or numeric matrix. The matrix must not
contain \code{NA} values.
\item[\code{fac}] Factor; if \code{x} is an \code{exprSet}, this may also be
a character vector of length 1 with the name of a covariate
variable in \code{x}. \code{fac} must have exactly 2 levels.
\item[\code{cutpts}] Matrix with same number of rows as \code{x} or vector
of length greater than 1. It specifies the thresholds for the
calculation of the ROC curves. Smaller numbers may further speed up
computations. If missing, the ROC curves are calculated between data
points.
\item[\code{p}] Numeric vector of length 1. Limit in (0,1) to integrate pAUC to.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Rowwise calculation of Receiver Operating
Characteristic (ROC) curves and the corresponding partial area under
the curve (pAUC) for a given data matrix or \code{exprSet}. The
function is implemented in C and thus reasonably fast and memory
efficient.

The definition of the pAUC uses a naive trapezoidal rule
which, although less accurate, is faster than
more elaborate integrators.
\end{Details}
\begin{Value}
A list with the calculated specificities and sensitivities for each
row as matrices, and the corresponding pAUCs.
\end{Value}
\begin{Author}\relax
Florian Hahne <f.hahne@dkfz.de>
\end{Author}
\begin{References}\relax
Pepe MS, Longton G, Anderson GL, Schummer M.:  Selecting
differentially expressed genes from microarray experiments. \emph{Biometrics. 2003 Mar;59(1):133-42.}
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{rocdemo.sca}{rocdemo.sca}, \LinkA{rocdemo.sca}{rocdemo.sca}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
  
   data(eset)

   r1 = rowttests(eset, "cov2")
   r2 = rowpAUCs(eset, "cov2")

 if(interactive()) {
   plot(r2$pAUC, r1$statistic, pch=16)
   plot(1-r2$spec[1,], r2$sens[1,], pch=16)
 }
\end{ExampleCode}
\end{Examples}


