This is a place for miscellaneous R and other code I've put together for clients, co-workers or myself for learning and demonstration purposes. The attempt is made to put together some well-commented and/or conceptually clear code from scratch, though most functionality is readily available in any number of well-developed R packages. Typically examples are provided using such packages for comparison of results.
Code related to fitting of various models.
standard regression, penalized regression, gradient descent regression (online), one factor random effects (R) (Julia) (Matlab), two factor random effects (R) (Julia) (Matlab), cubic spline, hurdle poisson, hurdle negbin, zero-inflated poisson, zero-inflated negbin, Cox survival, confirmatory factor analysis, EM mixture univariate, EM mixture multivariate, EM probit, EM pca, EM probabilistic pca, EM state space model, Gaussian Process noisy, Gaussian Process noise-free...
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 ...
Code specific to short courses and technical reports I put together from time to time.
Introduction to R, Generalized Additive Models, Machine Learning, ...
Random shenanigans.
ggplot2 theme, FizzBuzz test (R) (julia) (Python), Scrape xkcd (R) (Python), Shakespearean Insulter, ...