Description Usage Arguments Examples
predict centered relative risk from coxph object
1 2 | ## S3 method for class 'coxph'
rr_pred(model, newdata, center, conf.level = 0.95)
|
model |
coxph object |
newdata |
data.frame |
center |
center variable |
conf.level |
The confidence level to use for the confidence interval. |
1 2 3 4 5 | library(survival)
fit <- coxph(Surv(time, status) ~ age + ph.ecog + strata(inst), lung)
newdata <- expand.grid(age = 50, ph.ecog = 0:3, inst = 11)
rr_pred(fit, newdata, center = c(ph.ecog = 0))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.