Miscellaneous (mostly) R Code
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.
More recently, I usually just create a document of some kind rather than a standard *.R file, so you might check out the docs repo as well.
Model Fitting
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, reproducing kernel hilbert space regression, stochastic volatility, bivariate probit, quantile regression ...
Bayesian (mostly with Stan/rstan)
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, ...
SC and TR
This part of the repository is deprecated, but used to be a section of 'short courses' and 'technical reports'. See the Workshops or docs repositories instead, or go to the workshops and documents sections of the website where you can see finished products ...
Other
Random shenanigans.
FizzBuzz test (R) (julia) (Python), Reverse a string recursively (R) (Python), Recursive Word Wrap (R) (Python), get US Congress roll call data, Scrape xkcd (R) (Python), Shakespearean Insulter, ggplot2 theme, R matrix speedups, ...