Archives
Wednesday, 09 June, 2010 (20100609)
This week we are going to look at the basics of fitting models in R continuing
with your dissertation data.
Files
Just the
R script
this week.
Outline
"Begin at the beginning, and go on till you come to the end: then stop" --- the
King (Alice's Adventures in Wonderland)
Definine model formulæ
General structure
Shortcuts
Categorical variables: using contrasts
Fit linear models using lm()
Reading the output from summary()
Extract data from the model object
A nod to the generalized linear model glm()
Note that this is not the general linear model as in PROC GLM
Linear Mixed-Effect Models
Package nlme
Learning Objectives
Understand how to build model formulæ
Fit and update basic linear models
Fit basic linear mixed-effects models