Skip to content

Instantly share code, notes, and snippets.

@RyanHope
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RyanHope/9170b72bad490c1f5e58 to your computer and use it in GitHub Desktop.
Save RyanHope/9170b72bad490c1f5e58 to your computer and use it in GitHub Desktop.
setwd("~/cogback/cogback/Projects/Tetris/Rational Tetris/Analyses/Hope_2014")
require(lmer)
require(lmerTest)
fx <- read.table("allFixations3.dat",header=T)
# 1 intercept (mean fixation duration) for each subject, but each subject shares the same
# estimate for the affect of game_number, level and the their interaction
m1 <- lmer(fixation.duration~game_number*level+(1|id),fx)
# same as m1 but each subjet also has their own adjustment for level
m2 <- lmer(fixation.duration~game_number*level+(level|id),fx)
# same as m1 but each subjet also has their own adjustment for game_number
m3 <- lmer(fixation.duration~game_number*level+(game_number|id),fx)
# each subject has their own mean and estimates for each main effect and interaction
m4 <- lmer(fixation.duration~game_number*level+(level*game_number|id),fx)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment