Hi,
I have a question concerning observation numbers for specific dates. I have a time-series
dataset with daily data (5 obs per week) and I would like to estimate my model once a
week, every wednesday. The subsample, for which the model is estimated, should be shifted
by a week for every estimation. The problem is how can I get the the observation numbers
for these dates?
My first idea was to get manually the obsnum for the first wednesday and then to add 5 in
order to advance one week. But due to holidays and other missing observations this will
change the weekday on which the model is estimated in the course of time.
My second idea was to generate a list of all wednesdays on which the model should be
estimated. By using obsnum one could get the observation num for the each wednesday. But
obsnum will return NA if there is no date for the wednesday, perhaps due to a holiday. In
this case I would like to estimate the model on tuesday or thursday. I could write another
function around obsnum which deals with these exceptions.
But before doing so, I wanted to ask you if theres an easier solution to my problem?!
Christoph