calibrate curve for binary logistic model in rms packages
1
0
Entering edit mode
5.7 years ago

I do an binary logistic regression to construct an nomogram. And then do an calibrate curve to Resampling Model Calibration. the code is list below:

library(rms)
f1 <- lrm(Recurrence_1_year~AFP_Categ_200+Tumor_Diameter_Categ+Macro_Tumor_Thrombus,
               data = Training_nom,
               x=TRUE,
               y=TRUE)     
plot(cal,
      subtitles=FALSE,                    
      conf.int=TRUE,                              
      cex.subtitles=.75,                  
      riskdist=FALSE,                     
      add=FALSE,
      scat1d.opts=list(nhistSpike=1000), 
      par.corrected=list(col="red",lty=4,lwd=4))

when i run the code, many warnings present in the interface of R-studio, those warnings are like those:

1: In plot.window(...) : "conf.int" not graphic paremeters
2: In plot.window(...) : "cex.subtitles"not graphic paremeters
3: In plot.window(...) : "riskdist"not graphic paremeters
4: In plot.window(...) : "add"not graphic paremeters
5: In plot.window(...) : "par.corrected"not graphic paremeters
6: In plot.xy(xy, type, ...) : "conf.int"not graphic paremeters
7: In plot.xy(xy, type, ...) : "cex.subtitles"not graphic paremeters
8: In plot.xy(xy, type, ...) : "riskdist"not graphic paremeters
9: In plot.xy(xy, type, ...) : "add"not graphic paremeters
10: In plot.xy(xy, type, ...) : "par.corrected"not graphic paremeters
11: In axis(side = side, at = at, labels = labels, ...) : "conf.int"not graphic paremeters
12: In axis(side = side, at = at, labels = labels, ...) : "cex.subtitles"not graphic paremeters
13: In axis(side = side, at = at, labels = labels, ...) : "riskdist"not graphic paremeters
14: In axis(side = side, at = at, labels = labels, ...) : "add"not graphic paremeters
15: In axis(side = side, at = at, labels = labels, ...) :  "par.corrected"not graphic paremeters
16: In axis(side = side, at = at, labels = labels, ...) : "conf.int"not graphic paremeters
17: In axis(side = side, at = at, labels = labels, ...) : "cex.subtitles"not graphic paremeters
18: In axis(side = side, at = at, labels = labels, ...) : "riskdist"not graphic paremeters
19: In axis(side = side, at = at, labels = labels, ...) : "add"not graphic paremeters
20: In axis(side = side, at = at, labels = labels, ...) : "par.corrected"not graphic paremeters
21: In box(...) : "conf.int"not graphic paremeters
22: In box(...) : "cex.subtitles"not graphic paremeters
23: In box(...) : "riskdist"not graphic paremeters
24: In box(...) : "add"not graphic paremeters
25: In box(...) : "par.corrected"not graphic paremeters
26: In title(...) : "conf.int"not graphic paremeters
27: In title(...) : "cex.subtitles"not graphic paremeters
28: In title(...) : "riskdist"not graphic paremeters
29: In title(...) : "add"not graphic paremeters
30: In title(...) : "par.corrected"not graphic paremeters

All the parameters list in the warnings was also list in the introduction of the rms packages, which also played an important role in getting a adjustment for the plot. So I wonder to know there is any mistake when i do the calculate. And some one encounter the same problem. Could you share your method to solve the problem. Thanks very much.

R software error • 4.6k views
ADD COMMENT
0
Entering edit mode
5.6 years ago

Hey,

You forgot the calibrate() function. Try this, instead:

library(rms)

f1 <- lrm(Recurrence_1_year~AFP_Categ_200+Tumor_Diameter_Categ+Macro_Tumor_Thrombus,
               data = Training_nom,
               x=TRUE,
               y=TRUE)     

cal <- calibrate(f1, group=Recurrence_1_year)

plot(cal,
      subtitles=FALSE,                    
      conf.int=TRUE,                              
      cex.subtitles=.75,                  
      riskdist=FALSE,                     
      add=FALSE,
      scat1d.opts=list(nhistSpike=1000), 
      par.corrected=list(col="red",lty=4,lwd=4))

Kevin

ADD COMMENT

Login before adding your answer.

Traffic: 1943 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6