I’m trying to construct a hurdle model considering spatial autocorrelations.
But it returned an error; “Error: SAR terms are not implemented for this family.”
I search for examples applying SAR to hurdle model using brms, but there wasn’t. Does this error mean SAR has not been applied in hurdle models yet?
fbmodel <- brm(bf(total_2005 ~
Thickness.average + Depth.range +
Depth.average +
sigma.BTM + sigma.S100 +
to.BTM + to.S100 +
offset(totalnet_2005)
+ sar(fish.nb, type = "error"),
hu ~
Thickness.average + Depth.range +
Depth.average +
sigma.BTM + sigma.S100 +
to.BTM + to.S100 ),
data = ff,
data2 = list(fish.nb = fish.nb),
family = hurdle_lognormal(),
prior = c(set_prior("normal(0,10)", class = "b")),
warmup = 500,
iter = 1000,
chains = 4,
cores = 4,
inits = 0,
save_all_pars = TRUE,
backend = "cmdstanr",
control = list(adapt_delta = 0.99, max_treedepth = 15),
save_model = "test_stanscript",
file = "test")
Thanks,