Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Matching in STATA


From   Henry <jakanyada@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Matching in STATA
Date   Fri, 20 Jun 2008 11:38:16 +0100

Dear listers,
I would like to carry out some matching for a case-control study using
STATA but its proving to be a bit challenging to me. I have checked
from achieves but a query close to mine on statlist was not answered
in 2004. Could there be a way of matching cases to controls within a
range of values say for age, a 40yr old case-patient can be matched to
either a 38 or 39 or 40 or 41 or 42yr old control-patient? I have used
the -merge- command to merge two datasets by sex and age of patients
but it only works for 40yr old case matching a 40yr old control. For
this case am still interested in a 1-1  matching but what if I extend
this to a 1:n match?  I want to have something of this sort:

case-patient                  case-age           sex
control-patient              control-age
1          00b7                            35                    1
     00YP                           35
2          00b7                            35                    1
     0XC1                           33
3          00b7                            35                    1
     0001                            36

Any suggestions.
Henry
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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