andrewghazi.github.io
  • About

On this page

  • Latest post
  • Highlighted posts
  • Everything else
Categories
All (21)
benchmark (1)
birds (1)
Coffee (1)
duckdb (1)
jokes (2)
loo (1)
performance (1)
Probability (3)
Quarto (2)
R (15)
Rmarkdown (1)
RStudio (1)
Stan (6)
visualization (1)
Voting (1)

Latest post

EDBBIRDDUCK

R
duckdb
birds
A brief guide to examining eBird data with duckdb.
May 25, 2026
Andrew Ghazi
No matching items

Highlighted posts

Optimal coffee with dyingforacup

R
Stan
Coffee
DO YOU FOLKS LIKE COFFEE?! Gaussian Processes for Bayes-optimal brewing.
Aug 3, 2024
Andrew Ghazi

Fast cmdstanr summary function

R
Stan
performance
fsummary: speeding up posterior summaries with collapse and vectorization.
Jul 20, 2024
Andrew Ghazi

A diagram contrasting two situations where LOO may be applied. On the left, a single higher-level hyperparameter generates the data, which is an unproblematic situation for standard LOO calculations. On the right, the upper-level hyperparamter generates an intermediate observation-specific parameter which then generates the observations. The right situation is difficult for standard LOO calculations.

Integrated LOO walkthrough

R
Stan
loo
Probability
This is a guide/walkthrough on how to use the “Integrated Importance Sampling” aka “Integrated LOO” technique from (Vehtari et al. 2016). I’ve found myself needing to do…
Sep 22, 2023
Andrew Ghazi
No matching items

Everything else

havel

R
Visualize and tabulate R package dependencies.
Dec 1, 2025
Andrew Ghazi

A skeleton script for power analysis

R
A walkthrough on how to perform a simulation-based power analysis.
Jun 13, 2025
Andrew Ghazi
 

Tricks for RevealJS Quarto presentations

Quarto
A few helpful quarto snippets whose syntax I always struggle to recollect.
Apr 20, 2025
Andrew Ghazi

Important quotations

“The combination of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data.”
Mar 1, 2025

A voter preference network graph used by RP.

Ranked pairs and STAR voting in R

R
Voting
FPTP sucks.
Jan 11, 2025
Andrew Ghazi

A horribly messed up plot. It's like a biased parabola rotated 90 degrees and drawn with rainbow dots. The title is a long sequence of numbers with each on a new line so the label goes from top to bottom, covering the plot. A group of four numbers in the middle inexplicably has 16 digits of precision.

The most egregiously defective plot I ever made

jokes
We all start somewhere.
Dec 20, 2024

Concurrent progress bars for Stan models

R
Stan
Made a little package to show concurrent progress bars on Stan models:
Nov 30, 2024
Andrew Ghazi

The Count of Monte Carlo

jokes
Shh, shh.
Sep 7, 2024

A still from Halloween Potion-ma-jig showing Homestar, the Poopsmith, and the King of Town standing around a bunch of holes in costumes.

Use options()

R
options() that I use and should use more.
Jun 8, 2024
Andrew Ghazi

A medical diagram of a knee joint so I can have a figure on this post.

Joint IPW

R
Stan
Probability
I have been learning a bit about inverse probability weights (IPW) from two posts by Andrew Heiss. I tried a few changes to simplify / improve upon the method he uses in his…
Mar 2, 2024
Andrew Ghazi

Setting up and using RStudio effectively

RStudio
Some tips on how to get the most out of RStudio.
Dec 23, 2023
Andrew Ghazi

A histogram of simulated p-values from the distribution. The distribution is non-uniform (depleted near 0 and 1 with a mode around 0.3), indicating the t-test assumptions are violated.

collapse is sick

R
benchmark
I saw an R package I hadn’t heard of called collapse performing well on the duckdb database-like ops benchmark, and I thought I’d try it out on a little statistical…
Nov 29, 2023
Andrew Ghazi

Four horizontal color bands demonstrating the color palettes highlighted in this post. From top to bottom: viridis, cividis, coolwarm, and cols25.

Effective color palettes

R
visualization
This post reviews how and when I use my favorite color palettes in R.
Oct 21, 2023
Andrew Ghazi

The geryon package's hex logo. It shows a winding monster tail inspired by Gustave Doré's woodcut of the monster Geryon in the Divine Comedy.

geryon

R
Like many R users, I have over time accrued a number of miscellaneous R functions that I put into a little utilities package. It’s called geryon. The readme explains (most)…
Oct 9, 2023
Andrew Ghazi
 

Paste images from clipboard to Quarto/Rmarkdown

Quarto
Rmarkdown
Edit 2/23/2024: I’ve added an improved version of this functionality to my geryon package (Github link). This version has some added advantages:
Oct 6, 2023
Andrew Ghazi

A scatterplot of estimated PC1 against estimated PC2. The points are colored with a bi-variate color palette according to the true values used to simulated them. The color axes roughly align with the cartesian axes, showing that the model has accurately estimated the directions of contrastive variation.

ezpzmcmcpcpca package

R
Stan
Probability
I made an R implementation of probabilistic contrastive principal components analysis, aka PCPCA. As the name implies, this method allows you to probabilistically infer contr…
Sep 30, 2023
Andrew Ghazi

A diagram using the ancient Who Would Win? meme format, comparing the verbosity of the tidyverse with the terse data.table package which does many things with one square boi: `[.data.table`

Tidyverse/data.table translations

R
A list of common tidyverse/data.table commands that do (roughly) the same thing so that you can compare the syntax. Some opinions included.
Sep 28, 2023
Andrew Ghazi
No matching items