Post
Figures often change their visual language as an analysis moves from exploration to reporting. This post uses depictr to examine a simulated lexical-decision experiment, plot its mixed-model estimates, audit a figure and correct the accessibility problems that the audit finds.
Post
Greenhouse gas emissions can be reported as raw totals or per-capita values, each answering a different descriptive question. Using the 2025 release of the Emissions Database for Global Atmospheric Research, the World Bank income classification and the Human Development Index, this post compares totals, per-capita figures, sectors and a descriptive association with human development.
Post
In 1957, the linguist J. R. Firth observed that ‘you shall know a word by the company it keeps’. The principle that words sharing contexts share meaning underlies generative AI, from early Latent Semantic Analysis to today's largest Transformers. This post traces that lineage with three interactive LSA-to-PCA visualisations in R, built from Reuters newswire, State of the Union addresses and IMDB reviews. They show where simple co-occurrence models succeed and where they fail, and the post explains how scale and the Transformer turned a modest insight into the technology behind ChatGPT. It then examines why LLMs, optimised for fluency, cannot be rid of hallucination entirely, and argues that careful prompt engineering is the best tool we have for steering a fundamentally heuristic machine.
Post
A custom R function to create ggplot2 visualizations of power curves generated by the simr package's powerCurve function for mixed-effects models.
Post
Custom functions that extend sjPlot to discretise continuous variables in interaction plots into equally-sized intervals (deciles or sextiles) that include minimum and maximum values, with legend counts showing sample sizes per level.
Post
Custom function that extends sjPlot to display original categorical variable values in interaction plot legends instead of transformed values, facilitating clearer communication when using sum-coded or other transformed predictors.
Post
A custom R function to create ggplot2 visualizations of fixed effects from models refitted with multiple optimizers using lme4's allFit function, enabling visual assessment of convergence validity in mixed-effects models.
Post
When a model has struggled to find enough information in the data to account for every predictor—especially for every random effect—, convergence warnings appear (Brauer & Curtin, 2018; Singmann & Kellen, 2019). In this article, I review the issue of convergence before presenting a new plotting function in R that facilitates the visualisation of the fixed effects fitted by different optimization algorithms (also dubbed optimizers).
Post
Custom function extending sjPlot that plots interactions between continuous and categorical variables while replacing categorical variables with alias variables to facilitate back-transformation of sum-coded predictors for clearer result communication.
Post
Custom functions extending sjPlot for plotting interactions between two continuous variables by dividing one into ten bins (deciles) or six bins (sextiles), with optional sample size display in legend for individual differences research.
Post
This post presents a run-through of a Bayesian workflow in R. The content is closely based on Bernabeu (2022), which was in turn based on lots of other references, also cited here.