Announcement

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

  • stpm2 r(1400) - initial values not feasible

    Hello everyone!

    I'm working on a predictive flexible parametric survival model and when I run the command with df(2) (with any scale) Stata cannot proceed and shows the error r(1400) which is not the case when using other df(). I would appreciate if anyone could explain me why, and suggest a solution for this problem.

    Thank you!

  • #2
    Welcome to Statalist. You didn't get a quick answer. You'll increase your chances of a useful answer by following the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output, and sample data using dataex. You don't even tell us precisely what you ran.

    When using a user written procedure, help depends on someone active on the list happening to be familiar with that particular kind of estimator and procedure. In more recent versions of Stata, Stata provides a set of survival models. I don't know if these do precisely what you need, but when you have a choice it is generally better to use the Stata provided procedure rather than a user written one. If it is absolutely essential to stpm2 with df(2), you may need to contact the program's authors.

    Comment


    • #3
      You may need to optimize the number of knots (and/or centiles) if you have an 'unusual' survival curve.

      Detailed info here: https://pclambert.net/software/stpm2...s_sensitivity/
      __________________________________________________ __
      Assistant Professor, Department of Biostatistics and Epidemiology
      School of Public Health and Health Sciences
      University of Massachusetts- Amherst

      Comment


      • #4
        Originally posted by Phil Bromiley View Post
        Welcome to Statalist. You didn't get a quick answer. You'll increase your chances of a useful answer by following the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output, and sample data using dataex. You don't even tell us precisely what you ran.

        When using a user written procedure, help depends on someone active on the list happening to be familiar with that particular kind of estimator and procedure. In more recent versions of Stata, Stata provides a set of survival models. I don't know if these do precisely what you need, but when you have a choice it is generally better to use the Stata provided procedure rather than a user written one. If it is absolutely essential to stpm2 with df(2), you may need to contact the program's authors.
        Thank you Phil for your recommandations. I'll publish a detailed post to clarify the problem.
        Last edited by Makan Rahshenas; 27 Feb 2020, 04:34.

        Comment


        • #5
          Originally posted by Andrew Lover View Post
          You may need to optimize the number of knots (and/or centiles) if you have an 'unusual' survival curve.

          Detailed info here: https://pclambert.net/software/stpm2...s_sensitivity/
          Thank you so much Andrew for the link. I'll try with different d.f. (which would be more appropriate for my data) and will let you know the results. As I mentioned above, I'll post the details so it might be helpful for anyone else with the same problem.

          Comment


          • #6
            Hi Makan (and others who may encounter this issue in the future),

            Did you resolve this issue? Andrew Lover's comment pointed me to what I believe to be the problem and a solution - check the number of ties in your dataset. I had this same problem when trying to model time-to-treatment data of length >3000 with only 80 unique values. My solution - and I believe it is statistically sound, though others may wish to chime in - was to add a small amount of uniform noise - U(0,0.01) - to the outcome variable. This breaks the ties and allows stpm2 to fit additional Knots. My understanding is that stpm2 has restrictions (by default) on where it can place internal knots and the distances between them. When there are excessive ties, these criteria may not be met.

            I'd be curious to hear your solution / indeed whether you were dealing with a highly compressed distribution (excessive ties).
            Last edited by James Retell; 13 Apr 2022, 00:28.

            Comment

            Working...
            X