BSTS implementation in R
I'm attempting a BSTS model on a multivariate time series. I have a csv file with a bunch of columns and I want to predict one column while using a subset of the remaining columns as regressors.
I've been pretty confused on how to do this and I'd appreciate any help. One thing I tried is to define a variable and assign it to the column I'm trying to predict. I only pick about three fourths of the values in the column (training set) and then use generic code to run the model.
Now I want to find MAPE. But nothing works. bsts is its own kind of object so I pass it through the accuracy function? What to do?
I copied the following function from YouTube:
model3 - bsts(w ~ .,
state.specification = ss,
niter = 1000,
data = ....,
expected.model.size = 5)
I'm confused as to I should put for data. w is a subset(training part) a column of numerical values turned into a time series. Using the original dataframe from which w came from- even if I make it the same height as w
Topic bayesian-networks
Category Data Science