Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: problem with tsfill, full


From   yuchian ng <yuchian@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: problem with tsfill, full
Date   Wed, 13 Jul 2011 22:15:52 +0800

Thank you so much Scott! that solved it! :D

On Wed, Jul 13, 2011 at 7:49 PM, Scott Merryman
<scott.merryman@gmail.com> wrote:
> -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 <yuchian@gmail.com> 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/
>

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