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

Example output

Loading required package: survival

 mycph : perform coxph of individual expecting variables

 Call: TS ~ ., data= colon 

study  was excluded : NA
status  was excluded : infinite
            HR  lcl  ucl     p
id        1.00 1.00 1.00 0.317
rxLev     0.98 0.84 1.14 0.786
rxLev+5FU 0.64 0.55 0.76 0.000
sex       0.97 0.85 1.10 0.610
age       1.00 0.99 1.00 0.382
obstruct  1.27 1.09 1.49 0.003
perfor    1.30 0.92 1.85 0.142
adhere    1.37 1.16 1.62 0.000
nodes     1.09 1.08 1.10 0.000
differ    1.36 1.19 1.55 0.000
extent    1.78 1.53 2.07 0.000
surg      1.28 1.11 1.47 0.001
node4     2.47 2.17 2.83 0.000
time      0.64 0.62 0.66 0.000
etype     0.81 0.71 0.92 0.001

moonBook documentation built on Jan. 13, 2021, 6:43 a.m.