Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Filling in gaps in time variable


From   "Mike Kim" <argonomos@gmail.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Filling in gaps in time variable
Date   Sun, 8 Feb 2009 12:40:40 -0600

Dear Statalisters,

I have a question about tsfill. My data look like this:

week  rev  title country
1      992   A     P
2      182   A     P
4      221   A     P
1      258   A     Q
2      278   A     Q
3      293   A     Q
5      336   A     Q
7      342   A     Q

I tried "tsset title week" to use tsfill, but Stata says "repeated time values within panel". "tsset country week" gives the same error message because week is repeated within a country, too. I want to fill missing weeks like the following. Is there any way to do this?

week  rev  title country
1      992   A     P
2      182   A     P
3      221   A     P
4      221   A     P
1      258   A     Q
2      278   A     Q
3      293   A     Q
4      336   A     Q
5      336   A     Q
6      342   A     Q
7      342   A     Q

Thank you for your help in advance.
Mike.

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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