Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Graphs for Regression Discontinuity Designs

From   Austin Nichols <>
Subject   Re: st: Graphs for Regression Discontinuity Designs
Date   Tue, 31 May 2011 16:24:17 -0400

andreas nordset <>:
If you plan to use -rd- (from SSC) you should start with its help
file, noting that the version from 2010 is now called -rd_obs- with
its own help file.  In particular, bandwidth is not a documented
option, whereas bwidth is, and scopt is an option documented there.

Alternatively, you can construct your own estimates using -lpoly- as
discussed in

On Tue, May 31, 2011 at 2:54 PM, andreas nordset
<> wrote:
> Dear Statalist members,
> I'm trying to figure out how to best do graphs for a Regression
> Discontinuity Design in Stata.
> In the Statalist archives I found this earlier suggestion by Austin
> Nichols, in response to an inquiry by Jen Zhen:
> He suggests the following example code, which already does most of
> what I'd like to do
> (I have written some commands longer, and have also switched to a
> rectangular kernel to try this out):
> webuse nhanes2, clear
> gen bmi=weight/height^2*10000
> gen z=bmi-35
> gen bin=z-mod(z,5)+2.5
> egen mean=mean(highbp), by(bin)
> rd highbp z if inrange(z,-15,15), bandwidth(15) graph mbw(100)
> scopt(ms(i) xli(0)||scatter mean bin) line(xti(BMI less 35))
> kernel(rectangular)
> However, I am still struggling to add confidence intervals to the
> fitted lines, because apparently I cannot just add something like
> -lfitci- to this command. Would anyone happen to know how to do this?
> Besides, I didn't manage to figure out what the "ms(i)" stands for and
> what other things I could change. Typing -help scopt- didn't give me
> any results, and in the return to -help scatter- I didn't really find
> what I was looking for, so I was wondering whether there are any other
> good resources to look up such things?
> Thanks a lot and best regards,
> Andreas
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index