I originally posted this on Stack Overflow, and it was suggested that this question would be better suited for CV:
With reference to the HoltWinters function in R, how does one deal with time periods with irregular frequencies (f)?
Most obviously, there is an irregular number of days in the year - 365 or 366, depending on whether it's a leap year or not, and an irregular number of weeks, which, depending on the week numbering system used, may be of differing lengths.
In Excel, I deal with this by simply changing the formulae in each cell to refer to the "correct" date from the previous year for seasonality purposes. With R, I can't see any way of doing this using the pre-made HoltWinters algorithm, since it requires you to specify a fixed frequency (f).
I suppose I could create a different, bespoke, HW algorithm, and then use the "optim" section to identify the correct parameters, but I don't know how efficient/time consuming this would be.
How does one deal with this problem?