Announcement

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

  • iterations to find 2 breakpoints

    hi! is there any suggestion to find two breakpoints in an equation other than iterating over a nl estimation? My current code has 2016 iterations, but I think it has an error because it always get stacked before it finishes.
    thanks

  • #2
    You didn't get a quick answer. 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 using dataex. We don't even know what kind of model you're estimating.
    If it runs, then it is not a syntax error - we can't do much about other kinds of problems without more information and maybe data. You could try a square or cube functional form to give you a good start on where the break is. Alternatively, make your continuous x into a set of dummies and run it on the dummies.

    https://stats.idre.ucla.edu/stata/fa...se-regression/

    Might be helpful.

    Comment


    • #3
      nl for such models often gets stuck when you don't provide good starting values. My favorite way of getting those is look at a scatterplot and guess the knot locations. Create splines with those knots and estimate the model. Those parameters are your starting values for your nl model. Here is an older post on how to do that:

      https://www.stata.com/statalist/arch.../msg01006.html
      ---------------------------------
      Maarten L. Buis
      University of Konstanz
      Department of history and sociology
      box 40
      78457 Konstanz
      Germany
      http://www.maartenbuis.nl
      ---------------------------------

      Comment

      Working...
      X