Am 16.03.19 um 17:07 schrieb Sven Schreiber:
Am 16.03.2019 um 08:28 schrieb Artur Tarassow:
> Am 15.03.19 um 14:11 schrieb Sven Schreiber:
>> Am 14.03.2019 um 21:00 schrieb Artur Tarassow:
>>> for a weekly data set, the accessor $obsmicro returns the day
>>> instead of the week.
>> Yes, that is according to the spec (=expected).
> Thanks for clarification, Sven.
Actually, thinking some more about it I'm not sure it really is
documented (and perhaps not even explicitly intended). I'm also
noticing that adding periodic dummies (in the GUI) and the seasonals()
function in a weekly dataset work just fine, so in the background
there is some week indicator.
Ohh, I totally forgot about the seasonals() functions. Indeed very useful!
>>> I would have expected that for this frequency the
>>> should refer to the calendar week.
Given the periodicity 52 perhaps the "minor" frequency would make even
more sense, thinking about a year:week structure.
Yes, in case one works with
weekly data, the "minor" frequency should be
the calendar week. Also, I am not sure what the value added of a
"micro" frequency would be in this case. So "year:week" would be
> Indeed, seems like I need to write a my own function for this
Here's an idea (relatively brute force):
list s = seasonals() # gives S1...S52
series obsweek = NA
loop i=1..$pd -q
obsweek = (S$i == 1) ? i : obsweek