I am using BRMS to run a three level Bayesian model below. When I run the model using default priors, it gives results in about 5 hours.
I have now changed to the priors as indicated below and it in more than 2 days we are at 33% of 3000 iterations. Is there anything I could do to quicken the running of the code?
prior ← c(set_prior(“cauchy(0,10)”, class = “sds”, coef = “s(Year)”),
set_prior(“cauchy(0,10)”, class = “sds”, coef = “s(timeInt)”),
set_prior(“cauchy(0,10)”, class = “sd”, group = “Cluster:House”),
set_prior(“cauchy(0,10)”, class = “sd”, group = “Cluster”),
set_prior(“normal(0,10)”, class = “b”, coef = “GenderFemale”),
set_prior(“normal(0,10)”, class = “b”, coef = “TypeRural”),
set_prior(“normal(0,10)”, class = “b”, coef = “RegionEasternCape”),
set_prior(“normal(0,10)”, class = “b”, coef = “RegionFreeState”),
set_prior(“normal(0,10)”, class = “b”, coef = “RegionGauteng”),
set_prior(“normal(0,10)”, class = “b”, coef = “RegionKwazuluMNatal”),
set_prior(“normal(0,10)”, class = “b”, coef = “RegionLimpopo”),
set_prior(“normal(0,10)”, class = “b”, coef = “RegionMpumalanga”),
set_prior(“normal(0,10)”, class = “b”, coef = “RegionNorthernCape”),
set_prior(“normal(0,10)”, class = “b”, coef = “RegionNorthWest”),
set_prior(“normal(0,10)”, class = “b”, coef = “EduHigher”),
set_prior(“normal(0,10)”, class = “b”, coef = “EduPrimary”),
set_prior(“normal(0,10)”, class = “b”, coef = “EduSecondary”),
set_prior(“normal(0,10)”, class = “b”, coef = “EthnicityColoured”),
set_prior(“normal(0,10)”, class = “b”, coef = “EthnicityIndianDAsian”),
set_prior(“normal(0,10)”, class = “b”, coef = “EthnicityOther”),
set_prior(“normal(0,10)”, class = “b”, coef = “EthnicityWhite”))
Bayesm ← brm(y ~ s(timeInt)+ s(Year)+Gender+Type+Region+Edu+Ethnicity+(1|Cluster/House),
data = dtLong,
family = bernoulli(link = “logit”),
warmup = 1000,
iter = 3000,
chains = 1, thin = 10,control = list(adapt_delta = 0.85),
inits = “0”,
cores = 4,
seed = 123,prior=prior)