Re: st: Local Linear Regression for Regression Discontinuity Designs

Andreas, Alex and Austin,
I came across this "triple A" post and tried Austin's suggestions
myself, i.e. I obtained the latest version of -rd- and -rd_obs- with
-net from (the UMichigan website given my Austin)- and then used the
following code:
sysuse auto, clear
ren price y
gen x = length - 193
gen z = (x >= 0)
gen z_x = z*x
reg y z x z_x if inrange(x,-10,10) mbw(10)
rd_obs y x, bw(10) kernel(rectangle).
Following the suggestions in this thread, I expected to get the same
result with both commands, but in practice the first gave me
-7002.956 and the second gave me -7109.5027.
Would Austin or one of the others by any chance be able to see why this is?
Sidenote 1: the latter command also returns the error message
"esample() invalid", albeit only after giving me the estimation
results.
Sidenote 2: When, after use of -rd_obs-, I type -scalar obs=e(N)- and
then -disp obs-, I always get 74, regardless of which bandwidth I
specify in the respective rd_obs option, and that 74 is also larger
than the 22 observations used when I do the regression manually with
-reg-. So I'm wondering whether possibly the -bw- option is not
working properly (or I'm misusing it)?
Thanks a lot and all best,
JZ
On Wed, May 25, 2011 at 9:56 AM, andreas nordset
<andreas.nordset@gmail.com> wrote:
>
> Thanks a lot, Alex and Austin!!!
>
> I had not realized the impact of different kernel choices for this,
> but have now been able to verify also on two other datasets that
> -rd outcome z, z0(0) bwidth(z,-B,B) mbw(100) kernel(rectangle)- does
> indeed give me the same estimate as
> - reg outcome D0 z D0_z if inrange(z,-B,B)-.
>
> (I still had an older version of -rd- anyway, where use of the
> rectangular kernel was no problem, but it's also great to know that
> this will now also work again with the most recent version when I
> download that!
>
>
>
> On Mon, May 23, 2011 at 9:37 PM, Alex Olssen <alex.olssen@gmail.com> wrote:
> > Cool,
> >
> > Thanks Austin.
> >
> > On 24 May 2011 05:21, Austin Nichols <austinnichols@gmail.com> wrote:
> >> Alex Olssen <alex.olssen@gmail.com>:
> >>
> >> Since Kit may be out of touch the next few weeks, I have also put a
> >> revision of -rd- at
> >> net from http://www-personal.umich.edu/~nicholsa/stata
> >>
> >> On Mon, May 23, 2011 at 11:00 AM, Austin Nichols
> >> <austinnichols@gmail.com> wrote:
> >>> Alex Olssen <alex.olssen@gmail.com>:
> >>>
> >>> You are right that I removed the kernel option from the new -rd- dated 20 March
> >>> (update renamed the previous version to rd_obs and defined a new rd command)
> >>> and introduced a bug.
> >>>
> >> ...
> >> *
> >> * For searches and help try:
> >> * http://www.stata.com/help.cgi?search
> >> * http://www.stata.com/support/statalist/faq
> >> * http://www.ats.ucla.edu/stat/stata/
> >>
> >
> > *
> > * For searches and help try:
> > * http://www.stata.com/help.cgi?search
> > * http://www.stata.com/support/statalist/faq
> > * http://www.ats.ucla.edu/stat/stata/
> >
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/