View source: R/svycox.calibrate.R
svycox.calibrate | R Documentation |
Checks the calibration of a nomogram for a survey-weighted Cox model.
svycox.calibrate(.nom, .timept = .nom$pred.at, .ngroup = 5)
.nom |
a nomogram object from svycox.nomogram |
.timept |
the time point at which calibration will take place; defaults to the time value of the prediction axis in the nomogram |
.ngroup |
number of groups to be formed for validation purposes |
returns a matrix of calibration values and plots them
Mithat Gonen, Marinela Capanu
Marinela Capanu, Mithat Gonen (2015). Building a Nomogram for Survey-Weighted Cox Models Using R. Journal of Statistical Software, Code Snippets, 64(1), 1-17. URL https://www.jstatsoft.org/v64/c01/.
library(survey) library(rms) data(noNA) dd=datadist(noNA) options(datadist="dd") dstr2=svydesign(id=~1, strata=~group, prob=~inv_weight, fpc=~ssize, data=noNA) mynom=svycox.nomogram(.design=dstr2, .model=Surv(survival,surv_cens)~ECOG+liver_only+Alb+Hb+Age+ Differentiation+Gt_1_m1site+lymph_only, .data=noNA, pred.at=24, fun.lab="Prob of 2 Yr OS") svycox.calibrate(mynom)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.