Selected Projects

The parallel package allows parallel processing of tasks that are not interdependent. This allows all flavors of Stata to take advantage of multiprocessor machines. Even Stata/MP users can benefit because many community-contributed programs are not automatically parallelized but could be under our framework.
In The Stata Journal

Provides a flexible Markov Chain Monte Carlo (MCMC) framework for implementing Metropolis-Hastings algorithm in a modular way allowing users to specify automatic convergence checker, personalized transition kernels, and out-of-the-box MCMC chains using parallel computing.
In Journal of Open Source Software

Slurm workload manager is a popular Linux based software used to schedule jobs in HPC clusters. This R package provides a specialized lightweight wrapper of Slurm with a syntax similar to that found in the parallel R package.
In Journal of Open Source Software

Family relationships influence eating behavior and health outcomes (e.g., obesity). Because eating is often habitual (i.e., automatically driven by external cues), unconscious behavioral mimicry may be a key interpersonal influence mechanism for eating within families. This pilot study extends existing literature on eating mimicry by examining whether multiple family members mimicked each other’s bites during natural meals. Thirty-three participants from 10 families were videotaped while eating an unstructured family meal in a kitchen lab setting. Videotapes were coded for participants’ bite occurrences and times. We tested whether the likelihood of a participant taking a bite increased when s/he was externally cued by a family eating partner who had recently taken a bite (i.e., bite mimicry). A paired-sample t-test indicated that participants had a significantly faster eating rate within the 5 s following a bite by their eating partner, compared to their bite rate at other times (t = 7.32, p < .0001). Nonparametric permutation testing identified five of 78 dyads in which there was significant evidence of eating mimicry; and 19 of 78 dyads that had p values < .1. This pilot study provides preliminary evidence that suggests eating mimicry may occur among a subset of family members, and that there may be types of family ties more prone to this type of interpersonal influence during meals.
In Translational Behavioral Medicine

Statistical models for social networks have enabled researchers to study complex social phenomena that give rise to observed patterns of relationships among social actors and to gain a rich understanding of the interdependent nature of social ties and social actors. Much of this research has focused on social networks within medium to large social groups: from a couple of dozen students in a classroom, or colleagues in an organization; to larger social networks within schools, villages, and (online and offline) communities. To date, these advances in statistical models for social networks, and in particular, of Exponential-Family Random Graph Models (ERGMS), have rarely been applied to the study of small networks, despite small network data in teams, families, and personal (ego-centric) networks is common in many fields that study social phenomena. Furthermore, inferential degeneracy, which is a problem that arises in the case of Montecarlo quadrature needed to estimate this family of models, is one of the key issues that limit the usage of ERGMs in small networks. In this paper, we revisit the estimation of ERGMs for small networks and propose using exhaustive enumeration, and this, exact computation of likelihood functions to overcome the inference degeneracy problem that arises in the context of methods using approximations of it.

This paper examines whether country implementation of a public health treaty is influenced by the implementation behaviors of other countries to which they have network ties. We examine implementation of the Framework Convention on Tobacco Control (FCTC) adopted by the World Health Organization in 2003 and ratified by approximately 94% of countries as of 2016. We constructed five networks: (1) geographic distance, (2) general trade, (3) tobacco trade, (4) GLOBALink referrals, and (5) GLOBALink co-subscriptions. Network exposure terms were constructed from these networks based on the implementation scores for six articles of the FCTC treaty. We estimate effects using a lagged Type 1 Tobit model. Results show that network effects were significant: (a) across all networks for article 6 (pricing and taxation), (b) distance, general trade, GL referrals, and GL co-subscriptions for article 8 (second hand smoke), © distance, general trade, and GL co-subscriptions for article 11 (packaging and labeling), and (d) distance and GL co-subscription for article 13 (promotion and advertising), (e) tobacco trade and GL co-subscriptions for article 14 (cessation). These results indicate that diffusion effects were more prevalent for pricing and taxation as well as restrictions on smoking in public places and packaging and labeling. These results suggest that network influences are possible in domains that are amenable to control by national governments but unlikely to occur in domains established by existing regulatory systems. Implications for future studies of policy implementation are discussed.
In Social Science & Medicine

In this paper we use a probabilistic evolutionary model built upon phylogenetic trees and experimental evidence of gene functional annotations to predict whether or not unannotated genes have a particular function.

This study analyzes the relationship between TV rating and Twitter’s tweeting during the Teleton 2012, an event that is transmitted by all Chilean channels simultaneously. The results suggest a statistically positive impact of television rating on Twitter’s tweeting.

El objetivo de este nota es el de ilustrar, por medio de simulaciones, los posibles efectos sobre las pensiones que obtendrán los trabajadores chilenos adscritos al sistema de capitalización individual, en caso de elevarse la tasa de cotización obligatoria.
Centro de Politicas Laborales, Chile

Recent Publications

Recent & Upcoming Talks

More Talks

Recent Posts

More Posts

Sparse matrices in RcppArmadillo can be a very useful resource to work with, especially when you are dealing with social networks. Here I provide a couple of examples in which we can take advantage of their structure by using iterators.


During the last year I’ve been working on a daily basis with phylogenetic trees, objects that in graph jargon are called Directed Acyclic Graphs. While R does have some cool packages out there to visualize these–including phylocanvas which looks great!–I wanted to tryout jsPhyloSVG, and moreover, to learn how to use htmlwidgets. So, after a week-long process of playing with JavaScript, of which I had no prior knowledge (so thank you W3shools)!


So one of the new features that I’ve working on is processing viz attributes. In the CRAN version of rgexf, the function read.gexf only reads in non-visual attributes and the graph structure itself, which is no longer true as of today (at least for the static viz attributes, all the other dynamic features supported by GEXF will come in the future). We start by loading the R packages and reading the “lesmiserables.


Since there are plenty of examples out there telling you how to get started with shiny (like Rstudio’s, or Google), I will focus on telling some of the stuff that I did learned and may not be obvious at first, including some of the mistakes I made. Before start, I just want to stress that I’m writing this after my first shiny app, you’ve been warned! Here it goes: Use the “two-file” method Instead of putting everything, UI and Server, in a single app.


Finally, after a long wait, the R packages googlePublicData (more than 2 years since the last update!) and ABCoptim (roughly a year since the last update) have new versions on CRAN.



PARALLEL: Stata module for parallel computing

Parallel lets you run Stata faster, sometimes faster than MP itself. By organizing your job in several Stata instances, parallel allows you to work with out-of-the-box parallel computing.

aphylo: Statistical Inference of Annotated Phylogenetic Trees

The aphylo R package implements a phylogenetic model for gene functional prediction that I have been developing as part of my doctoral disertation.

netdiffuseR: Analysis of Diffusion and Contagion Processes on Networks

Empirical statistical analysis, visualization and simulation of diffusion and contagion processes on networks.