Statalist The Stata Listserver

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

Re: st: counting events

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


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)


*   For searches and help try:

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