-
Notifications
You must be signed in to change notification settings - Fork 17
/
introduction.Rmd
49 lines (33 loc) · 2.58 KB
/
introduction.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Introduction
This document provides 'by-hand' demonstrations of various models and
algorithms. The goal is to take away some of the mystery of them by providing
clean code examples that are easy to run and compare with other tools.
The code was collected over several years, so is not exactly consistent in
style, but now has been cleaned up to make it more so. Within each demo, you
will generally find some imported/simulated data, a primary estimating function,
a comparison of results with some R package, and a link to the old code that was
the initial demonstration.
The document has several sections:
- **Models**: More or less standard/traditional statistical models and more
- **Bayesian**: Demonstrations of models using Stan
- **Estimation**: Algorithms used in model estimation (e.g. penalized likelihood, stochastic gradient descent)
- **Supplemental**: A handful of examples in languages other than R, possibly other miscellany
Note that this code is not meant to be extensive, or used in production, and in
fact, some of these demos would probably be considered of historical interest
only. To be clear, almost everything here has a package/module that would do
the same thing far better and efficiently. Note also, the document itself is
also not intended to be an introduction to any of these methods, and in fact
sometimes contains very little expository text, assuming the reader has some
familiarity with the model/approach and possibly some reference text. This
document is just a learning tool for those with some background in place, but
who want to dive a little deeper.
Note the following color coding used in this document:
- <span class="emph">emphasis</span>
- <span class="pack">package</span>
- <span class="func">function</span>
- <span class="objclass">object/class</span>
- [link]() (with hover underline)
Many examples require some initial data processing or visualization via <span class="pack" style = "">ggplot2</span>, so it's assumed the <span class="pack" style = "">tidyverse</span> set of packages is loaded for all demonstrations.
While I'm happy to fix any glaring errors and broken links, this is pretty much a completed document for the time being, except on the off chance I add a demo on rare occasion, or perhaps non-R code. This code has accumulated over years, and I just wanted it in a nicer format, which has been accomplished. Perhaps if others would like to add to it via pull requests, I would do so.
The original code for these demonstrations may be found at their first home here: https://github.com/m-clark/Miscellaneous-R-Code.
Last updated: `r Sys.Date()`.