filter_ezcox {ezcox}R Documentation

Filter ezcox

Description

Filter ezcox

Usage

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

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.

Value

a ezcox object

Author(s)

Shixiang Wang w_shixiang@163.com

Examples

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

[Package ezcox version 1.0.4 Index]