mycph {moonBook}R Documentation

Perform coxph of individual expecting variables

Description

Perform coxph of individual expecting variables

Usage

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

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")

[Package moonBook version 0.3.1 Index]