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.
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------