Displaying 1 result from an estimated 1 matches for "costusdfor".
Did you mean:
costusdfore
2009 Mar 11
1
Forecasting with dlm
...t;- 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(dlmCostUSD)
#For comparison
StructTS(CostUSD, "level")
CostUSDFilt <- dlmFilter(CostUSD, dlmCostUSD)
CostUSDFore <- dlmForecast(CostUSDFilt, nAhead = 1)
after which i return the error message:
Error in mod$m[lastObsIndex, ] : incorrect number of dimensions
Can anyone offer any insight to this problem?
Thanks in advance
Mike
[[alternative HTML version deleted]]