extractHR: Extract hazard ratio from a data.frame

Description Usage Arguments Value Examples

View source: R/mycph.R

Description

Extract hazard ratio from a data.frame

Usage

1
extractHR(x, digits = 2)

Arguments

x

an object of class coxph

digits

An integer indicating the number of decimal places (round) or significant digits to be used. Default value is 2.

Value

a data.frame consist of hazard ratio and 95 the p values.

Examples

1
2
3
4
require(survival)
data(cancer)
fit=coxph(Surv(time,status)~age+sex+obstruct+perfor,data=colon)
extractHR(fit)

moonBook documentation built on Jan. 5, 2022, 9:06 a.m.