Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • stpm2cr - Maximum Number of Iterations Reached

    Hi everyone,

    I'm using -stpm2cr- to model the effect of a treatment on a set of cardiovascular outcomes over a three year period. I can plot the cumulative incidence figures without any trouble. However, when I attempt to use the same predict code to obtain point estimates and confidence intervals of time points along the way (1 month, 1 year, 2 years, and 3 years), I occasionally get an error that says:

    -Maximum number of iterations exceeded.-

    Once the error hits, the code stops and I can do no more.

    I can't find any reference to this in the documentation and Google isn't turning up much. Any advice for how to deal with this? The data must be in there somewhere in order for plots to be generated, I'd welcome suggestions for how to address this.

    Thanks!

  • #2
    Hi everyone,

    For anyone keeping track, there is a setting to modify the number of iterations from a default of 300 to a maximum of 16000. The command to set iterations to 1000, for example, is set maxiter 1000. I have done this but it doesn't seem to have helped much. Interestingly, the pattern seems to be that this error is thrown at 30 days most often, when event rates are low. Maybe there aren't enough events to provide an estimate? Will post again to the thread as I work out the problem further.

    Comment

    Working...
    X