\HeaderA{twilight.getlambda}{Internal function to compute regularization parameter lambda}{twilight.getlambda}
\keyword{internal}{twilight.getlambda}
\begin{Description}\relax
The SEP method optionally includes a penalty term in order to estimate the percentage of non-significant differences/genes.
\end{Description}
\begin{Usage}
\begin{verbatim}twilight.getlambda(xin, verbose = TRUE)\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{xin}] A numerical vector containing \eqn{p}{}-values.
\item[\code{verbose}] Logical value for message printing.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The function finds a suitable regularization parameter \eqn{\lambda}{}. For a sequence of lambdas, the objective function of SEP is computed for subsamples of the \eqn{p-value}{} vector \code{xin}. The final estimate is chosen based upon a Wilcoxon test comparison between objective function values of \eqn{\lambda=0}{} and each \eqn{\lambda>0}{}. The penalized objective function should not differ a lot from the unpenalized one. Therefore, the highest lambda that leads to a non-significant difference in means is chosen.
\end{Details}
\begin{Value}
Returns numerical value.
\end{Value}
\begin{Author}\relax
Stefanie Scheid \url{http://www.molgen.mpg.de/~scheid}
\end{Author}
\begin{References}\relax
Scheid S and Spang R (2004): A stochastic downhill search algorithm for estimating the local false discovery rate, \emph{IEEE TCBB} \bold{1(3)}, 98--108.

Scheid S and Spang R (2005): twilight; a Bioconductor package for estimating the local false discovery rate, \emph{Bioinformatics} \bold{21(12)}, 2921--2922. 

Scheid S and Spang R (2006): Permutation filtering: A novel concept for significance analysis of large-scale genomic data, in: Apostolico A, Guerra C, Istrail S, Pevzner P, and Waterman M (Eds.): \emph{Research in Computational Molecular Biology: 10th Annual International Conference, Proceedings of RECOMB 2006, Venice, Italy, April 2-5, 2006}. Lecture Notes in Computer Science vol. 3909, Springer, Heidelberg, pp. 338-347.
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{twilight}{twilight}}
\end{SeeAlso}

