Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: problem with tsfill, full


From   Scott Merryman <[email protected]>
To   [email protected]
Subject   Re: st: problem with tsfill, full
Date   Wed, 13 Jul 2011 06:49:07 -0500

-drop- where year is missing before -tsfill,full-.

Compare:

clear
input year country
1973  4
1979  4
1980  4
2007  4
1970  5
1995  5
2005  5
end
tsset country year
tsfill, full

clear
input year country
1973  4
1979  4
1980  4
2007  4
1970  5
.  5
2005  5
end
tsset country year
tsfill, full


Scott

On Wed, Jul 13, 2011 at 5:14 AM, yuchian ng <[email protected]> wrote:
> Dear statalisters,
>
> I am trying to work with a panel dataset and it was unbalanced. An
> example showing the 2 key variables would be:
>
> Year - Country
> 1973 - 4
> 1979 - 4
> 1980 - 4
> 2007 - 4
> --------------
> 1970 - 5
> 1995 - 5
> 2005 - 5
>
> I tried "tsfill" which filled the gaps, but was unable to interpolate
> and extrapolate such that all countries showed years from 1970 - 2007.
>
> I tried "tsfill, full" but received this error message: timevar (year)
> may not contain missing values when option full is specified.
>
> Please advise me on how to use "tsfill, full" successfully! Thank you so much!
>
> Cheers,
> Yuchian
>

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index