Announcement

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

  • stpm2 does not converge

    Hi listers,

    I am running a multivariate model using stpm2 in Stata15.

    I have 6,500 observations and 9 categorical variables I am interested in as exposures/confounders; of these, 4 do not meet the proportional hazard assumptions so I am specifying them as time-dependent. The model, however, does not converge as I get the following message: "cannot compute an improvement -- discontinuous region encountered".

    The issue is related to the inclusion of the time-dependent exposures. The model runs with 2 of the 4 (which are confounders in the model) and similarly it runs when I enter the 2 time-varying exposures one at the time but not together.

    I tried modifying the number of knots but this did not help.

    Collapsing categories for one of the time-varying exposures works.

    Is there anything else I should be considering?

    Thanks

  • #2
    You'll increase your chances of a helpful answer by following the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output, and sample data.

    stpm2 is user written so getting an answer to such a technical question depends on whether one of the active folks on the Forum happens to use the program. With many maximum likelihood estimators, it is possible to get such optimization problems. Simplifying the model and building up is often a good strategy. There are also several different options that modify the optimization process - the stpm2 documentation mentions these. Sometimes different methods of optimization or using the difficult option fixes things. Alternatively, you may be able to override the starting values - starting at a different location might help. There may be stpm2 options that I do not know that might make a difference as well. If all else fails, you can contact the authors of the routine.

    .

    Comment

    Working...
    X