Welcome to my blog

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

Written by A. Solomon Kurz

Boost your power with baseline covariates

This is the first post in a series on causal inference. Our ultimate goal is to learn how to analyze data from true experiments, such as RCT’s, with various likelihoods from the generalized linear model (GLM), and with techniques from the contemporary causal inference literature. In this post, we review how baseline covariates help us compare our experimental conditions.

By A. Solomon Kurz

April 12, 2023

Switch to Hugo Apéro: These are my notes

The purpose of this post is to highlight some of the steps I took to switch my blogdown website to the Hugo Apéro theme. At a minimum, I’m hoping this post will help me better understand how to set up my website the next time it needs an overhaul. Perhaps it will be of some help to you, too.

By A. Solomon Kurz

December 19, 2022

Sum-score effect sizes for multilevel Bayesian cumulative probit models

This is a follow-up to my earlier post, Notes on the Bayesian cumulative probit. This time, the topic we’re addressing is: After you fit a full multilevel Bayesian cumulative probit model of several Likert-type items from a multi-item questionnaire, how can you use the model to compute an effect size in the sum-score metric?

By A. Solomon Kurz

July 18, 2022

Just use multilevel models for your pre/post RCT data

I’ve been thinking a lot about how to analyze pre/post control group designs, lately. Happily, others have thought a lot about this topic, too. The goal of this post is to introduce the change-score and ANCOVA models, introduce their multilevel-model counterparts, and compare their behavior in a couple quick simulation studies. Spoiler alert: The multilevel variant of the ANCOVA model is the winner.

By A. Solomon Kurz

June 13, 2022

Example power analysis report, II

In an earlier post, I gave an example of what a power analysis report could look like for a multilevel model. At my day job, I was recently asked for a rush-job power analysis that required a multilevel model of a different kind and it seemed like a good opportunity to share another example.

By A. Solomon Kurz

March 5, 2022

Notes on the Bayesian cumulative probit

In this post, I have reformatted my personal notes into something of a tutorial on the Bayesian cumulative probit model. Using a single psychometric data set, we explore a variety of models, starting with the simplest single-level thresholds-only model and ending with a conditional multilevel distributional model.

By A. Solomon Kurz

December 29, 2021

Use emmeans() to include 95% CIs around your lme4-based fitted lines

You’re an R user and just fit a nice multilevel model to some grouped data and you’d like to showcase the results in a plot. In your plots, it would be ideal to express the model uncertainty with 95% interval bands. If you’re a frequentist and like using the popular lme4 package, you might be surprised how difficult it is to get those 95% intervals. I recently stumbled upon a solution with the emmeans package, and the purpose of this blog post is to show you how it works.

By A. Solomon Kurz

December 16, 2021