Alex Stephenson
Home
Posts
Research
CV
Code
Posts
Filtering expressions with rlang
Suppose you run an experiment and are interested in an estimate of the average treatment effect (ATE) for the full sample as well as …
Last updated on
Apr 1, 2022
5 min read
R
Standard Errors and the Delta Method
A friend recently asked me a question about the delta method, which sent me briefly into a cold sweat trying to remember a concept from …
Last updated on
Apr 1, 2022
7 min read
R
Weighted Standard Errors in R
I was recently working on a problem that required me to take a weighted standard error of a difference in means function. While R does …
Last updated on
Apr 2, 2022
7 min read
Building Up from our Bootstraps
Thinking about Learning Methods Note to Readers: If you arrived at this post because of a search query about how to do bootstrapping, …
Mar 21, 2022
15 min read
R
Samuel Alito and the Causes of Effects
In Brnovich et al. v. Democratic National Committee et al., the Supreme Court decided once again to gut the enforcement ability of the …
Last updated on
Jul 1, 2021
6 min read
Notes on Bulk Recoding in R
In the spirit of notes to myself, here’s a neat trick I learned to bulk recode lots of variables at once. Suppose we have …
alex
Last updated on
Apr 22, 2021
5 min read
R
An Example of IV Estimation in R
There have likely been more words written about the use and misuse of instrumental variables than atoms in the universe. When I was …
Last updated on
Feb 6, 2021
4 min read
R
Bulk downloads of pdfs from a website: An Example script
I am working at UC Berkeley’s D-Lab as a Data Science Fellow. One of my responsibilities is to provide consulting to the UC …
Last updated on
Feb 3, 2021
2 min read
R
Running Multiple Intent to Treat Analyses with purrr
Intro When running a randomized control trial (RCT), there is often concern about non-compliance. Subjects may drop out of the …
Last updated on
Oct 14, 2020
4 min read
R
Simulating Lead Changes with R
What constitutes an exciting game? One possibility is by looking at the amount teams trade off leads. For example, in 2014 the Portland …
Last updated on
Aug 30, 2020
4 min read
R
»
Cite
×