I don't think James wants the prior seven days by individual, so it
seems Nick's suggestion would be the way to go if you prefer not to
use my suggestion form yesterday.
. collapse st, by(day)
. egen m7=filter(... etc.
. sort day
. save m7
. use orig_dta
. sort day
. merge day using m7
James, since you are not using the solution I proposed yesterday, I
presume you are not worried about gaps in days (i.e. missing
days==235)?
On 8/18/05, Kit Baum <[email protected]> wrote:
> You need to tsset your data with both the individual and time
> indicator, e.g.
>
> webuse grunfeld
> tsset company year
>
> Then tssmooth will operate separately on each panel within the
> dataset (as will egen filter).
*
* 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/