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

Re: st: Matching in STATA

From   Andrea Bennett <>
Subject   Re: st: Matching in STATA
Date   Fri, 20 Jun 2008 13:14:34 +0200

Dear Henry,

Guess I would generate a new dummy variable (for both data sets) for the case where you want to merge by age-groups and then merge by this new age-group.

Kind regards,


On Jun 20, 2008, at 12:38 PM, Henry wrote:

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.
*   For searches and help try:
*   For searches and help try:

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