[R] calibration plot labels

David Winsemius dwinsemius at comcast.net
Sun Aug 15 17:16:37 CEST 2010


On Aug 15, 2010, at 10:52 AM, paaventhan jeyaganth wrote:

>
> Dear all,
>
> when i do  the calibration plot,

Not a well defined operation ....
> i put the x label   y label , there is
>
> some labels are i did not put it , like  "resample optimism  
> added ..."  i
>
> want to get rid of the these label , is any body know how can i get  
> rid of these label.

Jumping ahead these didn't turn out to be "labels" but rather  
"subtitles". "Labels" generally refer to the text that are associated  
with tick marks.

>
> these are the following command i used

Presumably f is a fit object of some sort ....
>
> cal <- calibrate(f, u=12, method=c("boot"), B=100,m=70, data=a1)
>
> plot(cal,xlab="Predicted Survival", ylab="Actual Survival")

Next time you post you should indicate:
  -- what packages and version you are using.
  -- what code you used to create the object on which you are working
  -- a small example to create something like the object

Guessing that you were using something similar to the rms/Hmisc  
combination, I ran the first example in ?cph and then offered it to  
calibrate and plot. I then did:

 > class(cal)
[1] "calibrate"
 > methods(plot)  # turns out that plot.calibrate is visible so  
getAnywhere was not needed
 > plot.calibrate

... and looked at the code. There is a section where the value for  
"subtitles" is checked before creating the annotations in question.

Try:
plot(cal,xlab="Predicted Survival", ylab="Actual Survival",  
subtitles=FALSE)

I was then going to criticize my own behavior and say that I _should_  
have looked at the documentation first but when I did I did not  
initially find the subtitles argument documented in the listing of  
arguments, but I did eventually see it mentioned in the Usage section  
for the function plot.calibrate.

-- 
David.
>



David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list