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

st: Variable patterns and observed frequencies


From   Thomas M�hlmann <[email protected]>
To   <[email protected]>
Subject   st: Variable patterns and observed frequencies
Date   Sun, 9 Oct 2005 18:05:33 +0200

Dear Statalisters,

I am looking for an elegant way of producing an indexed frequency table. In
particular,
I have observations on three variables:

ID	var1 var2 var3
1	 1	2	1
2	 2	3	1
3	 5	4	5
4	 6	6	6
...

And I would like to produce a table showing only different patterns and
there observed frequencies, ie.

		    var1   var2  var3  frequency
First pattern 	1	1	1	  54
Second pattern	1	1	2	  43
....

Using -egen group- generates only the observed frequencies, but how to
display only the distinct patterns?

Any suggestions?

Best wishes,
Thomas



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