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

st: egen mean function

From   Kit Baum <>
Subject   st: egen mean function
Date   Thu, 18 Aug 2005 17:21:22 -0400

James wrote

Thanks. But when I use tssmooth, I am told there are
repeated time values in sample:

tssmooth ma st_7 = st, window(7 1)
repeated time values in sample

I have a number of cases for each time period. Any way
to get around this?

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).

Kit Baum, Boston College Economics

* For searches and help try:

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