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 at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: tsfill


From   Steven Archambault <archstevej@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: tsfill
Date   Fri, 12 Apr 2013 19:07:29 -0600

I've noticed the tsset is interchangeable, at times. Anyhow, I thought
tfill would fill in the dates between 11sep2009 and 15sep2009
(12sept2009, 13sep2009, and 14sep2009). I thought that is what the
help says, but maybe I read it wrong. How would I fill in those
missing dates? I need to do this to more easily merge another data set
(so I can generate an average of another variable, over the time
period).

On Fri, Apr 12, 2013 at 5:12 PM, Nick Cox <njcoxstata@gmail.com> wrote:
> Your -tsset- is the wrong way round. You should specify the panel
> identifier first.
>
> But why did your command work even though it was the wrong way round?
> Going through your example, there was no expansion as far as -tsfill-
> is concerned you had nothing to fill in. That is, you specified
>
> 1. Four distinct numeric identifiers (that's fine).
>
> 2. For each panel, a panel of length one starting on day 1, namely 2
> January 1960 (that's fine too).
>
> So, no gaps, and thus no expansion.
>
> -tsset- doesn't check the formats of the variables specified. That's
> at choice and not fundamental.
>
> Odd, but true.
> Nick
> njcoxstata@gmail.com
>
>
> On 12 April 2013 23:57, Steven Archambault <archstevej@gmail.com> wrote:
>> Hi all,
>>
>> I am unsure why the tsfill command is not working for me.
>>
>> tsset date id_sei
>>
>> list date id_sei
>>
>> date id_sei
>>  09sep2009       1
>>   10sep2009       1
>>  11sep2009        1
>>   15sep2009       1
>>
>> tsfill
>>
>> date id_sei
>>  09sep2009       1
>>   10sep2009       1
>>  11sep2009        1
>>   15sep2009       1
>>
>> Any advice would be appreciated!
>> *
>> *   For searches and help try:
>> *   http://www.stata.com/help.cgi?search
>> *   http://www.stata.com/support/faqs/resources/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/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index