# plot growth curves per subject, pooled over conditions # HQ 20120218 sort(unique(TimeC[sel1])) -> xx FE02 <- fixef(kb07.m02) FE02fit <- FE02[1]+FE02[2]*xx+FE02[3]*xx^2 plot( xx+350,(FE02fit), xlab="Time (ms)", ylab="log odds of gaze-on-target", ylim=c(-2.5,0), type="n" ) RE02 <- ranef(kb07.m02)$ItemID for (j in 1:(dim(RE02)[1])) { # note different sorting orders in RE and FE parts y <- FE02fit + RE02[j,3]+RE02[j,2]*xx+RE02[j,1]*xx^2 lines( xx+350, y, col="grey" ) } points(xx+350,(FE02fit), pch=16, cex=1.5 ) # RE02[ order(RE02[,1]) , ] -> aux.srt # sort by time^2 # mark 4 words with all neg REs, on left for (j in 1:32) { if (j %in% c(6,7,12,23)) { y <- FE02fit + RE02[j,3]+RE02[j,2]*xx+RE02[j,1]*xx^2 lines( xx+350, y, col="black" ) text( xx[10]+350, y[10], row.names(RE02[j,]), col="red") } } # mark 6 words with all pos REs, on left for (j in 1:32) { if (j %in% c(5,10,20,24,27,29)) { y <- FE02fit + RE02[j,3]+RE02[j,2]*xx+RE02[j,1]*xx^2 lines( xx+350, y, col="black" ) text( xx[15]+350, y[15], row.names(RE02[j,]), col="red") } }