19.10 Simulating the model

  • Model 1, doesn’t include the peak id, as in Chapter 18
climb_model_1 <- stan_glmer(
  success ~ age + oxygen_used + (1 | expedition_id), 
  data = climbers, family = binomial, 
  chains = 4, iter = 5000*2, seed = 84735
)
  • Model 2, including the peak id is easy to specify!
climb_model_2 <- stan_glmer(
  success ~ age + oxygen_used + (1 | expedition_id) + (1 | peak_name), 
  data = climbers, family = binomial, 
  chains = 4, iter = 5000*2, seed = 84735
)
  • If this were real work we would check the priors and chain health etc…