coxfilter {genefilter}R Documentation

A filter function for univariate Cox regression.

Description

A function that performs Cox regression with bindings for surt, cens, and p is returned. This function filters genes according to the attained p-value from a Cox regression using surt as the survival times, and cens as the censoring indicator. It requires survival.

Usage

coxfilter(surt, cens, p)

Arguments

surt Survival times.
cens Censoring indicator.
p The p-value to use in filtering.

Value

Calls to the coxph function in the survival library are used to fit a Cox model. The filter function returns TRUE if the p-value in the fit is less than p.

Author(s)

R. Gentleman

See Also

Anova

Examples

   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)

[Package genefilter version 1.8.0 Index]