Am 21.05.2014 18:55, schrieb Ignacio Diaz-Emparanza:
On 21/05/14 17:25, Sven Schreiber wrote:
> Am 21.05.2014 17:22, schrieb Ignacio Diaz-Emparanza:
>> On 21/05/14 16:55, Sven Schreiber wrote:
>>>> I prefer that the number of each dummy corresponds with the observation:
>>>>
>>>> tmp = (time-1)%$pd + 1
>>>> list DUMS = dummify(tmp)
>>>>
>>> Aren't you assuming that the workfile/sample actually starts with the
>>> "right" obs here?
>>>
>>>
>> No. Actually, no. This means assuming the first period as the reference
>> but it is only a convention.
>> I like this way of generating the seasonal dummies because when I make a
>> function valid for any seasonality it applies consistent names to the
>> dummies, and not different names depending on the value of $pd.
>>
> That's right, but I prefer that the dummy with "_1" in its name
actually
> refers to the first quarter/month, not some other convention.
Yes, me too. This is what this two lines do (but not Jack's proposal).
No I'm sorry, it doesn't do what I mean: I just tested it with a
workfile starting with 1950q2, and then your code gives a 'Dtmp_2' which
refers to *3rd* quarter, not the 2nd. That's because the 'time' variable
always starts with the same value, independent of the actual season of
the first obs.
-s