Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Combining 7 variables with the same output into a single frequency table


From   Astha Ramaiya <aramaiya@ihi.or.tz>
To   statalist@hsphsun2.harvard.edu
Subject   st: Combining 7 variables with the same output into a single frequency table
Date   Wed, 13 Feb 2013 16:39:34 -0500

Dear Nicholas, 

I have 7 different variables (fever 1, fever 2, fever 3….fever7) with the same output (0=No, 1 = Yes). I want to combine all these variables so that i can calculate prevalence of the morbidity. For example: 

Fever 1-7 give the output: 

 m_fever1 |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         50       14.3       14.7
          2 |        300       85.7      100.00
------------+-----------------------------------
      Total |        350      100.00


 m_fever2 |      Freq.     Percent   Cum.
------------+-----------------------------------
          1 |         0       	0      	 0
          2 |        350      100.00      100.00
------------+-----------------------------------
      Total |        350      100.00

 m_fever3 |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         100       28.6       28.6
          2 |        250       71.4      100.00
------------+-----------------------------------
      Total |        350      100.00

How can i combine the 3 tables above to give me the following table? 

 m_fever |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |         150       14.3       14.7
          2 |        900       85.7      100.00
------------+-----------------------------------
      Total |        1050      100.00

I have been trying to find something the entire day but haven't been successful. Any help would be very much appreciated.

Regards, 

Astha. 


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index