filter_ezcox: Filter ezcox

Description Usage Arguments Value Author(s) Examples

View source: R/filter_ezcox.R

Description

Filter ezcox

Usage

1
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

1
2
3
4
5
6
7
8
9
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

ezcox documentation built on Oct. 28, 2021, 5:08 p.m.