Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

st: Graphs for Regression Discontinuity Designs

From   andreas nordset <>
Subject   st: Graphs for Regression Discontinuity Designs
Date   Tue, 31 May 2011 20:54:47 +0200

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))

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,
*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index