Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: AW: psmatch2 by(var)


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: AW: psmatch2 by(var)
Date   Thu, 26 Mar 2009 10:06:57 +0100

<> 

Can you not use -levelsof- to imitate the effect of -by-?

*************
sysuse auto, clear

bysort rep78: reg pr tr tu

* other way to achieve same result
levelsof rep78, loc(myreps) miss
foreach lev of local myreps{
	reg pr tr tu if rep==`lev'
}
*************



HTH
Martin

-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Nils Kok
Gesendet: Donnerstag, 26. März 2009 09:22
An: [email protected]
Betreff: st: psmatch2 by(var)

Dear statalist,

Using psmatch2 I compare differences between a group of treated and
non-treated observations. However, within these groups I want to distinguish
further between different geographical locations (MSAs): for each MSA, I
want to match a treated observation with the most comparable non-treated
observation (as indicated by the pscore). Then, I want to test the
differences in outcome variables for all pairs in all MSAs. The 'by()'
option would be ideal. However, this is not available in psmatch2. What are
the alternatives.

Thanks in advance,

Nils Kok



*
*   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/



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