Bookmark and Share

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


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

st: Graphs for Regression Discontinuity Designs


From   andreas nordset <[email protected]>
To   [email protected]
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:
http://www.stata.com/statalist/archive/2010-11/msg00131.html

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:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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