calc_risk {cgrcusum}  R Documentation 
This function can be used to calculate the risk associated with the covariates of an individual under a specified Cox PH model.
calc_risk(data, coxphmod = NULL)
data 
data frame containing the covariates to be used for riskadjustment as named columns. 
coxphmod 
(optional) a cox proportional hazards model generated using

The subject specific increased risk is given by:
e^{\beta Z_i}
with \beta
the Cox coefficients and Z_i the covariates of subject i.
A vector of nrow(data) specifying the increased risk of failure for each subject.
Daniel Gomon
Other utils:
exp_hazards
,
gen_arriv_times()
,
gen_surv_times()
,
runlength()
crdat < data.frame(age = rnorm(10, 40, 5), BMI = rnorm(10, 24, 3))
crlist < list(formula = as.formula("~age + BMI"), coefficients = c("age"= 0.02, "BMI"= 0.009))
calc_risk(crdat, crlist)