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/