Welcome to my blog

I mainly post about data analysis and applied statistics stuff, usually in R. Frequent topics include Bayesian statistics, causal inference, multilevel models, and statistical power.

Written by A. Solomon Kurz

Within-person factorial experiments, log(normal) reaction-time data

This is the first post in a new series on causal inference. We will learn how to analyze data from true experiments with techniques from the contemporary causal inference literature. Unlike with my earlier series focused on the generalized linear model (GLM), all the data in this series will have more complicated structures, which we’ll capture with the generalized linear mixed model (GLMM). In this first post, we walk out the general framework using log(normal) reaction-time data collected from a within-person factorial experiment.

By A. Solomon Kurz

July 20, 2025

Learn Stan with brms, Part III

In this third post we explore different ways to fit a model with a mean-centered predictor, what this means for how we set our priors with brms, and what this all means for the underlying Stan code. Along the way we practice with the transformed data block, and get fancy with the model matrix.

By A. Solomon Kurz

July 17, 2025

Learn Stan with brms, Part II

In the first post of this series, we focused on a single-level intercept-only model. In this post we expand the model to include a single continuous predictor. Along the way, we review matrix notation, model matrices, and a new class of distribution functions for Stan.

By A. Solomon Kurz

July 13, 2025

Learn Stan with brms, Part I

In this series, we’ll learn how to fit models with rstan, by parsing the Stan code underlying models fit with brms. In this first post, we start with a simple intercept-only Gaussian model.

By A. Solomon Kurz

July 7, 2025

Matching, missing data, a quasi-experiment, and causal inference–Oh my!

I’m finally dipping my does into causal inference for quasi-experiments, and my first use case has missing data. In this post we practice propensity score matching with multiply-imputed data sets, and how to compute the average treatment effect for the treated (ATT) with g-computation.

By A. Solomon Kurz

February 2, 2025

Causal inference with beta regression

In this ninth post of the causal inference + GLM series, we explore the beta likelihood for continuous data restricted within the range of 0 to 1.

By A. Solomon Kurz

June 25, 2023

Causal inference with change scores

In this post, we explore how we can frame our causal inferences in terms of change from baseline, and how this may or may not involve change scores.

By A. Solomon Kurz

June 19, 2023

Causal inference with ordinal regression

In this seventh post of the causal inference series, we apply our approach to ordinal models. Ordinal models make causal inference tricky, and it’s not entirely clear what the causal estimand should even be. We explore two of the estimands that have been proposed in the literature, and I offer a third estimand of my own.

By A. Solomon Kurz

May 21, 2023

Causal inference with gamma regression or: The problem is with the link function, not the likelihood

So far the difficulties we have seen with covaraites, causal inference, and the GLM have all been restricted to discrete models (e.g., binomial, Poisson, negative binomial). In this sixth post of the series, we’ll see this issue can extend to models for continuous data, too. As it turns out, it may have less to do with the likelihood function, and more to do with the choice of link function. To highlight the point, we’ll compare Gaussian and gamma models, with both the identity and log links.

By A. Solomon Kurz

May 14, 2023