Announcement

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

  • last estimates not found after rdbwselect

    I've seen some posts referring to this error r(301): last estimates not found after running some instrumental variable like ivregress and ivreghdfe. Take for example, 1632097 or 1772205. The solutions are always along the lines of 'restart stata' since they cannot replicate the error. We got the error and were able to replicate it. In this case, it seems to be an overwrite of the way the first stage is stored. Whenever I run rdbwselect followed by ivregress the error appears.

    After installation,
    Code:
     net install rdrobust, from(https://raw.githubusercontent.com/rdpackages/rdrobust/master/stata) replace

    you can replicate the error by running

    Code:
    clear all
    
    sysuse auto
    
    ivregress 2sls price (mpg = weight)  // this works
    
    rdbwselect price weight , c(3000)
    
    ivregress 2sls price (mpg = weight) // now, this does not work
    I am too new to stata to be able to find out what is happening, let alone fix it. So, is there a way to run ivregress after a command like rdbwselect?

    Thank you in advance.


    Edit: With clear results we can by pass the error. But it feels like something that should be addressed by either rdrobust or ivregress following versions.

    Code:
    clear all
    
    sysuse auto
    
    rdbwselect price weight , c(3000)
    
    clear results
    
    ivregress 2sls price (mpg = weight) // now, this works
    Last edited by Juan Duarte; 12 Jun 2025, 17:14.

  • #2
    I think this is worth notifying Stata Technical Services as a bug. The error is thrown by an internal call to _rmdcoll.ado, which in turn checks for
    Code:
        if "`e(cmd)'" != "" {
            _est hold `hldname', restore
        }
    (lines 37-39)

    and since the prior call to rdbwselect stores "rdbwselect" in the e(cmd) macro, it tries to restore the (non-existent) estimates. The problem naturally disappears if all prior results (including e(cmd)) are cleared beforehand.
    Last edited by Hemanshu Kumar; 12 Jun 2025, 23:44.

    Comment

    Working...
    X