General Linear Model General Linear Model Generalized Linear Model Generalized Linear Model...

Preview:

Citation preview

GeneralLinear Model

GeneralizedLinear Model

GeneralizedLinearMixed Model

GeneralLinear Model

GeneralizedLinear Model

GeneralizedLinearMixed Model

GLMM

LMM

LMEM

HLM

GeneralizedLinearMixed Model

MultilevelModel

Tagliamonte & Baayen (2012: 7 of preprint)

Tagliamonte, S. A., & Baayen, R. H. (2012). Models, forests, and trees of York English: Was/were variation as a case study for statistical

practice. Language Variation and Change, 24(02), 135-178.

The Beauty of Mixed Models

• Account for clusters without averaging

• Different distributions (generalized LMM)

• Interpretation at the trial-level

• Everything in one model

• Excellent for individual differences studies(cf. Drager & Hay, 2012; Dan Mirman’s work)

More Power!! (see e.g.,

Barr et al., 2013)

Problems of Mixed Models

• Issues surrounding p-values

• People misuse them … in a way that doesn’t improve Type I error rate(Schielzeth & Forstmeier, 2009; Barr et al., 2013)

• Sometimes take A LOT of time

• Some models don’t converge

response ~ intercept + slope * fixed effect + error

The Linear Model

structural partsystematic

partdeterministic

part

probabilistic part

stochastic partrandom part

response ~ intercept + slope * fixed effect + error

structural partsystematic

partdeterministic

part

probabilistic part

stochastic part

random part

The Linear Mixed Effects Model

Important terminology

- repeatable - non-repeatable

- systematic influence - random influence

- exhaust the population - sample the population

- generally of interest - often not of interest

- can be continuous - have to be categorical

or categorical

Fixed effectRandom effect

“Fixed-effects factors are those in which the populations to which we wish to generalize are precisely the levels represented in our

analysis.”

assumed to be constantacross experimentsStructural

PartStochastic

Part

Crawley (2013: 681)

Subjects as a fixed effect?

NO… why:

not repeatable not systematic often, not of interest small subset of population

Repetitions as a fixed effect?

Yes… why:

repeatable systematic[ often, not of interest] “exhausts the population”

Rep 1

Rep 2

Rep 3

Item #1

Subject

Common experimental data

Item...

Item...

German

French

English

Spanish Italian

Swedish

NorwegianFinnish

Hungarian

Turkish

Romanian

library(lme4)

lmer(y ~ x + (1|subject), mydata)

In R:

Random intercepts

versus

Random slopes

RT (m

s)

Subjects

Random intercepts

Random slopes

Experiment time

RT (m

s)

Randomintercepts

Experiment time

RT (m

s)

Randominterceptsand slopes

Random intercept vs. slope models

Random intercept model= the fixed effect is evaluated against an error term that captures subject- or item-specific variability in the response

Random slope model= the fixed effect is evaluated against an error term that captures subject- or item-specific variability in how the fixed effect affects the response

In R: (1|subject)

In R: (1+pred|subject)

http://anythingbutrbitrary.blogspot.com/2012/06/random-regression-coefficients-using.html

Random intercept examples

• Some people are fast responders, some people are slow responders (their “intercepts” for response time are different)

• Some people are very sensitive / accurate listeners, some are less sensitive (their “intercepts” for accuracy are different)

• Some people have high or low voices with respect to their gender (their “intercepts” for pitch are different)

Random slope examples

• Some people speed up during a long experiment, some slow down

• Some people become more accurate during a long experiment, some less

• Some people raise their pitch more for focus than others

An example

RT ~

An example

RT ~ Condition+ (1|Subject)

An example

RT ~ Condition ++ (1+Condition|Subject)

An example

RT ~ Condition ++ (1+Condition|Subject)+ (1|Item)

An example

RT ~ Condition ++ (1+Condition|Subject)+ (1+Condition|Item)

An example

RT ~ Condition + TrialOrder ++ (1+Condition|Subject)+ (1+Condition|Item)

An example

RT ~ Condition + TrialOrder ++ (1+Condition+

TrialOrder|Subject)+ (1+Condition|Item)

Model specificationfor random effects

(1|subject)random intercept

(0+fixedeffect|subject) random slope

(1+fixedeffect|subject) … with correlation

term

Assumptions

Absence ofCollinearity

Normality of Errors

Homoskedasticity of Errors

No influentialdata points

Independence

Recommended