Announcement

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

  • Obtain number failures sqreg

    I'm writing a program based on sqreg (simultaneous quantile regression command)

    sqreg repeats the regression until having # repetitions, following the boostsraping parameter set in reps() option, default being 20.
    But, when you have a poor model, some estimates fail, which leads Stata to run much more than # reps, as indicates the red crosses in the result display.

    I'd like to store the number of total attempts, or just the number of failures, but I do not see them in return list nor in ereturn list.
    e(reps) only returns the # parameter set in reps().

    How could I retrieve them?

    Here's a MWE
    Code:
    sysuse auto.dta,clear
    
    sqreg mpg rep78, quantile (.2, .35, .5, .65, .8) reps(100)
     return list
     ereturn list
    I want the number of red crosses, if this is possible, to indicate how good/poor is the model they're trying to run.

    Many thanks,

  • #2
    You can open the sqreg.ado file and save it as something else so you can work on it. It looks like the errors are addressed around line 179.

    I've tried a few things to try to track the failures, but none worked. The ado uses Mata, and I don't know much about Mata.

    If you find a solution, then post it. I'm surprised Stata does not store the failures/successes in ereturn.

    Comment

    Working...
    X