Graph for fuzzy regression discontinuity design

Fragen zu Stata Syntax und Do-Files.

Graph for fuzzy regression discontinuity design

Beitragvon sarah.frick » Di 3. Jul 2012, 11:36

I am a Stata beginner and I try to do a rdd graph. I already found the "rd" command in Stata. My problem is that I need to divide the assignment variable (log of income) into a number of bins, making sure there are two separate bins on each side of the cutoff point (to avoid having treated and untreated observations mixed together in the same bin). Then, the average value of the outcome variable (probability of low height for age of children) can be computed for each bin and graphed against the mid-points of the bins.

I already found some request which got answers like:
> 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)

but I do not get the bin-division here (gen bin=z-mod(z,5)+2.5)

Pleease I need help!
sarah.frick
 
Beiträge: 1
Registriert: Di 3. Jul 2012, 11:29
Danke gegeben: 0
Danke bekommen: 0 mal in 0 Post

Zurück zu Stata Syntax

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 7 Gäste

cron