Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: counting events


From   "Rodrigo A. Alfaro" <[email protected]>
To   <[email protected]>
Subject   Re: st: counting events
Date   Wed, 7 Feb 2007 21:42:18 -0500

Gaby, 

Nick wrote:
How to respect the current order of observations
was explained in my last email. 

Nick means:
sort count
gen event = sum(incident != incident[_n-1])

which is the solution if you want to keep the order of
observations. Usually I don't care about it, but it is 
nice to know it. Thanks Nick!!

If you are exploring your data, -table- it is very useful.

table incident, c(N count)

Rodrigo.

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