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 <[email protected]>
To   StataList <[email protected]>
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" <[email protected]>
To: [email protected]
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
  [email protected]

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