Closed steve-the-bayesian closed 5 years ago
I have a "zoo" data set with 144 rows (timepoints) and 23 Variables (including one y variable and 22 covariables x1, ..., xN). I tried to run the following code:
ss <- AddSemilocalLinearTrend(list(), y )
ss <- AddSeasonal(ss, y , nseasons = 12)
ss <- AddDynamicRegression(ss, y ~ x1, data = data)
bsts.reg <- bsts(y~ x2, state.specification = ss, data = data, niter = 500, ping=0)
burn <- SuggestBurn(0.1, bsts.reg)
predBSTS <- predict(bsts.reg, newdata = data.frame(dataplan), burn = burn, quantiles = c(.025, .975))
Fixed in bsts v 0.9
When adding DynamicRegression to the ss, and attempting to run the model, it causes R to crash.
also R doesn't know what to do with this statement:
DynamicRegressionArOptions(lags = 2, sigma.prior = SdPrior(1,1)) - it throws an error.