Statalist The Stata Listserver

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

Re: st: Producing a matched pairs table

From   "Svend Juul" <SJ@SOCI.AU.DK>
To   <>
Subject   Re: st: Producing a matched pairs table
Date   Wed, 3 May 2006 08:57:30 +0200

Kristien Verheyen wrote
In a case-control study with 1-1 matched pairs and binary exposure, how
do I produce a 2x2 table that shows the number of pairs where (case
exposed, control exposed); (case exposed, control unexposed); (case
unexposed, control exposed) and (case unexposed, control unexposed)?

Older versions of Stata had the 'match' command to do this, which
doesn't seem to exist anymore.
'mcc' does not do the trick.

-mcc- does the trick, but the data must be in wide form, with the case
and its matched control in the same observation, and that may require a
-reshape-. Try this:

    webuse lowbirth.dta
    keep pairid low smoke
    reshape wide smoke , i(pairid) j(low)
    tab2 smoke1 smoke0
    mcc smoke1 smoke0

Hope this helps.


Svend Juul
Institut for Folkesundhed, Afdeling for Epidemiologi
(Institute of Public Health, Department of Epidemiology)
Vennelyst Boulevard 6
DK-8000  Aarhus C, Denmark
Phone: +45 8942 6090
Home:  +45 8693 7796

*   For searches and help try:

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