18 May 2017
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.
10 Apr 2017
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).
06 Apr 2017
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.
15 Mar 2017
Below is the news release from furniture
version 1.5.0.
10 Mar 2017
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.
23 Feb 2017
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.