On Mon, 11 Jun 2018, Sven Schreiber wrote:
Am 11.06.2018 um 18:10 schrieb Riccardo (Jack) Lucchetti:
> On Mon, 11 Jun 2018, Allin Cottrell wrote:
>
>> I've just discovered something that I think is a bug, though it can also
>> be a convenience in some cases. I'd be interested to hear what people
>> think about it.
>>
>> Simplest case:
>>
>> series u = normal()
>> u = 0.5 * u(-1)
>>
>> The thing is that after the second line is executed, the first value of u
>> is not NA, it's just the original value.
>
> I've always considered this as a very nice feature. Suppose you want to
> generate a random walk as a discrete realisation of a Brownian motion.
>
> series x = 0
> x = x(-1) + normal()
>
> I _want_ the first value to be 0, because that's what Wiener processes do.
> I'd be rather annoyed if my initialisation was bypassed silently.
I was going to write the same thing. The initial value is absolutely
essential in time series, can't just overwrite it with NA. This would also
break a lot of code, and I absolutely don't think it's a bug.
OK, I will defer on that. Sorry for the noise. I suppose, then, that
the bug exposed by the panel case that I mentioned is actually that
this treatment is not granted to the first observation for each
individual, in case of an autoregressive "genr". (I can see no
rationale for granting it just for the first individual, which is what
happens now.)
Allin