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/