SCS 2017: Longitudinal and Nested Data
From Wiki1
At their best, graphics are instruments for reasoning. — Edward Tufte
Where there is no uncertainty, there cannot be truth. — Richard Feynman
This is the home page for the SCS short course on Modeling and Analysis of Longitudinal and Nested Data offered Wednesday evenings from 6pm to 9pm from March 1 to March 29, 2017 in York Lanes 213.
Contents 
Quick Links
 Piazza class forum
 Course Description
 R Links
 Longitudinal and Nested References and Links (post new references and comments to Piazza)
 Files
 Videos
Calendar
Day  Files and Links 

Day 1
March 1 
Ideas in Regression: Why Models Matter
Getting Started with R and R Studio

Day 2
March 8 
Linear Models for Nested Data with Normal Error
Linear Models for Longitudinal Data with Normal Error

Day 3
March 15 
Linear Models for Longitudinal Data with Normal Error (cont'd) Generalized Splines NonLinear Models for Longitudinal Data with Normal Error Introduction to Bayesian Approaches: MCMC and HMC Installing Rstan for HMC with STAN
See the documentation site for Stan and download the pdf manual. It will look forbidding at first but it's remarkably comprehensive and easy to use once you learn to navigate in it.

Day 4
March 22 

Day 5
Introduction to Stan
 Download the current manual from http://mcstan.org/.
 Daniel Lee (2014) Hamiltonian Monte Carlo within Stan
 Daniel Lee (2014) Hierarchical Models in Stan
 First_Example.R
Models for TBI:
Recovery after TBI
 r script
 stan script 1
 stan script 2
 stan script 3
 stan script 3b
 stan script 3c
 stan script 4: multivariate model
 Various models for TBI.
Shortitudinal Data
Shortitudinal Data  r script  stan script 1  stan script 2: Gamma prior on small sigma
 Correcting the bias in the estimate of compositional/contextual effects with small cluster size. This is a simple example illustrating how Stan can be used to specify models with latent predictor variables.
Information Criteria
This is an evolving topic. For a while WAIC (WatanabeAkaike Information Criterion) was considered the state of the art for Bayesian models but perhaps this is being overtaken by the 'loo' package that works specifically with Stan. There are good readable article on it.