Re: st: cmogram command for Regression Discontinuity Design

You can just superimpose -twoway- calls.
sysuse auto, clear
scatter mpg weight || lfit mpg weight if weight < 3000 || lfit mpg
weight if weight >= 3000 , ///
legend(order(2 "weight < 3000" 3 "weight >= 3000"))
A more general idea is to use -line- calls with different predictions.
Nick
2011/9/5 Borgomeo, Letizia <L.Borgomeo@warwick.ac.uk>:
> In my special case, 0 does indeed belong to small positives since it is the result of the transformation of the original score for having it centered in 0. So 0 it is the mimimum score for individuals(firms) to get the treatment(public subsidy).Honestly, the reason why I started using -cmogram- is that I am not aware of a way of plotting two different fitlines for each side of the cutoff.
> ________________________
> Da: owner-statalist@hsphsun2.harvard.edu [owner-statalist@hsphsun2.harvard.edu] per conto di Nick Cox [njcoxstata@gmail.com]
> Inviato: lunedì 5 settembre 2011 20.36
> A: statalist@hsphsun2.harvard.edu
> Oggetto: Re: st: cmogram command for Regression Discontinuity Design
>
> We do ask that all new joiners read the FAQ before posting.
>
> As implied, you can also fudge your 0s to small positives so that they
> fall within the right bin (so to speak). Otherwise your graph won't
> show a cutpoint at 0, which is important for your problem. But you'd
> need to fudge all boundary values consistently.
>
> Personally I like the convention that bins are as far as possible
> [lower, upper) but -cmogram- follows the opposite rule.
>
> The choice may seem arbitrary, but in most problems I look at it seems
> more natural that 0 is not only a bin boundary but belongs with small
> positives rather than small negatives. The substantive reason is often
> that 0 may just mean not detected, but negatives mean something
> different. But problems and tastes vary.
>
> By the way, -cmogram- is just a convenience command. It is just a
> couple of lines to set up bins that you like and summaries for those
> bins, e.g.
>
> sysuse auto
> gen weight2 = 500 * floor(weight/500)
> egen mean = mean(mpg), by(weight2)
>
> after which you call up some graph of choice.
>
*
* 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/