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
time series prediction assignmentBackground: As a researcher at the financial economics research department of the Federal Reserve Ba…
Asgen with missing observations for the weightDear Forum, I have a short question regarding the ASGEN command with weights. I am creating value w…
Panel data, want to see the regression results for two time periods and country setsHi, I have a panel dataset of with a variable country, year, university, sat score. (Similar variabl…
Dummy VariableHow do I create a dummy variable which takes the value 1 in a household when first two children are …
Increase in the number of observations after using RESHAPE commandDear community, My original data are in long shape. When I reshape long to wide there is an increas…
Subscribe to:
Post Comments (Atom)
0 Response to Undisplayed dates: weekends, public holidays, and other reasons
Post a Comment