search for: costusd

Displaying 1 result from an estimated 1 matches for "costusd".

2009 Mar 11
1
Forecasting with dlm
Hi All, I have a problem trying to forecast using the dlm package, can anyone offer any advise? I setup my problem as follows, (following the manual as much as possible) data for example to run code CostUSD <- c(27.24031,32.97051, 38.72474, 22.78394, 28.58938, 49.85973, 42.93949, 35.92468) library(dlm) buildFun <- function(x) { dlmModPoly(1, dV = exp(x[1]), dW = exp(x[2])) } fit <- dlmMLE(CostUSD, parm = c(0,0), build = buildFun) fit$conv dlmCostUSD <- buildFun(fit$par) V(dlmCostUSD) W(dl...