Hi
I have a dataset that includes daily observations and a daily date variable (DATE). Some dates are not displayed (e.g., weekends, some public holidays, days when there are no available daily observations etc.). The date variable is of the format "03jan1972".
For example, In January 2009, I have 03jan1972, 04jan1972, 05jan1972, 06jan1972, 07jan1972, 10jan1972. There is no 08jan1972 or 08jan1972 in my dataset, as these were weekends. The same thing also happens on some holidays and when there are no available daily observations.
I have two questions:
1- How can I add the undisplayed days to my dataset as per the calendar? I understand that these dates will have missing observations but I need to include all dates. Does Stata know whether the year is a leap year and does it also know the calendar so that it adds the correct dates?
2- If Stata knows the calendar, can I also add the undisplayed days to my dataset under all circumstances except for weekends?
I hope I get some assistance with these questions. Thank you
Lisa
Related Posts with Undisplayed dates: weekends, public holidays, and other reasons
VIF after multilevel mixed effect logistic regressionHi... I am a very newly stata user I really don't know and desperately searching how to get VIF sco…
How to use ACF and PACF the right way ?Hi, I have looked online and seen different versions of how to use ACF and PACF. I am running the fo…
command keep usingI am working on a replication and the author uses this Phrase: merge 1:1 pid syear using ".dta" kee…
Reducing the size of your database.Dear all, I am having troubles in "cleaning" my database, whose initial size is 22GBs (71 millions r…
indentify the latest year in pannel dataHi My sample includes firm survey in 10 countries. Each country may have more than one survey and t…
Subscribe to:
Post Comments (Atom)
0 Response to Undisplayed dates: weekends, public holidays, and other reasons
Post a Comment