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

st: RE: RE: Re: maximum 'run' of observations in panel data


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: Re: maximum 'run' of observations in panel data
Date   Tue, 13 Aug 2002 09:12:50 +0100

Kit Baum communicated the thoughts of Vince Wiggins 
 
>      . by id: gen run = cond(l.run==., 1, l.run+1)
>      . egen maxrun = max(run), by(id)

and Frank de Libero asked 

> Looks elegant but what was the question? :)

This refers to a thread started by Guillermo Cruces 
on Friday with contributions by Dick Campbell, 
Kit Baum and myself. 

The question is as indicated in the title: what 
is the longest run of consecutive observations (i.e. without 
gaps) in panel data? 

Nick 
[email protected] 
*
*   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