Displaying 1 result from an estimated 1 matches for "buildnairu".
2011 Jun 07
2
Setting up a State Space Model in dlm
...ice Deflator
u <- aggregate(UNRATE,as.yearqtr,mean)
gdpdef <- aggregate(GDPDEF,as.yearqtr,mean)
pi <- diff(log(gdpdef))*400
pilag <- lag(pi,-1)
tvnairu <- cbind(pi,pilag,u)
tvnairu.df <- subset(data.frame(tvnairu), !is.na(pi) & !is.na(u) &
!is.na(pilag))
## First attempt
buildNAIRU <- function(x) {
modNAIRU <- dlm(FF=t(matrix(c(1,1,1,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=rep(0,4), C0=diag(1e07,4),
JFF = t(matrix(c(1,1,0,0))),...