On Mon, 30 Apr 2018, Sven Schreiber wrote:
But I tend to think there must be a more elegant and/or more
efficient way?
I believe this is as efficient as you can get.
<hansl>
open fedstl.bin
data unrate
p = 3
q = 2
arma p q ; unrate
m = $coeff[1]
phi = $coeff[2:p+1]
theta = $coeff[p+2:p+q+1]
s = $sigma
x = m + filter(s*normal(), 1|theta, phi)
arma p q ; x
</hansl>
-------------------------------------------------------
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
-------------------------------------------------------