Learn R Programming

survC1 (version 1.0-3)

Est.PH: Derivation of a risk score by a Cox proportioal hazarzs model

Description

Provides risk score by fitting data to a Cox's proportional hazards model with a given set of predictors.

Usage

Est.PH(mydata)

Arguments

mydata

Input data. The 1st column should be time-to-event, and the 2nd column is event indicator (1=event, 0=censor). The rest of the columns are covariates/predictors used in the model. No character variable or missing is allowed.

Value

beta

Estimates for regression coefficient in the Cox model

var

Variance-Covariance matrix for the beta above

rs

Risk score of each individual

ft

coxph object with the fitted model

Examples

Run this code
# NOT RUN {
D=CompCase(pbc[1:200,c(2:4,10:14)]) 
D[,2]=as.numeric(D[,2]==2)

ft=Est.PH(D)

# }

Run the code above in your browser using DataLab