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: could you please verify the correctness of the code?-tsfill function


From   stef salvez <[email protected]>
To   statalist <[email protected]>
Subject   Re: st: could you please verify the correctness of the code?-tsfill function
Date   Tue, 5 Jun 2012 20:45:08 +0100

Dear all,

I was wondering if someone could check the validity of the code.  If I
violate any rules I would be grateful to you if you could inform me
about it


thanks

On 6/5/12, stef salvez <[email protected]> wrote:
> ok
>
> On 6/5/12, stef salvez <[email protected]> wrote:
>> Dear all,
>>
>>
>> I have a panel data set. These data are available every 28 days (or 4
>> weeks). But in some case I have jumps (35 days  instead of 28 days).
>> So I used tsfill in the code which i display below
>>
>>
>>
>> clear all
>> cd J:\
>> input id  str8 (dates)    var
>>  1   "23/11/08"   2
>> 1   "28/12/08"  3
>> 1    "25/01/09"  4
>> 1   "22/02/09"   5
>> 1    "29/03/09"   6
>> 1  "26/04/09"   32
>> 1  "24/05/09"   23
>> 1  "28/06/09"   32
>> 2   "23/11/08"  45
>> 2  "28/12/08"   46
>> 2  "25/01/09"   90
>> 2  "22/02/09"  54
>> 2  "29/03/09"   65
>> 2   "26/04/09" 77
>> 2  "24/05/09"   7
>> 2   "28/06/09"  6
>> end
>>
>>
>> gen edate1 = date(dates, "DM20Y")
>>  gen edate2= floor(edate1/28)
>> tsset identif2 edate2
>> tsfill
>>
>> I get no warnign sign which seems to be ok. But when I look at the
>> data editor  I have the feeling that something may not be correct:
>> So, I would like to ask if the above approach-code is correct
>>
>>
>> thanks
>> Stefanos
>> *
>> *   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index