| coxfilter {genefilter} | R Documentation |
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.
coxfilter(surt, cens, p)
surt |
Survival times. |
cens |
Censoring indicator. |
p |
The p-value to use in filtering. |
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.
R. Gentleman
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)