Hello!
I have a setting where I am using a Bayesian (negative binomial) model to predict events as a function of an autoregressive component. I would like to estimate a subset of the sample on data before a certain year and then use the model to predict what would have happened in the following year to gauge reliability (in a sense, cross validation).
That would normally be easy in a regression context doing "predict yhat,xb", but here when I hold out the year in the Bayesian model, then when I go to predict using bayespredict events,mean(events) it runs into an error apparently because am asking it to predict a parameter that was not estimated in the earlier model.
How does one solve this? I have also explored bayesfcast, but seems to be for VAR models.
I have a setting where I am using a Bayesian (negative binomial) model to predict events as a function of an autoregressive component. I would like to estimate a subset of the sample on data before a certain year and then use the model to predict what would have happened in the following year to gauge reliability (in a sense, cross validation).
That would normally be easy in a regression context doing "predict yhat,xb", but here when I hold out the year in the Bayesian model, then when I go to predict using bayespredict events,mean(events) it runs into an error apparently because am asking it to predict a parameter that was not estimated in the earlier model.
How does one solve this? I have also explored bayesfcast, but seems to be for VAR models.