Mixed-effects regression and eye-tracking data Lecture 2 of advanced regression methods for linguists Martijn Wieling and Jacolien van Rij Seminar für Sprachwissenschaft University of Tübingen LOT Summer School 2013, Groningen, June 25 1 | Martijn Wieling and Jacolien van Rij Mixed-effects regression and eye-tracking data University of Tübingen
38
Embed
Mixed-effects regression and eye-tracking datawieling/lotschool2013/day2/presentation.pdf · Mixed-effects regression and eye-tracking data ... Martijn Wieling and Jacolien van Rij
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Mixed-effects regression and eye-tracking dataLecture 2 of advanced regression methods for linguists
Martijn Wieling and Jacolien van Rij
Seminar für SprachwissenschaftUniversity of Tübingen
LOT Summer School 2013, Groningen, June 25
1 | Martijn Wieling and Jacolien van Rij Mixed-effects regression and eye-tracking data University of Tübingen
Today’s lectureI Introduction
I Gender processing in DutchI Eye-tracking to reveal gender processing
I Design
I Analysis
I Conclusion
2 | Martijn Wieling and Jacolien van Rij Mixed-effects regression and eye-tracking data University of Tübingen
Gender processing in DutchI The goal of this study is to investigate if Dutch people use grammatical
gender to anticipate upcoming wordsI This study was conducted together with Hanneke Loerts and is published in
the Journal of Psycholinguistic Research (Loerts, Wieling and Schmid, 2012)
I What is grammatical gender?I Gender is a property of a nounI Nouns are divided into classes: masculine, feminine, neuter, ...I E.g., hond (‘dog’) = common, paard (‘horse’) = neuter
I The gender of a noun can be determined from the forms of otherelements syntactically related to it (Matthews, 1997: 36)
3 | Martijn Wieling and Jacolien van Rij Mixed-effects regression and eye-tracking data University of Tübingen
Gender in Dutch
I Gender in Dutch: 70% common, 30% neuterI When a noun is diminutive it is always neuter
I Gender is unpredictable from the root noun and hard to learnI Children overgeneralize until the age of 6 (Van der Velde, 2004)
4 | Martijn Wieling and Jacolien van Rij Mixed-effects regression and eye-tracking data University of Tübingen
Why use eye tracking?I Eye tracking reveals incremental processing of the listener during the
time course of the speech signal
I As people tend to look at what they hear (Cooper, 1974), lexicalcompetition can be tested
5 | Martijn Wieling and Jacolien van Rij Mixed-effects regression and eye-tracking data University of Tübingen
Testing lexical competition using eye trackingI Cohort Model (Marslen-Wilson & Welsh, 1978): Competition between
words is based on word-initial activation
I This can be tested using the visual world paradigm: following eyemovements while participants receive auditory input to click on one ofseveral objects on a screen
6 | Martijn Wieling and Jacolien van Rij Mixed-effects regression and eye-tracking data University of Tübingen
Support for the Cohort ModelI Subjects hear: “Pick up the candy” (Tanenhaus et al., 1995)
I Fixations towards target (Candy) and competitor (Candle): support forthe Cohort Model
7 | Martijn Wieling and Jacolien van Rij Mixed-effects regression and eye-tracking data University of Tübingen
Lexical competition based on syntactic genderI Other models of lexical processing state that lexical competition occurs
based on all acoustic input (e.g., TRACE, Shortlist, NAM)
I Does gender information restrict the possible set of lexical candidates?I I.e. if you hear de, will you focus more on an image of a dog (de hond) than
on an image of a horse (het paard)?I Previous studies (e.g., Dahan et al., 2000 for French) have indicated gender
information restricts the possible set of lexical candidates
I In the following, we will investigate if this also holds for Dutch with itsdifficult gender system using the visual world paradigm
I We analyze the data using mixed-effects regression in R
8 | Martijn Wieling and Jacolien van Rij Mixed-effects regression and eye-tracking data University of Tübingen
I Klik op de rode appel (‘click on the red apple’)I Klik op het plaatje met een blauw boek (‘click on the image of a blue book’)
I They were shown 4 nouns varying in color and genderI Eye movements were tracked with a Tobii eye-tracker (E-Prime extensions)
9 | Martijn Wieling and Jacolien van Rij Mixed-effects regression and eye-tracking data University of Tübingen
Experimental design: conditions
I Subjects were shown 96 different screensI 48 screens for indefinite sentences (klik op het plaatje met een rode appel)I 48 screens for definite sentences (klik op de rode appel)
10 | Martijn Wieling and Jacolien van Rij Mixed-effects regression and eye-tracking data University of Tübingen
Visualizing fixation proportions: different color
11 | Martijn Wieling and Jacolien van Rij Mixed-effects regression and eye-tracking data University of Tübingen
Visualizing fixation proportions: same color
12 | Martijn Wieling and Jacolien van Rij Mixed-effects regression and eye-tracking data University of Tübingen
Which dependent variable?I Difficulty 1: choosing the dependent variable
I Fixation difference between Target and CompetitorI Fixation proportion on Target - requires transformation to empirical logit, to
ensure the dependent variable is unbounded: log( (y+0.5)(N−y+0.5) )
I ...
I Difficulty 2: selecting a time spanI Note that about 200 ms. is needed to plan and launch an eye movementI It is possible (and better) to take every individual sampling point into account,
but we will opt for the simpler approach here (in contrast to lecture 4)
I In this lecture we use:I The difference in fixation time between Target and CompetitorI Averaged over the time span starting 200 ms. after the onset of the
determiner and ending 200 ms. after the onset of the noun (about 800 ms.)I This ensures that gender information has been heard and processed, both
for the definite and indefinite sentences
13 | Martijn Wieling and Jacolien van Rij Mixed-effects regression and eye-tracking data University of Tübingen
Independent variablesI Variable of interest
I Competitor gender vs. target gender
I Variables which could be importantI Competitor color vs. target colorI Gender of target (common or neuter)I Definiteness of target
I Participant-related variablesI Gender (male/female), age, education levelI Trial number
I Design control variablesI Competitor position vs. target position (up-down or down-up)I Color of targetI ... (anything else you are not interested in, but potentially problematic)
14 | Martijn Wieling and Jacolien van Rij Mixed-effects regression and eye-tracking data University of Tübingen
Some remarks about data preparationI Check if variables correlate highly
I If so: exclude one variable, or transform variableI See Chapter 6.2.2 of Baayen (2008)
I Check if numerical variables are normally distributedI If not: try to make them normal (e.g., logarithmic or inverse transformation)I Note that your dependent variable does not need to be normally distributed
(the residuals of your model do!)
I Center your numerical predictors when doing mixed-effects regressionI See previous lecture
15 | Martijn Wieling and Jacolien van Rij Mixed-effects regression and eye-tracking data University of Tübingen
Our data> head(eye)
Subject Item TargetDefinite TargetNeuter TargetColor TargetBrown TargetPlace1 S300 appel 1 0 red 0 12 S300 appel 0 0 red 0 23 S300 vat 1 1 brown 1 44 S300 vat 0 1 brown 1 15 S300 boek 1 1 blue 0 46 S300 boek 0 1 blue 0 1TargetTopRight CompColor CompPlace TupCdown CupTdown TrialID Age IsMale
16 | Martijn Wieling and Jacolien van Rij Mixed-effects regression and eye-tracking data University of Tübingen
Our first mixed-effects regression model# A model having only random intercepts for Subject and Item> model = lmer( FocusDiff ~ (1|Subject) + (1|Item) , data=eye )
# Show results of the model> print( model, corr=F )
I anova always compares the simplest model (above) to the more complexmodel (below)
I The p-value > 0.05 indicates that there is no support for the by-itemrandom slopes
I This indicates that the different conditions were very well controlled in theresearch design
20 | Martijn Wieling and Jacolien van Rij Mixed-effects regression and eye-tracking data University of Tübingen
Adding a fixed-effect factor# model with fixed effects, but no random-effect factor for Item> eye$cSameColor = eye$SameColor - 0.5 # centering before inclusion> model3 = lmer(FocusDiff ~ cSameColor + (1|Subject), data=eye)> print(model3, corr=F)
Random effects:Groups Name Variance Std.Dev.Subject (Intercept) 211.22 14.534Residual 2778.65 52.713Number of obs: 2280, groups: Subject, 28
# model4 is an improvement, but what about a model with a random slope for# cSameColor per Subject correlated with the random intercept> model5 = lmer(FocusDiff ~ cSameColor + (1+cSameColor|Subject), data=eye)> anova(model4,model5)
I There is clear support for an interaction (all |t | > 2)I Can we see this in the fixation proportion graphs?
29 | Martijn Wieling and Jacolien van Rij Mixed-effects regression and eye-tracking data University of Tübingen
Visualizing fixation proportions: target neuter
30 | Martijn Wieling and Jacolien van Rij Mixed-effects regression and eye-tracking data University of Tübingen
Visualizing fixation proportions: target common
31 | Martijn Wieling and Jacolien van Rij Mixed-effects regression and eye-tracking data University of Tübingen
Testing if the interaction yields an improved model# To compare models differing in fixed effects, we specify REML=F.# We compare to the best model we had before, and include TargetNeuter as# it is also significant by itself.
33 | Martijn Wieling and Jacolien van Rij Mixed-effects regression and eye-tracking data University of Tübingen
Adding a factor and a continuous variable# set a reference level for the factor> eye$TargetColor = relevel( eye$TargetColor, "brown" )> model8 = lmer(FocusDiff ~ cSameColor + SameGender * TargetNeuter +
TargetColor + Age +(1+cSameColor|Subject), data=eye)
35 | Martijn Wieling and Jacolien van Rij Mixed-effects regression and eye-tracking data University of Tübingen
Many more things to do...I We need to see if the significant fixed effects remain significant when
adding these variables as random slopes per subjectI There are other variables we should test (e.g., education level)I There are other interactions we can testI Model criticism
I We will experiment with these issues in the lab session after the break!I We use a subset of the data (only same color)I Simple R-functions are used to generate all plots
36 | Martijn Wieling and Jacolien van Rij Mixed-effects regression and eye-tracking data University of Tübingen
What you should remember...I Mixed-effects regression models offer an easy-to-use approach to obtain
generalizable results even when your design is not completely balanced
I Mixed-effects regression models allow a fine-grained inspection of thevariability of the random effects, which may provide additional insight inyour data
I Mixed-effects regression models are easy in R!
37 | Martijn Wieling and Jacolien van Rij Mixed-effects regression and eye-tracking data University of Tübingen
Thank you for your attention!
38 | Martijn Wieling and Jacolien van Rij Mixed-effects regression and eye-tracking data University of Tübingen