Statalist


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

st: AW: psmatch2 by(var)


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
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: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Nils Kok
Gesendet: Donnerstag, 26. März 2009 09:22
An: statalist@hsphsun2.harvard.edu
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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index