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
difference between predcit and predict, xbSorry for the multiple posts, please delete this. …
Reshaping data for tabplotArray Hello, How do I reshape the following data to be able to use the tabplot command? Basically I…
fractional probit with sample selection using CMPHello everyone! I am planning to run a fractional response model with sample selection. I wonder if …
How to drop duplicates under certain conditions for a subset of observations?Hi all, I am trying to drop duplicate observations under certain conditions. My data looks something…
difference between predictand predict, xbHi, i know that predict yh, xb gives you a linear prediction using X'b. But how does the command pre…
Subscribe to:
Post Comments (Atom)
0 Response to Undisplayed dates: weekends, public holidays, and other reasons
Post a Comment