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: Business date for panel data


From   Rebecca Pope <[email protected]>
To   [email protected]
Subject   Re: st: Business date for panel data
Date   Thu, 28 Feb 2013 09:35:08 -0600

Thomas,
Your question isn't quite clear to me. If you want business dates, why
do you want to include Saturdays & Sundays (in my part of the world at
least, not business days)? Perhaps I am misunderstanding your
question. In general, it is advisable to give a _short_ example of
what you have presently and what you would like to acheive.

Regards,
Rebecca



On Wed, Feb 27, 2013 at 4:10 AM, Thomas Leirvik
<[email protected]> wrote:
> Dear Statalisters,
>
> I have a question regarding the lag operator:
>
> I have a panel dataset  and would like to generate a new variable with the lag of a variable. It's not necessarily any quoted price each business day, so there are some missing values, but I do not want to treat Saturdays and Sundays as missing.
> In order to apply the L.varname function, I need to make the dataset a paneldata, which I do by:
>
> xtset id date
>
> then Saturday, Sunday and holidays are treated as missing values.I do not know how to go around this problem. I searched the online and the pdf files for Stata, and it is suggested to use command for the business calendar:
>
> xtset id datet, format(%tbsimple:)
>
> but it does not change anything.
> Is there a way to avoid this problem?
>
> Best,
> Thomas
> *
> *   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