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

st: smart way to get a table of frequencies over several variables?


From   "Dr. Gawrich, Stefan" <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: smart way to get a table of frequencies over several variables?
Date   Thu, 15 May 2003 09:46:14 +0200

Title: smart way to get a table of frequencies over several variables?


Hi,
 
I have a frequently updated dataset wich allows up to 6 different disease codes to be stored for each case, each in a single Variable: x1...x6

The disease code is numeric, from 11 to 58 (with no or less than 6 diseases, all or some vars are coded missing).
 
 
case    x1    x2    x3    x4    x5    x6   
 
    1   16   32     .      .     .     .
    2   12   18     45    56    58     .
    3   17    .     .      .     .     .
    4   .     .     .      .     .     .
....

 
I need a frequency tables of the occurence of each disease in the dataset or subgroups  (= the total number of each disease code in variables x1...x6 for all selectet cases)

The best way I found until now is with reshaping x1...x6 into one variable (but this takes long with this huge dataset on my PC and afterwards the original dataset has to be reloaded for further calculations). Is there a better and "non-destructive" way to get frequencies over several variables? (I use Stata 7)?

 
 
Thanks in advance
 
Stefan Gawrich
[email protected]
 




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index