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 at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: count instances across a group of variables


From   Nick Cox <njcoxstata@gmail.com>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: count instances across a group of variables
Date   Fri, 27 Jul 2012 14:03:24 +0100

Use -tabm- from -tab_chi- (SSC) to get a table.

Look at -egen-'s -anycount()- function to calculate the count variables.

Nick

On 27 Jul 2012, at 13:29, "Fitzmaurice, A.E." <a.e.fitzmaurice@abdn.ac.uk > wrote:

Hi

I have three variables coded 1 to 15, where the meaning of each of the codes is consistent across the three variables, what I would like to do is to produce output which uses information across all of the variables and gives me the number of time value 1, value 2 etc occurs across the three variables

If possible I would also like to generate a variable (possibly in a new dataset) which contains this info



*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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   |   Site index