I built a Bayesian regression model in R and I'm trying to use it to make predictions from a record X that's not in the training set. The problem is, no matter how I change the values of one of the independent variables in X, the prediction remains the same! Can somebody shed some light on how predictions are made using Bayesian regression models? Here's some code to give you some idea of what I'm doing:
install.packages("BMA")
library(BMA)
D_for_Bayes_tweaked <- D_for_Bayes
bfit1 <- bic.glm(f = as.formula('freq_iso_chng2 ~ cpi_gasoline_proj + vhcl_age_proj + vhcl_sale_ltruck_proj',), data = D_for_Bayes[D_for_Bayes$year >= 2003 & D_for_Bayes$year <= 2019,], glm.family = Gamma(link = "log"))
(p1 <- predict(bfit1, newdata = D_for_Bayes[D_for_Bayes$year >= 2003 & D_for_Bayes$year <= 2020,], type = "response"))
cpi_gasoline_proj_change <- 0.025
new_gas_cpi <- D_for_Bayes[D_for_Bayes$year == 2020,]$cpi_gasoline_proj + cpi_gasoline_proj_change
D_for_Bayes_tweaked[D_for_Bayes_tweaked$year == 2020,]$cpi_gasoline_proj <- new_gas_cpi
bfit2 <- bic.glm(f = as.formula('freq_iso_chng2 ~ cpi_gasoline_proj + vhcl_age_proj + vhcl_sale_ltruck_proj',), data = D_for_Bayes_tweaked[D_for_Bayes_tweaked$year >= 2003 & D_for_Bayes_tweaked$year <= 2019,], glm.family = Gamma(link = "log"))
(p2 <- predict(bfit2, newdata = D_for_Bayes_tweaked[D_for_Bayes_tweaked$year >= 2003 & D_for_Bayes_tweaked$year <= 2020,], type = "response"))