model_times <-bind_rows(list("**H<sub>1</sub>: Derogations and emergency policies**"= m_policies, "**H<sub>2</sub>: Derogations and human rights**"= m_human_rights), .id ="hypothesis") %>%mutate(family =case_when( family =="cumulative"~"Ordered logistic", family =="bernoulli"|is.na(family) ~"Logistic" )) %>%mutate(duration =map(model, ~{ .$fit %>% rstan::get_elapsed_time() %>%as_tibble() %>%summarize(total =as.duration(max(warmup + sample))) })) %>%select(-prior, -y, -never, -data, -model) %>%unnest(duration)dur <-as.period(as.duration(sum(model_times$total)))total_run_time <-glue("{hours} hours, {minutes} minutes, and {seconds} seconds",hours =hour(dur), minutes =minute(dur), seconds =round(second(dur), 0))
We ran these models on a 2021 M1 MacBook Pro with 32 GB of RAM, with 4 MCMC chains spread across 8 cores, with two CPU threads per chain, using Stan through brms through cmdstanr.
In total, it took 0 hours, 40 minutes, and 7 seconds to run everything.