\HeaderA{estErrProbMethodOfMoments}{Estimate false positive and false negative error probabilities
by method moments.}{estErrProbMethodOfMoments}
\keyword{manip}{estErrProbMethodOfMoments}
\begin{Description}\relax
Estimate false positive and false negative error probabilities
by method moments.
\end{Description}
\begin{Usage}
\begin{verbatim}
estErrProbMethodOfMoments(nint, nrec, nunr, ntot)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{nint}] Integer vector. True number of interactions. Typically,
the function is called for a range of these, returning all possible
solutions for that range.
\item[\code{nrec}] Integer scalar. Observed number of reciprocated edges.
\item[\code{nunr}] Integer scalar. Observed number of unreciprocated edges.
\item[\code{ntot}] Integer scalar. Number of proteins which were tested twice
(e.g. both as viable bait and as viable prey).
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The model is described in the vignette
\emph{Stochastic and systematic errors in PPI data, by looking
at unreciprocated in- or out-edges}
by W. Huber, T. Chiang and R. Gentleman.
\end{Details}
\begin{Value}
Matrix with 5 columns \code{nint} (a copy of the input argument),
\code{pfp1}, \code{pfn1}, \code{pfp2} and \code{pfn2}, and as many
rows as the length of \code{nint}.
\end{Value}
\begin{Author}\relax
Wolfgang Huber \url{http://www.ebi.ac.uk/huber}
\end{Author}
\begin{Examples}
\begin{ExampleCode}

est = estErrProbMethodOfMoments(nint=seq(8000, 40000, by=100), nrec=9722, nunr=15856, ntot=2000)
if(interactive()) {
  plot(est[, c("pfp2", "pfn2")], type="l", col="blue", lwd=2,
       xlab=expression(p[FP]), ylab=expression(p[FN]))
  abline(h=0, v=0, lty=2)
}
\end{ExampleCode}
\end{Examples}

