filter_ezcox: Filter ezcox

View source: R/filter_ezcox.R

filter_ezcoxR 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

ezcox documentation built on May 31, 2023, 7:49 p.m.