Displaying 1 result from an estimated 1 matches for "dlmnairu".
2011 Jun 07
2
Setting up a State Space Model in dlm
...V=exp(x[4]), m0=rep(0,4), C0=diag(1e07,4),
JFF = t(matrix(c(1,1,0,0))),
X=cbind( tvnairu.df$pilag, tvnairu.df$u))
return(modNAIRU)
}
(fitNAIRU <- dlmMLE(tvnairu.df$pi, parm=c(0,0,0,0) , build=buildNAIRU,
hessian=TRUE, control=list(maxit=500)))
(dlmNAIRU <- buildNAIRU(fitNAIRU$par))
## Second attempt
buildNAIRU <- function(x) {
modNAIRU <- dlm(FF=t(matrix(c(1,1,0,0))),
GG=diag(4),
W=matrix(c(0,0,0,0, 0,0,0,0, 0,0,0.04,0, 0,0,0,0 ),4,4),
V=exp(x[4]), m0=c(0.7,-0.3,5,1), C0=diag(100,4...