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

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


From   baum <baum@bc.edu>
To   StataList <statalist@hsphsun2.harvard.edu>
Subject   st: Re: maximum 'run' of observations in panel data
Date   Mon, 12 Aug 2002 12:20:44 -0400

Those folks who do this for a living are really good at it!

---------- Forwarded Message ----------
Date: Monday, August 12, 2002 11:09 -0500
From: "Vince Wiggins, StataCorp" <vwiggins@stata.com>
To: baum@bc.edu
Subject: Re: tsfill / fillin?

Ahhh, do you mean something like,

    . by id: gen run = cond(l.run==., 1, l.run+1)
    . egen maxrun = max(run), by(id)

  Cheers,

-- Vince
  vwiggins@stata.com

---------- End Forwarded Message ----------


*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index