\HeaderA{ROC.FCS}{ROC (Receiver Operating Characteristic) Curve: 
Percentage Positives for Flow Cytometry data}{ROC.FCS}
\keyword{dplot}{ROC.FCS}
\keyword{aplot}{ROC.FCS}
\begin{Description}\relax
This function plots an ROC curve based on cutoff values from the
observed combined dataset of hivpos and hivneg, which both are vectors of
patient-specific percentage positives based on the 99.9th percentile of the
corresponding control sample distribution.  The output contains
the sensitivities, 1-specificity,and the observed dataset, cutoff values.
\end{Description}
\begin{Usage}
\begin{verbatim}
ROC.FCS(hivpos, hivneg, lineopt = 1, colopt = 1, overlay = FALSE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{hivpos}] numerical vector of percentage positives for the HIV
positive individuals/samples for a given condition
\item[\code{hivneg}] numerical vector of the percentage positives for the HIV
negative individuals/samples for a given condition
\item[\code{lineopt}] numerical value for the lty option of the plot  (line type)
\item[\code{colopt}] numerical value for the col option of the plot (color type)
\item[\code{overlay}] Boolean expression as to whether or not the plot is an overlay
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
See 'PerPosROC' in the 'rfcdorig' package for a description of the input data and
how percentage positives are defined.

The ROC curve in the example demonstrates that there is higher
predictive ability of using the GAG stimulated samples rather than
the PolA or PolB stimulated samples.
\end{Details}
\begin{Value}
Let T be the the percentage positives, c be a given value in c.obs, and
HIV+ defined as among HIV positive individuals, and HIV- defined as
among HIV negative individuals.

\begin{ldescription}
\item[\code{sensitivity}] numerical vector of the sensitivity=P(T>c | HIV+)
calculated corresponding to a given cut-off in c.obs
\item[\code{spec.complement}] numerical vector of 1-specificity= P(T>c | HIV
-)corresponding to a given cut-off in c.obs
\item[\code{c.obs}] a numerical vector of the cutoffs which were taken to be
the values of the observations (the values of the percentage positives 
of both the HIV positive and HIV negative data)
\end{ldescription}
\end{Value}
\begin{Author}\relax
A.J. Rossini and J.Y. Wan
\end{Author}
\begin{References}\relax
Zoe Moodie and Mario Roederer
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{PercentPos.FCS}{PercentPos.FCS}}, data 'PerPosROC' in 'rfcdorig'
package, \code{\LinkA{percentile.FCS}{percentile.FCS}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}

if (require(rfcdmin)){

data(PerPosROCmin)

#plotting the gag stimulated 100* percent positives
if (interactive()==TRUE){
GAG<-ROC.FCS(hivpos.gag, hivneg.gag)
#plotting the pola stimulated 100* percent positives
POLA<-ROC.FCS(hivpos.pola, hivneg.pola, lineopt=2, colopt=2, overlay=TRUE)
#plotting the polb stimulated 100* percent positives
POLB<-ROC.FCS(hivpos.polb, hivneg.polb, lineopt=4, colopt=3, overlay=TRUE)
legend(0.7, 0.7, c("gag", "polA", "polB"), col = c(1,2,3), lty=c(1,2,4))
}

}
\end{ExampleCode}
\end{Examples}

