Statalist


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

st: AW: Filling in gaps in time variable


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: AW: Filling in gaps in time variable
Date   Sun, 8 Feb 2009 19:54:04 +0100

<> 


See http://www.stata.com/statalist/archive/2007-05/msg00070.html and answers
:-)



HTH
Martin

-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Mike Kim
Gesendet: Sonntag, 8. Februar 2009 19:41
An: statalist@hsphsun2.harvard.edu
Betreff: st: Filling in gaps in time variable

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/


*
*   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