Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | "Garth Rauscher" <garthr@uic.edu> |
To | <statalist@hsphsun2.harvard.edu> |
Subject | st: psmatch2-identifying matched pairs |
Date | Tue, 30 Mar 2010 15:40:20 -0500 |
I apologize if this has been answered before but I could not find the solution in the archives. When I perform 1-1 matching using psmatch2, several new variables are added to my dataset. Among these are _id, which is a unique identifier for each observation, and _n1, which identifies the _id for the observation in the matched pair. I?d like to be able to define a new variable that uniquely identifies each matched pair. In other words if there are 100 observations making 50 matched pairs, there are 100 unique values of _id and 100 unique values of _n1. I?d like a variable with 50 unique values, one for each matched pair. Stata doesn?t appear to create this variable. Having this variable would enable me to conduct stratified analyses (stratifying on matched pairs) outside of what is provided by psmatch2. Given _id and _n1 there is probably a way to do this but it is beyond my skill set. I?d appreciate if there are any ideas out there as to how to go about defining this variable. Thanks very much Garth Garth Rauscher Associate Professor of Epidemiology Division of Epid/Bios (M/C 923) UIC School of Public Health 1603 West Taylor Street Chicago, IL 60612 ph: (312)413-4317 fx: (312)996-0064 em: garthr@uic.edu * * 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/