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

st: Combining multiple responses into tables


From   "Jens M. Lauritsen" <[email protected]>
To   [email protected]
Subject   st: Combining multiple responses into tables
Date   Fri, 03 Jan 2003 21:13:49 +0100

Does anyone wish to cooperate on generating a "multiple response " table
command ? 

Example: 
Diagnoses are recorded in up to three variables d1 d2 d3

To know how many people has a certain diagnose one has to combine the three
diagnoses into a combined classification. 

If diagnoses are recorded as strings another problem arises since with
encode the same diagnose gets a different code in the different variables,
e.g. : 

. clist d* if NR1== "s 610" | NR2 == "s 610",label

     d_miss           d1          d2      d3  diag_miss  diag_r1  diag_r2
diag_r3
 26.      0        s 610           .       .          0        0        0
     0
 27.      0        s 092       s 610       .          0        0        0
     0

* but the codes are not equal, notice 96 vs 41:
. clist d* if NR1== "s 610" | NR2 == "s 610", 

     d_miss   d1  d2  d3  diag_miss  diag_r1  diag_r2  diag_r3
 26.      0   96   .   .          0        0        0        0
 27.      0   41  41   .          0        0        0        0

We wish to make a table like:

multresponse d1-d3

                                           Number
Percentage
                            responses    observations   responses
observations   
diagnose 1          x                        x1                         x2
                x3
diagnose 2            etc
etc.
diagnose n

If anyone has general comments write to the list.

Otherwise please contact me directly on the mail adress given below. 


Jens M. Lauritsen, Consultant,MD. PhD.
Accident Analysis Group, Odense University Hospital, 
Odense, Denmark e-mail: [email protected]
Initiator of EpiData, see www.epidata.dk for DataEntry in windows (EpiInfo
V6 principle)
For news on Epidata, sign on at: www.epidata.dk/php/maillist.php
Phone +45 6541 2293 Mobile +45 2173 2293 fax: +45 6613 6581 
*
*   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