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: tsfill


From   Nick Cox <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: tsfill
Date   Sat, 13 Apr 2013 10:11:10 +0100

Steven has solved his problem, but I'll add that -tsset- does expect
two arguments, when supplied, to be first panel identifier and then
time variable.

-format- on the other hand works out which argument is the format.
Presumably someone at StataCorp got so irritated at having to look up
which way the arguments go that they decided to make it smarter.

Nick
[email protected]


On 13 April 2013 03:37, Steven Archambault <[email protected]> wrote:
> Okay, I got it to work doing the -tsset- correctly. Sorry for wasting
> time and space on this list.
>
> On Fri, Apr 12, 2013 at 7:07 PM, Steven Archambault
> <[email protected]> wrote:
>> 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 <[email protected]> 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
>>> [email protected]
>>>
>>>
>>> On 12 April 2013 23:57, Steven Archambault <[email protected]> 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/
*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index