Learn R Programming

ezcox (version 1.0.4)

filter_ezcox: Filter ezcox

Description

Filter ezcox

Usage

filter_ezcox(x, levels = "auto", type = c("both", "contrast", "ref"))

Value

a ezcox object

Arguments

x

a ezcox object from ezcox().

levels

levels to filter, default is 'auto', it will filter all control variables.

type

default is 'both' for filtering both contrast level and reference level. It can also be 'contrast' for filtering only contrast level and 'ref' for filtering only reference level.

Author

Shixiang Wang w_shixiang@163.com

Examples

Run this code
library(survival)
lung$ph.ecog <- factor(lung$ph.ecog)
zz <- ezcox(lung, covariates = c("sex", "age"), controls = "ph.ecog")
zz
filter_ezcox(zz)
filter_ezcox(zz, c("0", "2"))
filter_ezcox(zz, c("0", "2"), type = "contrast")
t <- filter_ezcox(zz, c("0", "2"), type = "ref")
t

Run the code above in your browser using DataLab