Dear all,
I am not very experienced with Stata and this is my first post here. Thanks in advance for your help.
I found bunching just below financially relevant thresholds in birthweights reported by hospitals and I would like to graphically show the evidence by implementing a McCrary-Test in Stata (McCrary (2008); http://eml.berkeley.edu/~jmccrary/mc..._DCdensity.pdf). I use the user-written command DCdensity available online (http://eml.berkeley.edu/~jmccrary/DCdensity/).
The baby's birthweight is my running variable and I try to see if there is systematic sorting just below the cut-off values that yield a higher reimbursement to the hospitals (e.g. 1000 gram). My code is therefore:
1000 is the point of potential discontinuity, 10 is the bin size and 100 is the bandwidth.
But I get the entire birthweight distribution and I can't see anything around the threshold... (see first image below)
If I restrict to a smaller bracket of values, like:
I get a weird distribution (see second image below) that shrinks around 1200g instead of growing (birthweight distribution peaks at 3200g..), I think that the command assumes a Normal one but we are in reality in the left-hand tail.
Do you see a solution for me, is it possible e.g. to "zoom" on the part of the graph that interests me? Or to specify in the command that I only want to see the graph for a part of the distribution?
Thanks a lot,
Fred Rey-Bellet

I am not very experienced with Stata and this is my first post here. Thanks in advance for your help.
I found bunching just below financially relevant thresholds in birthweights reported by hospitals and I would like to graphically show the evidence by implementing a McCrary-Test in Stata (McCrary (2008); http://eml.berkeley.edu/~jmccrary/mc..._DCdensity.pdf). I use the user-written command DCdensity available online (http://eml.berkeley.edu/~jmccrary/DCdensity/).
The baby's birthweight is my running variable and I try to see if there is systematic sorting just below the cut-off values that yield a higher reimbursement to the hospitals (e.g. 1000 gram). My code is therefore:
Code:
DCdensity birthweight, breakpoint(1000) generate(Xj Yj r0 fhat se_fhat) b(10) h(100)
But I get the entire birthweight distribution and I can't see anything around the threshold... (see first image below)
If I restrict to a smaller bracket of values, like:
Code:
DCdensity birthweight if birthweight > 750 & birthweight < 1250, breakpoint(1000) generate(Xj Yj r0 fhat se_fhat) b(10) h(100)
Do you see a solution for me, is it possible e.g. to "zoom" on the part of the graph that interests me? Or to specify in the command that I only want to see the graph for a part of the distribution?
Thanks a lot,
Fred Rey-Bellet
Comment