Linear and linear mixed-effects models in R and WinBUGS / JAGS
Thu 02 February 2012 by Adrian BrasoveanuPlan for the Feb. 7, Feb. 9 and probably Feb. 14 classes (again, feel free to bring your laptops to class and work through the scripts on your own as we go through them in class):
-
First script: bayes-winbugs-jags-3.r; contents: - simple linear regression (simulated data, R analysis, WinBUGS / JAGS analysis)
- goodness-of-fit assessment in Bayesian analyses (posterior predictive distributions and Bayesian p-values)
- interpretation of confidence vs. credible intervals
- fixed-effects 1-way ANOVA (simulated data, R analysis, WinBUGS / JAGS analysis)
- random-effects 1-way ANOVA (simulated data, R analysis, WinBUGS / JAGS analysis)
- inferring binomial proportions with hierarchical priors (random-effects for “coins”, i.e., basically, random-effect “binomial” ANOVA)
-
Second script: bayes-winbugs-jags-4.r; contents:
- 2-way ANOVA w/o and w/ interactions (simulated data, R analysis, WinBUGS / JAGS analysis)
- ANCOVA and the importance of covariate standardization (simulated data, R analysis, WinBUGS / JAGS analysis)
- linear mixed-effects models—-random intercepts only, independent random intercepts and slopes, correlated random intercepts and slopes (simulated data, R analysis, WinBUGS / JAGS analysis)