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
...
The convenient case: if you're generating forecast errors based
on an AR
process, you may well want to initialize the series to zero and have pre-
sample values assumed to be zero. You can do that cleanly with the filter()
function, but it seems more transparent to do it "by formula". As things stand
a zero initialization carries over into the output from an autoregressive
formula, but if we decide to "fix" the issue that will no longer be the case,
one will have to do something like
u = rho*u(-1) + ...
u[1] = 0 # scrub the initial NA
My first reaction is that the "fixed" version is the behavior that
I'd expect -- initial values set to missing. I don't have a strong opinion
though.
Peter
Dr. Peter M. Summers | Associate Professor of Economics
One University Parkway, High Point, NC 27268
Office: 336-841-9650 | Department of Economics
Choose to be extraordinary!®