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: RE: RE: psmatch2-identifying matched pairs |
Date | Sun, 4 Apr 2010 23:45:52 -0500 |
Thanks to Jeanne for the suggestion-that does help to identify the matched pairs, but it doesn't account for loss in the number of observations that are identified as part of a matched pair when the ATE option is invoked. 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 -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Jeanne Sears Sent: Sunday, April 04, 2010 3:08 PM To: statalist@hsphsun2.harvard.edu Subject: st: RE: psmatch2-identifying matched pairs ... Since _weight holds the frequency a particular observation was used as a match (and is missing if the observation was not a control or used as a match), this may do the subsetting part of what you want: drop if _weight==. -- Jeanne Sears, PhD, MS, RN Research Scientist Department of Health Services & Center for Healthcare Improvement for Addictions, Mental Illness and Medically Vulnerable Populations (CHAMMP) University of Washington Box 354809 Seattle, WA 98195 e-mail: jeannes@u.washington.edu Date: Sat, 3 Apr 2010 08:03:56 -0700 From: "Ariel Linden, DrPH" <ariel.linden@gmail.com> Subject: st: RE: psmatch2-identifying matched pairs Garth Per your question about ATE and dropped matches: That makes intuitive sense since the ATE represents the average treatment effect in the population. Therefore, you would need to have the outcome values of the entire population, not just the subset of matched controls. As a result, you would no longer have 1:1 matches. Ariel Date: Fri, 2 Apr 2010 13:57:53 -0500 From: "Garth Rauscher" <garthr@uic.edu> Subject: st: RE: RE: psmatch2-identifying matched pairs I managed to figure out how to identify and subset my data to include only the matched pairs created by psmatch2. What was (and still is) confusing me was that if I included the ate option, some of the matched pairs were "broken" and a member of the pair was no longer identified as such. I don't understand why this happened, but, nonetheless for my purposes, leaving off the ate option allowed the following code to work: - - --------------------------------------------------------------------- psmatch2 path2, pscore(p_prodterms) outcome(binarystage) caliper(.001) noreplace neighbor(1) gen pair = _id if _treated==0 replace pair = _n1 if _treated==1 bysort pair: egen paircount = count(pair) drop if paircount !=2 - - --------------------------------------------------------------------- This code creates the variable pair that identifies the matched pairs. I forgot to mention- Hat tip to the authors of psmatch2 for providing this partial solution... - - ------------------------------------------------------------------------ The following code: gen pair = _id if _treated==0 replace pair = _n1 if _treated==1 creates a variable that identifies the matched pairs but also includes those within the region of support who are not included in a matched pair. I cannot figure out how to drop those observations that are not part of a matched pair. Any help would be appreciated. * * 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/