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

st: data manipulation/reduction


From   "Clint Thompson" <[email protected]>
To   <[email protected]>
Subject   st: data manipulation/reduction
Date   Fri, 27 Aug 2004 12:22:44 -0600

Hello All ---
I am using Intercooled, v.8.2.  
I was presented w/ an Excel file wherein I need to generate rates of an
adverse outcome relative to the number of procedures.  Toward that end,
I was given the number of surgeries for each clinician and the number of
adverse outcomes for each clinician.  Computing crude rates was not
problematic, however, I now need to stratify by surgical approach & type
of machine.  My primary problem is that I'm struggling with how to
reduce the data from an essentially 'long' form to 'wide' form.  An
abbreviated example of the data as received is as follows:

    
+------------------------------------------------------------------------------+
     |            name   surger~s   technqe   total   percent  
wound~er   approach |
    
|------------------------------------------------------------------------------|
 15. | John Doe               750       100     100        25         
.            |
 16. | John Doe                 .         .       .        75         
5     divide |
 17. | John Doe                 .         .       .         .         
.     divide |
 18. | John Doe                 .         .       .         .         
.     divide |
 19. | John Doe                 .         .       .         .         
.     divide |
    
|------------------------------------------------------------------------------|
 20. | John Doe                 .         .       .         .         
.     divide |
    
+------------------------------------------------------------------------------+


where 'surger~s' denotes # of procedures for the respective clinician
and 'wound~er' denotes the number of adverse events for that clinician. 
There are about a half-dozen 'approaches' and about a half-dozen machine
types (variable not shown) wherein I'd like to compute rates.  Note that
there are 100 unique clinicians but many of the clinicians occupy
multiple lines because they reported 2 or more adverse events.  Any
suggestions?  I've struggled w/ this for a while and haven't had any
success using the help file or Stata-list archives...

Many Thanks, 
Clint Thompson



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