[R] Problem with calibrate function

Frank E Harrell Jr f.harrell at vanderbilt.edu
Fri Dec 11 22:18:30 CET 2009

Rodrigo wrote:
> Frank E Harrell Jr wrote:
>> Rodrigo wrote:
>>> Hi,
>>> I´m trying to use the calibrate function from rms package (made by prof.
>>> Harrell) after fitting a model using cph. But it returns the following
>>> error
>>> message:
>>>> calibrate(modelo1,B=200,bw=F,u=13)
>>> Using Cox survival estimates at  13 Days
>>> Convergence problems.... stopping addition
>>> Error in hare(S[, 1], S[, 2], fun(est.surv), maxdim = maxdim, ...) :
>>>  no convergence
>>>  this is serious!
>>> Has anybody experienced the same problem? Can anyone help me?
>>> many thanks,
>>> Rodrigo
>> Rodrigo,
>> This is a new feature in rms and there are probably a few warnings I 
>> need to put in the help file.  How many events are in the dataset used 
>> to develop your model?  Why did you specify bw=FALSE (which is the 
>> default)?  Did you use any variable selection when building the model?
>> Frank
>> -- 
>> Frank E Harrell Jr   Professor and Chair           School of Medicine
>>                       Department of Biostatistics   Vanderbilt University
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
> Professor Harrell,
> There is 186 observations leading to 31 events. The bw=false option
> was slip, as I was trying different options to see if could run the
> command. As expected being the default option, without it gives me the
> same error message.
> No automated variable selection model was used. Only variables that
> were significant on the univariate analysis and clinically important
> were used (4 predictors).

This is a serious problem, invalidating any resampling procedure you 
use.  You have to repeat the variable selection fresh for each resample. 
  That is a much bigger issue than the problem with calibrate.

Univariable screening is a terrible idea; see
   author = {Sun, {Guo-Wen} and Shook, Thomas L. and Kay, Gregory L.},
   year = 1996,
   title = {Inappropriate use of bivariable analysis to screen risk 
factors for
           use in multivariable analysis},
   journal = J Clin Epi,
   volume = 49,
   pages = {907-916},
   annote = {univariable screening;variable selection;stepwise}

If you want to use save(..., file='...', compress=TRUE) and attach the 
model fit object you are running with calibrate( ) I will try to debug 
while you are figure out how to do the complete resampling procedure.

> Thanks for the quick reply,
> Rodrigo

Frank E Harrell Jr   Professor and Chair           School of Medicine
                      Department of Biostatistics   Vanderbilt University

More information about the R-help mailing list