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]

st: Business date for panel data


From   Thomas Leirvik <[email protected]>
To   [email protected]
Subject   st: Business date for panel data
Date   Wed, 27 Feb 2013 05:10:14 -0500

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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index