model_times <-tribble(~question, ~outcome, ~family, ~model,"Explaining derogations", "Derogation filed", "Logistic", m_derogations$m_derogations_panback,"Explaining derogations", "Other treaty action", "Logistic", m_derogations$m_other_panback,"Explaining restrictions", "Restricted movement", "Ordered logistic", m_restrictions$m_restrict_movement,"Explaining restrictions", "Close public transportation", "Ordered logistic", m_restrictions$m_restrict_pubtrans,"Explaining restrictions", "Stay at home", "Ordered logistic", m_restrictions$m_restrict_stayhome,"Explaining human rights violations", "Discriminatory policy", "Ordered logistic", m_hr$m_hr_discrim,"Explaining human rights violations", "Non-derogable rights", "Logistic", m_hr$m_hr_ndrights,"Explaining human rights violations", "Abusive enforcement", "Ordered logistic", m_hr$m_hr_abusive,"Explaining human rights violations", "No time limits", "Logistic", m_hr$m_hr_nolimit,"Explaining human rights violations", "Media restrictions", "Ordered logistic", m_hr$m_hr_media) |>mutate(duration =map(model, ~{ .$fit |> rstan::get_elapsed_time() |>as_tibble() |>summarize(total =as.duration(max(warmup + sample))) })) |>select(-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, 3 minutes, and 55 seconds to run everything.