theta.h0 <- function(p, dk) {
i <- (1:dk-1)/100
pol <- p[3]*i + p[4]*i^2
(p[1] + p[2]*i)*exp(pol)
}
theta0 <- theta.h0(c(-0.1,10,-10,-10),4*12)
xx <- simplearma.sim(list(ar=1),1500*12,1,12)
y <- midas.sim(500,theta0,xx,1)
x <- window(xx,start=start(y))
imr <- imidas_r(y~fmls(x,4*12-1,12,theta.h0)-1,start=list(x=c(-0.1,10,-10,-10)))
Run the code above in your browser using DataLab