Skip to content

Instantly share code, notes, and snippets.

View TanyaMurphy's full-sized avatar

Tanya Murphy TanyaMurphy

View GitHub Profile
@TanyaMurphy
TanyaMurphy / lme4-vs-nlme.r
Created January 18, 2017 14:01
R code for multi-level models
# From http://rpsychologist.com/r-guide-longitudinal-lme-lmer#three-level-models
# lme
lmer(y ~ time * tx +
(time | therapist/subjects),
data=df)
## expands to
lmer(y ~ time * tx +
(time | therapist:subjects) +
(time | therapist),