mycph: Perform coxph of individual expecting variables

Description Usage Arguments Value Examples

View source: R/mycph.R

Description

Perform coxph of individual expecting variables

Usage

1
mycph(formula, data, digits = 2)

Arguments

formula

An object of class "formula". Left side of ~ must be a variable of class Surv and the right side of ~ must have variables in an additive way.

data

A data.frame contains data for analysis.

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% confidence intervals and the p values.

Examples

1
2
3
4
5
6
7
require(survival)
data(cancer)
attach(colon)
colon$TS=Surv(time,status==1)
out=mycph(TS~.,data=colon)
out
HRplot(out,type=2,show.CI=TRUE,main="Hazard ratios of all individual variables")

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