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: RE: RE: Controlling for associated observations
From
Jan Bryla <[email protected]>
To
"[email protected]" <[email protected]>
Subject
st: RE: RE: Controlling for associated observations
Date
Fri, 11 Mar 2011 10:16:34 +0100
Dear Elena
This may be slightly advanced if you are new, but I would go about your problem using the -psmatch2- routine by Leuven and Sianesi, using nearest neighbour, no replacement, and a scaled latitude (to between 0 and 1) as the propensity score.
The automatically generated additional variables _id and _n1 should provide you with the information you need. I took the liberty of writing a sample code to illustrate my point:
//
Drawnorm outcome, n(100)
Gen pscore=uniform()
drawnorm help, n(100)
gen treat=0
replace treat=1 if help>0
psmatch2 treat, outcome(outcome) pscore(pscore) noreplacement neighbor(1) caliper(1)
//
Then for each treated (say, to the east of the time zone) the _n1 gives you the _id of the closest county in terms of latitude of a non-treated (ie. To the west of the time zone).
Hope this is what you are looking for
Jan Bryla
The Danish Bankers Association
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Elena Quercioli
Sent: 10. marts 2011 22:30
To: [email protected]
Subject: st: RE: Controlling for associated observations
Dear Statalist members,
I have a set of data from counties at different latitudes along the
time zone lines in the USA. Counties lie to the east and to the west
of each line. For my project I need to insert a (right hand side
control) variable in my (panel) regression pairing up counties on
opposite sides of a time zone line, by latitude or perhaps pairing
"adjacent ones".
Does anyone know how I could do this in Stata? I am relatively new to
this and not really able to manage Stata beyond basic stuff.
Thank you very much in advance, Elena
*
* 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/
*
* 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/