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" <[email protected]>
To   <[email protected]>
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:

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

Hope this helps.

Svend
__________________________________________

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
Email: [email protected]
__________________________________________

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index