Skip to content

Instantly share code, notes, and snippets.

@MJacobs1985
Created December 10, 2021 20:50
Show Gist options
  • Select an option

  • Save MJacobs1985/7a792ce71fdc8fb1aafd136fe0066ca6 to your computer and use it in GitHub Desktop.

Select an option

Save MJacobs1985/7a792ce71fdc8fb1aafd136fe0066ca6 to your computer and use it in GitHub Desktop.
model2<- stan_glmer(
ADG~ADF + Included2017 + (1|Studycode),
data = d, family = gaussian,
prior_intercept = normal(100,3, autoscale = TRUE),
prior = normal(0, 2.5, autoscale = TRUE),
prior_aux = normal(9, 3, autoscale = TRUE),
prior_covariance = decov(reg = 1, conc = 1, shape = 1, scale = 1),
chains = 4, iter = 5000*2, seed = 84735)
summary(model2)
tidy_summary_1 <- tidy(model2, effects = "fixed",conf.int = TRUE, conf.level = 0.80)
tidy_summary_1 <- tidy(model2, effects = "ran_vals",conf.int = TRUE, conf.level = 0.80)
plot(model2)
mcmc_areas(model2, pars = vars(starts_with("b")), prob = 0.8) +
geom_vline(xintercept = 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment