The vast majority of these code snippets are conceptual demonstrations of more complicated models. The audience is generally faculty, researchers, and graduate students in applied fields who, like I did, want to go beyond their basic statistical training. However, I hope it helps anyone who happens to stumble across it.

Model Fitting

standard regression, penalized regression, gradient descent regression (online), hurdle poisson, hurdle negbin, zero-inflated poisson, zero-inflated negbin, Cox survival, confirmatory factor analysis, stochastic volatility, bivariate probit, quantile regression, ordinal regression, naive bayes, extreme learning machine, Chinese restaurant process, Indian buffet process, One-line models (an exercise), …

Mixed models

one factor random effects (R) (Julia) (Matlab), two factor random effects (R) (Julia) (Matlab), mixed model, mixed model with correlated random effects, See the documents section for more…


BEST t-test, linear regression (Compare with BUGS version, JAGS), mixed model, mixed model with correlated random effects, beta regression, mixed model with beta response (Stan) (JAGS), mixture model, topic model, multilevel mediation, variational bayes regression, gaussian process, horseshoe prior, item response theory, …


EM mixture univariate, EM mixture multivariate, EM probit, EM pca, EM probabilistic pca, EM state space model


Gaussian processses

Gaussian Process noisy, Gaussian Process noise-free, reproducing kernel hilbert space regression gaussian process, …

Additive models

cubic spline, …

Programming Shenanigans

FizzBuzz test (R) (julia) (Python), Reverse a string recursively (R) (Python), Recursive Word Wrap (R) (Python), calculate compound interest recursively, get US Congress roll call data, Scrape xkcd (R) (Python), Shakespearean Insulter, spurious correlation with ratios, R matrix speedups, …


I have a couple packages for personal use and to learn more about the code development process, but in case someone might find something useful therein, here they are: