coxfilter: A filter function for univariate Cox regression.

Description Usage Arguments Value Author(s) See Also Examples

View source: R/all.R

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

1
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

1
2
3
4
5
   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)

genefilter documentation built on Oct. 31, 2019, 3:15 a.m.