Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st:propensity score matchign graph


From   "Austin Nichols" <[email protected]>
To   [email protected]
Subject   Re: st:propensity score matchign graph
Date   Thu, 28 Jun 2007 08:30:15 -0400

Celia Patricia Vera <[email protected]>:
You want to compare densities of variable pscore for two populations
defined by treatment==1 and treatment==0. This can be done with
-dotplot- or -tw hist- if many observations have the same value (as
frequently happens when using a number of categorical values in PS
matching), e.g.

sysuse auto, clear
dotplot mpg, over(for)

(taking mpg as pscore and for as treatment) but a more general
approach is to use -kdensity- or -kdens- (avail via -ssc inst kdens-)
like so:

g x=_n-1+floor(r(min))
replace x=. if x>ceil(r(max))
kdens mpg if for==0, at(x) gen(t0) nogr
kdens mpg if for==1, at(x) gen(t1) nogr
line t0 t1 x, leg(lab(1 "Untreated") lab(2 "Treated"))

where there are a host of options for -kdens- that may change your results, e.g.

kdens mpg if for==0, at(x) gen(u0) nogr bw(o) k(t)
kdens mpg if for==1, at(x) gen(u1) nogr bw(o) k(t)
line t0 u0 t1 u1 x


On 6/28/07, Celia Patricia Vera <[email protected]> wrote:
I want to graph the density function  for the
propensity score for both treated and no treated (in
the same graph) in order to see the overlapping
regions.
I do not find the way to do that.
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index