stan

A Bayesian Multilevel Model for the Mexican quick-count (Spanish)

We explain the model we used for the 2021 Mexican electoral quick-count. We share the Bayesian workflow we followed for development and the different diagnostics we implemented.

Data Science in Democracy (Spanish)

We discuss the challenges on the Mexican Electoral quick-count, and how our team worked to tackle them.

DemocRacy with R: quick-counts 2021 (Spanish)

I share our work in the Mexican electoral quick-count, and why we choose to use R on the different stages of our work.

Challenges in the Mexican Electoral quick-count (Spanish)

We discuss the challenges on the Mexican Electoral quick-count, and how our team worked to tackle them.

Foundations of Statistics (Spanish)

I teach a course in Foundations of Statistics for the master program in Data Science at ITAM. Felipe González and I developed the syllabus and we created the class notes along Alfredo Garbuno. [Here](https://tereom.github.io/fundamentos/) is the latest course site and [here](https://github.com/tereom/fundamentos) is the GitHub repository with the class notes.

COVID-19 State-Level estimates for Mexico

We adapted the semi-mechanistic Bayesian hierarchical model of COVID-19 epidemiological dynamics found in [Flaxman et al. (2020)](https://spiral.imperial.ac.uk:8443/handle/10044/1/77731) to produce state-level estimates of the number of infections and the time-varying reproduction number (the expected number of secondary cases caused by each infected individual) as a function of human mobility. [Here](https://arxiv.org/pdf/2007.09117.pdf) we explain the model in detail and the assumptions made for Mexico and [here](https://covid19mex.netlify.app/) we show state-level estimates (latest update is August 2020). We also published an article in the Mexican newspaper Nexos explaining the model results [here](https://datos.nexos.com.mx/?p=1469).

Computational Statistics (Spanish)

I teach a course in Computational Statistics for the master programs in Data Science and in Computer Science at ITAM. Felipe González and I developed the syllabus and I developed (and yearly update) the class notes. [Here](https://tereom.github.io/est-computacional-2019/) is the latest course site and [here](https://github.com/tereom/est-computacional-2019) is the GitHub repository with the class notes.

Multivariate Statistics (Spanish)

In 2014 and 2015, I taught a course in Multivariate Statistics (covering Bayesian Networks, Markov Random Fields HMMs, hierarchical models,..) for the master program in Data Science at ITAM. Felipe González and I developed the syllabus and the class notes. I am in the process of updating the course resources, [here](https://est-mult.netlify.com) is the course site and [here](https://github.com/tereom/est-multivariada) is a Github repository with class notes.

Introduction to R for data analysis (Spanish)

Notes for a 2-3 day introductory workshop to R for data analysis. [Here](https://poder-tidyverse.netlify.app/) is the latest workshop site and [here](https://github.com/tereom/intro-r-analisis) is the GitHub repository. I have taught this workshop (sometimes as part of a larger program) at [RMB](https://www.redmexicanadebioinformatica.org/navegando-y-explotando-el-poder-del-tidyverse/), [ITAM](https://www.itam.mx), [CONABIO](https://www.gob.mx/conabio), [SAI](http://www.sai.com.mx), [OXFAM Mexico](https://www.oxfammexico.org), [GNP](https://www.gnp.com.mx) and [COLMEX](https://www.colmex.mx).

Quick-count MX

In Mexico quick-counts take place whenever major elections take place. For the quick-counts a probabilistic sample of polling stations is selected in advance and estimates are presented in the election night. The complete samples are rarely available to publish the results in a timely manner hence the results are announced using partial samples which have biases. We developed a Bayesian hierarchical model that includes demographic and geographic covariates, the model reduces the biases associated to such covariates. The model was used, among others, for the [2018 quick-count](https://portal.ine.mx/voto-y-elecciones/conteos-rapidos-ine/) organized by the electoral authority. [Here](https://jovial-jepsen-cf1904.netlify.com) we explain the model in detail and [here](https://github.com/tereom/quickcountmx) is an R package with the model implementation, and [here](https://link.springer.com/chapter/10.1007/978-3-030-31551-1_1) is a published paper with the methodology for one of the models we used.