About Me

I am an #rstats and open science enthusiast. I currently work at Utah State University as a Research Assistant Professor. I serve as a methodologist on several research teams, and develop accessible data tools. This site contains my blog and other open resources for learning data analysis.


Recent Posts

Reshaping Your Data (Long to Wide, Wide to Long)

I am currently teaching an Introductory R class for Health, Behavioral, Educational, and Social Scientists. As such, I created a PDF handout describing the base R function reshape() to help the students to better comprehend each of the arguments and how it moves the data. It is a flexible function that can change your data from wide to long format and vice versa. Other functions, including those in the tidyverse, are very helpful too (e.g., gather() and spread()) although I do not cover these in any depth in the handout.

Introducing Average Marginal Effects

Average Marginal Effects (AMEs) provide a powerful framework from which to interpret generalized linear models (GLMs). However, their use is uncommon in most fields (there is some use in econometrics literature).

Reproducibility and Regularized Regression

Below is a Prezi presentation I have prepared for a presentation I am doing on Reproducibility and Regularized Regression. It briefly presents a step by step on how to use regularized regression (specifically elastic net) to explore predictors of marijuana use among adolescents with asthma. The data set, after selecting the variables that could be important, had p = 78 variables.

Announcing Furniture Version 1.5.0

Below is the news release from furniture version 1.5.0.

The Accuracy and Statistical Power of Average Marginal Effects

Below is a Prezi presentation I have prepared for a seminar about the accuracy and statistical power of Average Marginal Effects (AME’s). It presents some simulations that I ran to assess the bias, the statistical power, and the CI coverage of AME’s under various conditions. Although not directly related to using R, the simulations were performed in R and we introduce two packages that allow its use. Note that the two packages (e.g., MarginalMediation and margins) are only available on GitHub at the present.

Leaflet of Violent Crime Rates by State

The map below is an example of using the leaflet R package to demonstrate statistics about a location (in this example, by state). There are a few great tutorials on leaflet and creating something useful and beautiful is fairly simple. I’ve adapted the code from https://rstudio.github.io/leaflet/choropleths.html for the mapping. The R code to create it is below the figure.