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

Description Usage Arguments Value Examples

View source: R/FUN-cstat-ver003b.R

Description

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

Usage

1
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

1
2
3
4
D=CompCase(pbc[1:200,c(2:4,10:14)]) 
D[,2]=as.numeric(D[,2]==2)

ft=Est.PH(D)

survC1 documentation built on Feb. 10, 2021, 5:06 p.m.