\HeaderA{coxfilter}{A filter function for univariate Cox regression.}{coxfilter}
\keyword{manip}{coxfilter}
\begin{Description}\relax
A function that performs Cox regression with bindings for \code{surt},
\code{cens}, and \code{p} is returned. This function filters genes
according to the attained p-value from a Cox regression using
\code{surt} as the survival times, and \code{cens} as the censoring
indicator. It requires \code{survival}.
\end{Description}
\begin{Usage}
\begin{verbatim}
coxfilter(surt, cens, p)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{surt}] Survival times.
\item[\code{cens}] Censoring indicator. 
\item[\code{p}] The p-value to use in filtering. 
\end{ldescription}
\end{Arguments}
\begin{Value}
Calls to the \code{\LinkA{coxph}{coxph}} function in the \code{survival}
library are used to fit a Cox model. The filter function returns
\code{TRUE} if the p-value in the fit is less than \code{p}.
\end{Value}
\begin{Author}\relax
R. Gentleman
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{Anova}{Anova}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
   set.seed(-5)
   sfun <- coxfilter(rexp(10), ifelse(runif(10) < .7, 1, 0), .05)
   ffun <- filterfun(sfun)
   dat <- matrix(rnorm(1000), ncol=10)
   out <- genefilter(dat, ffun)
\end{ExampleCode}
\end{Examples}


