Statalist The Stata Listserver


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

RE: st: Producing a matched pairs table


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: Producing a matched pairs table
Date   Wed, 3 May 2006 12:37:28 +0100

Svend appears to have solved the problem, but 
I've seen no command on the story that there
was, but now longer is, a -match- command. 

I really doubt this, and suspect some confusion
here. It would be most unusual for 
an official command to be withdrawn, but 
not replaced. It has happened (anyone remind
Stata's idiosyncratic -menu- command?) but 
only very rarely. 

Nick 
n.j.cox@durham.ac.uk 

Svend Juul
 
> 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
> 

*
*   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