Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: FW: [counting before and after]


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: FW: [counting before and after]
Date   Tue, 13 Jan 2004 17:57:12 -0000

Mark Laflamme wrote to me privately,
and I take the liberty of forwarding to the list:

Variables are named when1 when 2 to when10
Variable is a string either "BEFORE" or "AFTER" or which neither are
written(not a missing value)
A provider has made an order BEFORE or AFTER an encounter
Providers are categorizd by variable provcode as 1,2,3 or 4
for particular patients, patient is categorized by string variable
mrno(8 digits with a dash)

For example
MRNO       when1         when2     when3 ........   when10  provcode
1112220-1   BEFORE   AFTER                                       2
2223334-5    AFTER     AFTER    AFTER                       3
3334445-6
4
4445556-7    BEFORE  BEFORE   AFTER        AFTER   1

I am trying to ....
1) sum the number of BEFORE and AFTER and/or neither for each MRNO
2) sum the number of BEFORE and AFTER and/or neither for each provcode
3) a table for BEFORE and AFTER

For example....
                                   AFTER
                               Yes       NO

BEFORE       yes    12              34
                      No    5                 12
TOTALS

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