SlideShare a Scribd company logo
Using Mixed Effects Models in
Psychology
Scott Fraundorf
sfraundo@pitt.edu
Zoom office hours:
Wed 11-12, or by appointment
Mixed Effects Models Intro
! Course goals & requirements
! Flex @ Pitt considerations
! Motivation for mixed effects models
- Multiple random effects
- Nested random effects
- Crossed random effects
- Categorical data
- Continuous predictors
! Big picture view of mixed effects models
! Terminology
! R
Course Goals
! We will:
- Understand form of mixed effects models
- Apply mixed effects models to common
designs in psychology and related fields (e.g.,
factorial experiments, educational
interventions, longitudinal studies)
- Fit mixed effects models in R using lme4
- Diagnose and address common issues in
using mixed effects models
! We won’t:
- Cover algorithms used by software to compute
mixed effects models
Course Requirements
! We’ll be fitting models in R
! Free & runs on basically any computer
! Next week, will cover basics of using R
Mixed Effects Models Intro
! Course goals & requirements
! Flex @ Pitt considerations
! Motivation for mixed effects models
- Multiple random effects
- Nested random effects
- Crossed random effects
- Categorical data
- Continuous predictors
! Big picture view of mixed effects models
! Terminology
! R
Why Mixed Effects Models?
Mixed Effects Models Intro
! Course goals & requirements
! Flex @ Pitt considerations
! Motivation for mixed effects models
- Multiple random effects
- Nested random effects
- Crossed random effects
- Categorical data
- Continuous predictors
! Big picture view of mixed effects models
! Terminology
! R
• Inferential statistics you may be familiar with:
• ANOVA
• Regression
• Correlation
• All of these
methods involve
random sampling
out of a larger
population
• To which
we hope to
generalize
Problem 1: Multiple Random Effects
Subject 1
Subject 2
Subject 3
• Inferential statistics you may be familiar with:
• ANOVA
• Regression
• Correlation
• Standard
assumption: All
observations are
independent
• Subject 1’s score
doesn’t tell
us anything
about
Subject 2’s
Problem 1: Multiple Random Effects
Subject 1
Subject 2
Subject 3
• Independence
assumption is fair if
we randomly sample
1 person at a time
• e.g., you recruit 40
undergrads from the
Psychology Subject
Pool
• But maybe this
isn’t all we should
be doing… (Henrich
et al., 2010, Nature)
Problem 1: Multiple Random Effects
• Important assumption!
• Does testing benefit
learning of biology?
Problem 1: Multiple Random Effects
Section A
n=50
Practice
quizzes
Section C
n=50
Practice
quizzes
Section B
n=50
Restudy
Section D
n=50
Restudy
• Impressive if 100
separate people who
did practice tests
learned better than
100 people who
reread the textbook
• Not so impressive
when we realize these
aren’t fully
independent
• Need to account
for differences in
instructor, time of
day
•
Problem 1: Multiple Random Effects
Mixed Effects Models Intro
! Course goals & requirements
! Flex @ Pitt considerations
! Motivation for mixed effects models
- Multiple random effects
- Nested random effects
- Crossed random effects
- Categorical data
- Continuous predictors
! Big picture view of mixed effects models
! Terminology
! R
• But many sensible, informative research
designs involve more complex sampling
procedures
• Example: Sampling
multiple children
from the same family
• Kids from the
same family
will be more
similar
• a/k/a clustering
Child 2
FAMILY 1 FAMILY 2
Child 3
Child 1
Problem 1A: Nested Random Effects
• But many sensible, informative research
designs involve more complex sampling
procedures
• Or: Two people in
a relationship
• Or any other
small group
(work teams,
experimentally
formed groups,
etc.)
COUPLE 1
Problem 1A: Nested Random Effects
• But many sensible, informative research
designs involve more complex sampling
procedures
• Or: A longitudinal study
• Each person is sampled multiple times
• Some characteristics don’t change over time—or
don’t change much
Problem 1A: Nested Random Effects
• But many sensible, informative research
designs involve more complex sampling
procedures
• Or: Kids in classrooms in schools
• Kids from the
same school will be
more similar
• Kids in same classroom
will be even more
similar!
Problem 1A: Nested Random Effects
Student
2
CLASS-
ROOM 1
Student
3
Student
1
CLASS-
ROOM 2
SCHOOL
1
• One way to describe what’s going on here is
that there are several levels of sampling, each
nested inside each other
• Each level is what
we’ll call a random
effect (a thing we
sampled)
Problem 1A: Nested Random Effects
SAMPLED SCHOOLS
SAMPLED
CLASSROOMS in
those schools
SAMPLED STUDENTS
in those classrooms
Student
2
CLASS-
ROOM 1
Student
3
Student
1
CLASS-
ROOM 2
SCHOOL
1
• Two challenges:
• Statistically, we need to take account for this non-
independence (similarity)
• Even a small amount of
non-independence can lead to
spurious findings (Quené & van den Bergh, 2008)
• We might want to
characterize differences
at each level!
• Are classroom differences
or school differences
bigger?
Problem 1A: Nested Random Effects
Student
2
CLASS-
ROOM 1
Student
3
Student
1
CLASS-
ROOM 2
SCHOOL
1
Mixed Effects Models Intro
! Course goals & requirements
! Flex @ Pitt considerations
! Motivation for mixed effects models
- Multiple random effects
- Nested random effects
- Crossed random effects
- Categorical data
- Continuous predictors
! Big picture view of mixed effects models
! Terminology
! R
Problem 1B: Crossed Random Effects
• A closely related problem
shows up in many
experimental studies
• Experimental / research
materials are often
sampled out of population
of possible items
• Words or sentences
• Educational materials
• Hypothetical scenarios
• Survey items
• Faces
Problem 1B: Crossed Random Effects
• We might ask:
• Do differences in stimuli
used account for group /
condition differences?
• Study word processing
with a lexical decision
task
EAGLE
PLERN
Problem 1B: Crossed Random Effects
• We might ask:
• Do differences in stimuli
used account for group /
condition differences?
• e.g., Maybe easier
vocab words used in
one condition
Unprimed
Primed
EAGLE
PENGUIN
EAGLE
MONKEY
Problem 1B: Crossed Random Effects
• We might ask:
• Do differences in stimuli
used account for group /
condition differences?
• Do our results generalize
to the population of all
relevant items?
• All vocab words
• All fictional resumes
• All questionnaire items
that measure
extraversion
• All faces
Problem 1B: Crossed Random Effects
• Again, we are sampling
two things—subjects
and items
• Arrangement is slightly
different because each
subject gets each item
• Crossed random effects
• Still, problem is that we
have multiple random
effects (things being
sampled)
Subject 1 Subject 2
EAGLE MONKEY
• Robustness across stimuli has been a major
concern in psycholinguistics for a long time
Problem 1B: Crossed Random Effects
• Robustness across stimuli has been a major
concern in psycholinguistics for a long time
• If you are doing research related to language
processing, you’ll be expected to address this
• (But stats classes don’t always teach you how)
• Now growing interest in other fields, too
Problem 1B: Crossed Random Effects
• Robustness across stimuli has been a major
concern in psycholinguistics for a long time
• If you are doing research related to language
processing, you’ll be expected to address this
• (But stats classes don’t always teach you how)
• Now growing interest in other fields, too
• Be a statistical pioneer!
• Test generalization across items
• Characterize variability
• Increase power (more likely to
detect a significant effect)
Problem 1B: Crossed Random Effects
F1(1,3) = 18.31, p < .05
F2(1,4) = 22.45, p < .01
Problem 1B: Crossed Random Effects
! OLD ANOVA solution:
Do 2 analyses
! Subjects analysis:
Compare each subject
(averaging over all of
the items)
! Does the effect
generalize across
subjects?
! Items analysis:
Compare each item
(averaging over all of
the subjects)
! Does the effect
generalize across items?
SUBJECT ANALYSIS
ITEM ANALYSIS
Problem 1B: Crossed Random Effects
! OLD ANOVA solution:
Do 2 analyses
! Subjects analysis
! Items analysis
! Problem: We now have
2 different sets of
results. Might conflict!
! Possible to combine
them with min F’, but
not widely used
F1(1,3) = 18.31, p < .05
F2(1,4) = 22.45, p < .01
SUBJECT ANALYSIS
ITEM ANALYSIS
Mixed Effects Models Intro
! Course goals & requirements
! Flex @ Pitt considerations
! Motivation for mixed effects models
- Multiple random effects
- Nested random effects
- Crossed random effects
- Categorical data
- Continuous predictors
! Big picture view of mixed effects models
! Terminology
! R
Problem 2: Categorical Data
! Basic linear model assumes our response
(dependent) measure is continuous
! But, we often want to look at categorical data
RT: 833 ms
Does student
graduate high
school or not?
Item recalled
or not?
What predicts
DSM diagnosis of
ASD?
Income: $30,000
Problem One: Categorical Data
! Traditional solution:
Analyze percentages
! Maybe with some transformation
(e.g., arcsine, logit)
! Violates assumptions of linear
model
- Among other issues: Linear
model assumes normal DV,
which has infinite tails
- But percentages are clearly
bounded
- Model could predict
impossible values like 110%
Problem 2: Categorical Data
But
0% ≤ percentages ≤ 100%
∞
-
∞ 100%
0%
Problem One: Categorical Data
! Traditional solution:
Analyze percentages
! Violates assumptions of
ANOVA
- Among other issues: ANOVA
assumes normal distribution,
which has infinite tails
- But proportions are clearly
- Model could predict
impossible values like 110%
Problem 2: Categorical Data
∞
-
∞ But
0% ≤ percentages ≤ 100%
100%
0%
Problem One: Categorical Data
! Traditional solution:
Analyze percentages
! Maybe with some transformation
(e.g., arcsine, logit)
! Violates assumptions of linear
model
! Can lead to:
! Spurious effects
(false positives / Type I error)
! Missing real effects
(false negatives / Type II error)
Problem 2: Categorical Data
Mixed Effects Models Intro
! Course goals & requirements
! Flex @ Pitt considerations
! Motivation for mixed effects models
- Multiple random effects
- Nested random effects
- Crossed random effects
- Categorical data
- Continuous predictors
! Big picture view of mixed effects models
! Terminology
! R
! Many interesting independent variables vary
continuously
! e.g., Word frequency
Problem 3: Continuous Predictors
pitohui eagle
penguin
! Many interesting independent variables vary
continuously
! Or: Second language proficiency or reading skill
! ANOVAs require division into categories
! e.g., median split
Problem 3: Continuous Predictors
! Many interesting independent variables vary
continuously
! Or: Second language proficiency or reading skill
! ANOVAs require division into categories
! e.g., median split
! Or: extreme groups design
Problem 3: Continuous Predictors
! Many interesting independent variables vary
continuously
! Or: Second language proficiency or reading skill
! ANOVAs require division into categories
! Problem: Can only ask “is there a difference?”, not
form of relationship
! Loss of statistical power (Cohen, 1983)
Problem 3: Continuous Predictors
Mixed Effects Models Intro
! Course goals & requirements
! Flex @ Pitt considerations
! Motivation for mixed effects models
- Multiple random effects
- Nested random effects
- Crossed random effects
- Categorical data
- Continuous predictors
! Big picture view of mixed effects models
! Terminology
! R
Power of
subjects
analysis!
Power of
items
analysis!
Captain
Mixed Effects
to the rescue!
! Biggest contribution of mixed-effects models
is to incorporate multiple random effects
into the same analysis
Mixed Effects Models to the Rescue!
How does the effect of parental stress on screen
time generalize across children and families?
How does the effect of aphasia on sentence processing
generalize across subjects and sentences?
Mixed Models to the Rescue!
! Extension of linear model (regression)
= School
+ +
GPA Motiv-
ational
intervention
Subject
Outcome
Problem 1A solved!
3.07
! For many experimental designs, this means a
change in what gets analyzed
! ANOVA: Unit of analysis is cell mean
! Mixed effects models: Unit of analysis is
individual trial!
Mixed Effects Models to the Rescue!
Mixed Models to the Rescue!
! Extension of linear model (regression)
! Look at individual trials/observations (not
means)
= Item
+ +
RT Prime? Subject
Lexical
decision RT
Problem 1B solved!
Mixed Models to the Rescue!
! In a linear model (regression), easy to
include independent variables that are
continuous
= Item
+ +
RT Lexical
Freq.
Subject
Lexical
decision RT Problem 3 solved!
2.32
Mixed Models to the Rescue!
! Link functions allow us to relate model
to DV that isn’t normally distributed
= Item
+ +
Lexical
Freq.
Subject
Odds of correct
response on
this trial (yes or
no?)
Accuracy
Problem 2 solved!
Mixed Models to the Rescue!
! Link functions allow us to relate model
to DV that isn’t normally distributed
=
Odds of
graduating
college
Yes or
No?
Problem 2 solved!
School
+ +
Motiv-
ational
intervention
Subject
Mixed Effects Models Intro
! Course goals & requirements
! Flex @ Pitt considerations
! Motivation for mixed effects models
- Multiple random effects
- Nested random effects
- Crossed random effects
- Categorical data
- Continuous predictors
! Big picture view of mixed effects models
! Terminology
! R
A Terminological Note…
! “Mixed effects models” is a more
general term
! Any model that includes sampled subjects,
classrooms, or items (a “random effect”) plus
predictor variables of interest (“fixed effects”)
! “Mixing” these two types of effects
! One specific type that we’ll be discussing
are “hierarchical linear models”
Mixed Effects Models Intro
! Course goals & requirements
! Flex @ Pitt considerations
! Motivation for mixed effects models
- Multiple random effects
- Nested random effects
- Crossed random effects
- Categorical data
- Continuous predictors
! Big picture view of mixed effects models
! Terminology
! R
R
! How do we run mixed effects models?
! Multiple software packages could be used to fit
the same conceptual model
! Most popular solution: R with lme4
R Pros R Cons
! Free & open-source!
! Runs on any
computer
! Lots of add-ons—
can do just about
any type of model
! Widespread use
! Makes analyses
clear & more
reproducible
! Documentation /
help files not the
best
! Other online
resources
! Requires some
programming, not
just menus
Two Ways to Use R
! Regular R < www.r-project.org >
! RStudio < www.rstudio.com >
! Different interface
! Some additional windows/tools to help you keep
track of what you’re doing
! Same commands, same results
! Also available for just about any platform
! Recommended (but not required)
! Requires you to download regular R first
! Homework for next class: Download them!
Mixed Effects Models Intro
! Course goals & requirements
! Flex @ Pitt considerations
! Motivation for mixed effects models
- Multiple random effects
- Nested random effects
- Crossed random effects
- Categorical data
- Continuous predictors
! Big picture view of mixed effects models
! Terminology
! R
Wrap-Up
! Mixed effects models solve three
common problems with linear model
! Multiple random effects (subjects, items,
classrooms, schools)
! Categorical outcomes
! Continuous predictors
! For next week: Download R!
! Next class, we’ll get started using R
! Canvas survey about your research
background & Flex@Pitt implementation

More Related Content

What's hot

Mixed Effects Models - Random Intercepts
Mixed Effects Models - Random InterceptsMixed Effects Models - Random Intercepts
Mixed Effects Models - Random Intercepts
Scott Fraundorf
 
Mixed Effects Models - Centering and Transformations
Mixed Effects Models - Centering and TransformationsMixed Effects Models - Centering and Transformations
Mixed Effects Models - Centering and Transformations
Scott Fraundorf
 
Mixed Effects Models - Simple and Main Effects
Mixed Effects Models - Simple and Main EffectsMixed Effects Models - Simple and Main Effects
Mixed Effects Models - Simple and Main Effects
Scott Fraundorf
 
Mixed Effects Models - Post-Hoc Comparisons
Mixed Effects Models - Post-Hoc ComparisonsMixed Effects Models - Post-Hoc Comparisons
Mixed Effects Models - Post-Hoc Comparisons
Scott Fraundorf
 
Mixed Effects Models - Empirical Logit
Mixed Effects Models - Empirical LogitMixed Effects Models - Empirical Logit
Mixed Effects Models - Empirical Logit
Scott Fraundorf
 
Mixed Effects Models - Crossed Random Effects
Mixed Effects Models - Crossed Random EffectsMixed Effects Models - Crossed Random Effects
Mixed Effects Models - Crossed Random Effects
Scott Fraundorf
 
Mixed Effects Models - Signal Detection Theory
Mixed Effects Models - Signal Detection TheoryMixed Effects Models - Signal Detection Theory
Mixed Effects Models - Signal Detection Theory
Scott Fraundorf
 
Mixed Effects Models - Effect Size
Mixed Effects Models - Effect SizeMixed Effects Models - Effect Size
Mixed Effects Models - Effect Size
Scott Fraundorf
 
Mixed Effects Models - Autocorrelation
Mixed Effects Models - AutocorrelationMixed Effects Models - Autocorrelation
Mixed Effects Models - Autocorrelation
Scott Fraundorf
 
Mixed Effects Models - Growth Curve Analysis
Mixed Effects Models - Growth Curve AnalysisMixed Effects Models - Growth Curve Analysis
Mixed Effects Models - Growth Curve Analysis
Scott Fraundorf
 
Instrumental Variables
Instrumental VariablesInstrumental Variables
Instrumental Variables
MEASURE Evaluation
 
Application of Weighted Least Squares Regression in Forecasting
Application of Weighted Least Squares Regression in ForecastingApplication of Weighted Least Squares Regression in Forecasting
Application of Weighted Least Squares Regression in Forecasting
paperpublications3
 
Key ideas, terms and concepts in SEM
Key ideas, terms and concepts in SEMKey ideas, terms and concepts in SEM
Key ideas, terms and concepts in SEM
University of Southampton
 
Unit-5.-t-test.ppt
Unit-5.-t-test.pptUnit-5.-t-test.ppt
Unit-5.-t-test.ppt
frelynmaeDillo
 
Sem with amos ii
Sem with amos iiSem with amos ii
Sem with amos ii
Jordan Sitorus
 
Standard deviationnormal distributionshow
Standard deviationnormal distributionshowStandard deviationnormal distributionshow
Standard deviationnormal distributionshow
BiologyIB
 
Selection Bias with Linear Probability Models
Selection Bias with Linear Probability ModelsSelection Bias with Linear Probability Models
Selection Bias with Linear Probability Models
Suneel Babu Chatla
 
Econometria mcg
Econometria   mcgEconometria   mcg
Potential Solutions to the Fundamental Problem of Causal Inference: An Overview
Potential Solutions to the Fundamental Problem of Causal Inference: An OverviewPotential Solutions to the Fundamental Problem of Causal Inference: An Overview
Potential Solutions to the Fundamental Problem of Causal Inference: An Overview
Economic Research Forum
 
SIMULACIÓN DE SISTEMAS DISCRETOS
SIMULACIÓN DE SISTEMAS DISCRETOSSIMULACIÓN DE SISTEMAS DISCRETOS
SIMULACIÓN DE SISTEMAS DISCRETOS
LeonardoCelleri1
 

What's hot (20)

Mixed Effects Models - Random Intercepts
Mixed Effects Models - Random InterceptsMixed Effects Models - Random Intercepts
Mixed Effects Models - Random Intercepts
 
Mixed Effects Models - Centering and Transformations
Mixed Effects Models - Centering and TransformationsMixed Effects Models - Centering and Transformations
Mixed Effects Models - Centering and Transformations
 
Mixed Effects Models - Simple and Main Effects
Mixed Effects Models - Simple and Main EffectsMixed Effects Models - Simple and Main Effects
Mixed Effects Models - Simple and Main Effects
 
Mixed Effects Models - Post-Hoc Comparisons
Mixed Effects Models - Post-Hoc ComparisonsMixed Effects Models - Post-Hoc Comparisons
Mixed Effects Models - Post-Hoc Comparisons
 
Mixed Effects Models - Empirical Logit
Mixed Effects Models - Empirical LogitMixed Effects Models - Empirical Logit
Mixed Effects Models - Empirical Logit
 
Mixed Effects Models - Crossed Random Effects
Mixed Effects Models - Crossed Random EffectsMixed Effects Models - Crossed Random Effects
Mixed Effects Models - Crossed Random Effects
 
Mixed Effects Models - Signal Detection Theory
Mixed Effects Models - Signal Detection TheoryMixed Effects Models - Signal Detection Theory
Mixed Effects Models - Signal Detection Theory
 
Mixed Effects Models - Effect Size
Mixed Effects Models - Effect SizeMixed Effects Models - Effect Size
Mixed Effects Models - Effect Size
 
Mixed Effects Models - Autocorrelation
Mixed Effects Models - AutocorrelationMixed Effects Models - Autocorrelation
Mixed Effects Models - Autocorrelation
 
Mixed Effects Models - Growth Curve Analysis
Mixed Effects Models - Growth Curve AnalysisMixed Effects Models - Growth Curve Analysis
Mixed Effects Models - Growth Curve Analysis
 
Instrumental Variables
Instrumental VariablesInstrumental Variables
Instrumental Variables
 
Application of Weighted Least Squares Regression in Forecasting
Application of Weighted Least Squares Regression in ForecastingApplication of Weighted Least Squares Regression in Forecasting
Application of Weighted Least Squares Regression in Forecasting
 
Key ideas, terms and concepts in SEM
Key ideas, terms and concepts in SEMKey ideas, terms and concepts in SEM
Key ideas, terms and concepts in SEM
 
Unit-5.-t-test.ppt
Unit-5.-t-test.pptUnit-5.-t-test.ppt
Unit-5.-t-test.ppt
 
Sem with amos ii
Sem with amos iiSem with amos ii
Sem with amos ii
 
Standard deviationnormal distributionshow
Standard deviationnormal distributionshowStandard deviationnormal distributionshow
Standard deviationnormal distributionshow
 
Selection Bias with Linear Probability Models
Selection Bias with Linear Probability ModelsSelection Bias with Linear Probability Models
Selection Bias with Linear Probability Models
 
Econometria mcg
Econometria   mcgEconometria   mcg
Econometria mcg
 
Potential Solutions to the Fundamental Problem of Causal Inference: An Overview
Potential Solutions to the Fundamental Problem of Causal Inference: An OverviewPotential Solutions to the Fundamental Problem of Causal Inference: An Overview
Potential Solutions to the Fundamental Problem of Causal Inference: An Overview
 
SIMULACIÓN DE SISTEMAS DISCRETOS
SIMULACIÓN DE SISTEMAS DISCRETOSSIMULACIÓN DE SISTEMAS DISCRETOS
SIMULACIÓN DE SISTEMAS DISCRETOS
 

Similar to Mixed Effects Models - Introduction

Mixed Effects Models - Level-2 Variables
Mixed Effects Models - Level-2 VariablesMixed Effects Models - Level-2 Variables
Mixed Effects Models - Level-2 Variables
Scott Fraundorf
 
JiTT - Blended Learning Across the Academy - Teaching Prof. Tech - Oct 2015
JiTT - Blended Learning Across the Academy - Teaching Prof. Tech - Oct 2015JiTT - Blended Learning Across the Academy - Teaching Prof. Tech - Oct 2015
JiTT - Blended Learning Across the Academy - Teaching Prof. Tech - Oct 2015
Jeff Loats
 
Mixed Effects Models - Missing Data
Mixed Effects Models - Missing DataMixed Effects Models - Missing Data
Mixed Effects Models - Missing Data
Scott Fraundorf
 
Introduction to Research Methods in Education
Introduction to Research Methods in EducationIntroduction to Research Methods in Education
Introduction to Research Methods in Education
Jasarat Ilyas Jokhio Tahiri
 
UNC CETL - JiTT - Making It Shine - Nov 2015
UNC CETL - JiTT - Making It Shine - Nov 2015UNC CETL - JiTT - Making It Shine - Nov 2015
UNC CETL - JiTT - Making It Shine - Nov 2015
Jeff Loats
 
Generalizability in fMRI, fast and slow
Generalizability in fMRI, fast and slowGeneralizability in fMRI, fast and slow
Generalizability in fMRI, fast and slow
Tal Yarkoni
 
Jeff Loats - Scholarly Teaching - TLD, Feb 2015
Jeff Loats - Scholarly Teaching - TLD, Feb 2015Jeff Loats - Scholarly Teaching - TLD, Feb 2015
Jeff Loats - Scholarly Teaching - TLD, Feb 2015
Jeff Loats
 
1 University of Wollongong School of Psychol.docx
1 University of Wollongong School of Psychol.docx1 University of Wollongong School of Psychol.docx
1 University of Wollongong School of Psychol.docx
dorishigh
 
SBS 200 SS 1 SYLLABUS
SBS 200 SS 1 SYLLABUSSBS 200 SS 1 SYLLABUS
SBS 200 SS 1 SYLLABUS
Nicholas Thorne
 
Psych Investigations Revision PowerPoint
Psych Investigations Revision PowerPointPsych Investigations Revision PowerPoint
Psych Investigations Revision PowerPoint
Jamie Davies
 
psychological investigations
psychological investigationspsychological investigations
psychological investigations
Madiya Afzal
 
"They'll Need It for High School"
"They'll Need It for High School""They'll Need It for High School"
"They'll Need It for High School"
Chris Hunter
 
STRATEGIES TO LEARNING PHYSICS PROBLEM.pdf
STRATEGIES TO LEARNING PHYSICS PROBLEM.pdfSTRATEGIES TO LEARNING PHYSICS PROBLEM.pdf
STRATEGIES TO LEARNING PHYSICS PROBLEM.pdf
JenniferMartin432818
 
Experimental design
Experimental designExperimental design
Experimental design
metalkid132
 
First Pages Cotner 907-6
First Pages Cotner 907-6First Pages Cotner 907-6
First Pages Cotner 907-6
bluedoor, LLC.
 
Designing quality open ended tasks
Designing quality open ended tasksDesigning quality open ended tasks
Designing quality open ended tasks
evat71
 
Common Shortcomings in SE Experiments (ICSE'14 Doctoral Symposium Keynote)
Common Shortcomings in SE Experiments (ICSE'14 Doctoral Symposium Keynote)Common Shortcomings in SE Experiments (ICSE'14 Doctoral Symposium Keynote)
Common Shortcomings in SE Experiments (ICSE'14 Doctoral Symposium Keynote)
Natalia Juristo
 
The why and what of testa
The why and what of testaThe why and what of testa
The why and what of testa
Tansy Jessop
 
Research problem
Research problemResearch problem
Research problem
Thangamani Ramalingam
 
Oral Exams and Rubrics: An introduction
Oral Exams and Rubrics: An introductionOral Exams and Rubrics: An introduction
Oral Exams and Rubrics: An introduction
JoAnn MIller
 

Similar to Mixed Effects Models - Introduction (20)

Mixed Effects Models - Level-2 Variables
Mixed Effects Models - Level-2 VariablesMixed Effects Models - Level-2 Variables
Mixed Effects Models - Level-2 Variables
 
JiTT - Blended Learning Across the Academy - Teaching Prof. Tech - Oct 2015
JiTT - Blended Learning Across the Academy - Teaching Prof. Tech - Oct 2015JiTT - Blended Learning Across the Academy - Teaching Prof. Tech - Oct 2015
JiTT - Blended Learning Across the Academy - Teaching Prof. Tech - Oct 2015
 
Mixed Effects Models - Missing Data
Mixed Effects Models - Missing DataMixed Effects Models - Missing Data
Mixed Effects Models - Missing Data
 
Introduction to Research Methods in Education
Introduction to Research Methods in EducationIntroduction to Research Methods in Education
Introduction to Research Methods in Education
 
UNC CETL - JiTT - Making It Shine - Nov 2015
UNC CETL - JiTT - Making It Shine - Nov 2015UNC CETL - JiTT - Making It Shine - Nov 2015
UNC CETL - JiTT - Making It Shine - Nov 2015
 
Generalizability in fMRI, fast and slow
Generalizability in fMRI, fast and slowGeneralizability in fMRI, fast and slow
Generalizability in fMRI, fast and slow
 
Jeff Loats - Scholarly Teaching - TLD, Feb 2015
Jeff Loats - Scholarly Teaching - TLD, Feb 2015Jeff Loats - Scholarly Teaching - TLD, Feb 2015
Jeff Loats - Scholarly Teaching - TLD, Feb 2015
 
1 University of Wollongong School of Psychol.docx
1 University of Wollongong School of Psychol.docx1 University of Wollongong School of Psychol.docx
1 University of Wollongong School of Psychol.docx
 
SBS 200 SS 1 SYLLABUS
SBS 200 SS 1 SYLLABUSSBS 200 SS 1 SYLLABUS
SBS 200 SS 1 SYLLABUS
 
Psych Investigations Revision PowerPoint
Psych Investigations Revision PowerPointPsych Investigations Revision PowerPoint
Psych Investigations Revision PowerPoint
 
psychological investigations
psychological investigationspsychological investigations
psychological investigations
 
"They'll Need It for High School"
"They'll Need It for High School""They'll Need It for High School"
"They'll Need It for High School"
 
STRATEGIES TO LEARNING PHYSICS PROBLEM.pdf
STRATEGIES TO LEARNING PHYSICS PROBLEM.pdfSTRATEGIES TO LEARNING PHYSICS PROBLEM.pdf
STRATEGIES TO LEARNING PHYSICS PROBLEM.pdf
 
Experimental design
Experimental designExperimental design
Experimental design
 
First Pages Cotner 907-6
First Pages Cotner 907-6First Pages Cotner 907-6
First Pages Cotner 907-6
 
Designing quality open ended tasks
Designing quality open ended tasksDesigning quality open ended tasks
Designing quality open ended tasks
 
Common Shortcomings in SE Experiments (ICSE'14 Doctoral Symposium Keynote)
Common Shortcomings in SE Experiments (ICSE'14 Doctoral Symposium Keynote)Common Shortcomings in SE Experiments (ICSE'14 Doctoral Symposium Keynote)
Common Shortcomings in SE Experiments (ICSE'14 Doctoral Symposium Keynote)
 
The why and what of testa
The why and what of testaThe why and what of testa
The why and what of testa
 
Research problem
Research problemResearch problem
Research problem
 
Oral Exams and Rubrics: An introduction
Oral Exams and Rubrics: An introductionOral Exams and Rubrics: An introduction
Oral Exams and Rubrics: An introduction
 

Recently uploaded

skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)
Mohammad Al-Dhahabi
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
giancarloi8888
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 8 - CẢ NĂM - FRIENDS PLUS - NĂM HỌC 2023-2024 (B...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 8 - CẢ NĂM - FRIENDS PLUS - NĂM HỌC 2023-2024 (B...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 8 - CẢ NĂM - FRIENDS PLUS - NĂM HỌC 2023-2024 (B...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 8 - CẢ NĂM - FRIENDS PLUS - NĂM HỌC 2023-2024 (B...
Nguyen Thanh Tu Collection
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
PsychoTech Services
 
Accounting for Restricted Grants When and How To Record Properly
Accounting for Restricted Grants  When and How To Record ProperlyAccounting for Restricted Grants  When and How To Record Properly
Accounting for Restricted Grants When and How To Record Properly
TechSoup
 
How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17
Celine George
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
 
Bossa N’ Roll Records by Ismael Vazquez.
Bossa N’ Roll Records by Ismael Vazquez.Bossa N’ Roll Records by Ismael Vazquez.
Bossa N’ Roll Records by Ismael Vazquez.
IsmaelVazquez38
 
Skimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S EliotSkimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S Eliot
nitinpv4ai
 
The basics of sentences session 7pptx.pptx
The basics of sentences session 7pptx.pptxThe basics of sentences session 7pptx.pptx
The basics of sentences session 7pptx.pptx
heathfieldcps1
 
CHUYÊN ĐỀ ÔN TẬP VÀ PHÁT TRIỂN CÂU HỎI TRONG ĐỀ MINH HỌA THI TỐT NGHIỆP THPT ...
CHUYÊN ĐỀ ÔN TẬP VÀ PHÁT TRIỂN CÂU HỎI TRONG ĐỀ MINH HỌA THI TỐT NGHIỆP THPT ...CHUYÊN ĐỀ ÔN TẬP VÀ PHÁT TRIỂN CÂU HỎI TRONG ĐỀ MINH HỌA THI TỐT NGHIỆP THPT ...
CHUYÊN ĐỀ ÔN TẬP VÀ PHÁT TRIỂN CÂU HỎI TRONG ĐỀ MINH HỌA THI TỐT NGHIỆP THPT ...
Nguyen Thanh Tu Collection
 
Educational Technology in the Health Sciences
Educational Technology in the Health SciencesEducational Technology in the Health Sciences
Educational Technology in the Health Sciences
Iris Thiele Isip-Tan
 
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
TechSoup
 
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
ImMuslim
 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Henry Hollis
 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
deepaannamalai16
 
How to Fix [Errno 98] address already in use
How to Fix [Errno 98] address already in useHow to Fix [Errno 98] address already in use
How to Fix [Errno 98] address already in use
Celine George
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
haiqairshad
 
Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"
National Information Standards Organization (NISO)
 
Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10
nitinpv4ai
 

Recently uploaded (20)

skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 8 - CẢ NĂM - FRIENDS PLUS - NĂM HỌC 2023-2024 (B...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 8 - CẢ NĂM - FRIENDS PLUS - NĂM HỌC 2023-2024 (B...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 8 - CẢ NĂM - FRIENDS PLUS - NĂM HỌC 2023-2024 (B...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 8 - CẢ NĂM - FRIENDS PLUS - NĂM HỌC 2023-2024 (B...
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
 
Accounting for Restricted Grants When and How To Record Properly
Accounting for Restricted Grants  When and How To Record ProperlyAccounting for Restricted Grants  When and How To Record Properly
Accounting for Restricted Grants When and How To Record Properly
 
How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
 
Bossa N’ Roll Records by Ismael Vazquez.
Bossa N’ Roll Records by Ismael Vazquez.Bossa N’ Roll Records by Ismael Vazquez.
Bossa N’ Roll Records by Ismael Vazquez.
 
Skimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S EliotSkimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S Eliot
 
The basics of sentences session 7pptx.pptx
The basics of sentences session 7pptx.pptxThe basics of sentences session 7pptx.pptx
The basics of sentences session 7pptx.pptx
 
CHUYÊN ĐỀ ÔN TẬP VÀ PHÁT TRIỂN CÂU HỎI TRONG ĐỀ MINH HỌA THI TỐT NGHIỆP THPT ...
CHUYÊN ĐỀ ÔN TẬP VÀ PHÁT TRIỂN CÂU HỎI TRONG ĐỀ MINH HỌA THI TỐT NGHIỆP THPT ...CHUYÊN ĐỀ ÔN TẬP VÀ PHÁT TRIỂN CÂU HỎI TRONG ĐỀ MINH HỌA THI TỐT NGHIỆP THPT ...
CHUYÊN ĐỀ ÔN TẬP VÀ PHÁT TRIỂN CÂU HỎI TRONG ĐỀ MINH HỌA THI TỐT NGHIỆP THPT ...
 
Educational Technology in the Health Sciences
Educational Technology in the Health SciencesEducational Technology in the Health Sciences
Educational Technology in the Health Sciences
 
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
 
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
 
How to Fix [Errno 98] address already in use
How to Fix [Errno 98] address already in useHow to Fix [Errno 98] address already in use
How to Fix [Errno 98] address already in use
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
 
Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"
 
Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10
 

Mixed Effects Models - Introduction

  • 1. Using Mixed Effects Models in Psychology Scott Fraundorf sfraundo@pitt.edu Zoom office hours: Wed 11-12, or by appointment
  • 2. Mixed Effects Models Intro ! Course goals & requirements ! Flex @ Pitt considerations ! Motivation for mixed effects models - Multiple random effects - Nested random effects - Crossed random effects - Categorical data - Continuous predictors ! Big picture view of mixed effects models ! Terminology ! R
  • 3. Course Goals ! We will: - Understand form of mixed effects models - Apply mixed effects models to common designs in psychology and related fields (e.g., factorial experiments, educational interventions, longitudinal studies) - Fit mixed effects models in R using lme4 - Diagnose and address common issues in using mixed effects models ! We won’t: - Cover algorithms used by software to compute mixed effects models
  • 4. Course Requirements ! We’ll be fitting models in R ! Free & runs on basically any computer ! Next week, will cover basics of using R
  • 5. Mixed Effects Models Intro ! Course goals & requirements ! Flex @ Pitt considerations ! Motivation for mixed effects models - Multiple random effects - Nested random effects - Crossed random effects - Categorical data - Continuous predictors ! Big picture view of mixed effects models ! Terminology ! R
  • 7. Mixed Effects Models Intro ! Course goals & requirements ! Flex @ Pitt considerations ! Motivation for mixed effects models - Multiple random effects - Nested random effects - Crossed random effects - Categorical data - Continuous predictors ! Big picture view of mixed effects models ! Terminology ! R
  • 8. • Inferential statistics you may be familiar with: • ANOVA • Regression • Correlation • All of these methods involve random sampling out of a larger population • To which we hope to generalize Problem 1: Multiple Random Effects Subject 1 Subject 2 Subject 3
  • 9. • Inferential statistics you may be familiar with: • ANOVA • Regression • Correlation • Standard assumption: All observations are independent • Subject 1’s score doesn’t tell us anything about Subject 2’s Problem 1: Multiple Random Effects Subject 1 Subject 2 Subject 3
  • 10. • Independence assumption is fair if we randomly sample 1 person at a time • e.g., you recruit 40 undergrads from the Psychology Subject Pool • But maybe this isn’t all we should be doing… (Henrich et al., 2010, Nature) Problem 1: Multiple Random Effects
  • 11. • Important assumption! • Does testing benefit learning of biology? Problem 1: Multiple Random Effects Section A n=50 Practice quizzes Section C n=50 Practice quizzes Section B n=50 Restudy Section D n=50 Restudy
  • 12. • Impressive if 100 separate people who did practice tests learned better than 100 people who reread the textbook • Not so impressive when we realize these aren’t fully independent • Need to account for differences in instructor, time of day • Problem 1: Multiple Random Effects
  • 13. Mixed Effects Models Intro ! Course goals & requirements ! Flex @ Pitt considerations ! Motivation for mixed effects models - Multiple random effects - Nested random effects - Crossed random effects - Categorical data - Continuous predictors ! Big picture view of mixed effects models ! Terminology ! R
  • 14. • But many sensible, informative research designs involve more complex sampling procedures • Example: Sampling multiple children from the same family • Kids from the same family will be more similar • a/k/a clustering Child 2 FAMILY 1 FAMILY 2 Child 3 Child 1 Problem 1A: Nested Random Effects
  • 15. • But many sensible, informative research designs involve more complex sampling procedures • Or: Two people in a relationship • Or any other small group (work teams, experimentally formed groups, etc.) COUPLE 1 Problem 1A: Nested Random Effects
  • 16. • But many sensible, informative research designs involve more complex sampling procedures • Or: A longitudinal study • Each person is sampled multiple times • Some characteristics don’t change over time—or don’t change much Problem 1A: Nested Random Effects
  • 17. • But many sensible, informative research designs involve more complex sampling procedures • Or: Kids in classrooms in schools • Kids from the same school will be more similar • Kids in same classroom will be even more similar! Problem 1A: Nested Random Effects Student 2 CLASS- ROOM 1 Student 3 Student 1 CLASS- ROOM 2 SCHOOL 1
  • 18. • One way to describe what’s going on here is that there are several levels of sampling, each nested inside each other • Each level is what we’ll call a random effect (a thing we sampled) Problem 1A: Nested Random Effects SAMPLED SCHOOLS SAMPLED CLASSROOMS in those schools SAMPLED STUDENTS in those classrooms Student 2 CLASS- ROOM 1 Student 3 Student 1 CLASS- ROOM 2 SCHOOL 1
  • 19. • Two challenges: • Statistically, we need to take account for this non- independence (similarity) • Even a small amount of non-independence can lead to spurious findings (Quené & van den Bergh, 2008) • We might want to characterize differences at each level! • Are classroom differences or school differences bigger? Problem 1A: Nested Random Effects Student 2 CLASS- ROOM 1 Student 3 Student 1 CLASS- ROOM 2 SCHOOL 1
  • 20. Mixed Effects Models Intro ! Course goals & requirements ! Flex @ Pitt considerations ! Motivation for mixed effects models - Multiple random effects - Nested random effects - Crossed random effects - Categorical data - Continuous predictors ! Big picture view of mixed effects models ! Terminology ! R
  • 21. Problem 1B: Crossed Random Effects • A closely related problem shows up in many experimental studies • Experimental / research materials are often sampled out of population of possible items • Words or sentences • Educational materials • Hypothetical scenarios • Survey items • Faces
  • 22. Problem 1B: Crossed Random Effects • We might ask: • Do differences in stimuli used account for group / condition differences? • Study word processing with a lexical decision task EAGLE PLERN
  • 23. Problem 1B: Crossed Random Effects • We might ask: • Do differences in stimuli used account for group / condition differences? • e.g., Maybe easier vocab words used in one condition Unprimed Primed EAGLE PENGUIN EAGLE MONKEY
  • 24. Problem 1B: Crossed Random Effects • We might ask: • Do differences in stimuli used account for group / condition differences? • Do our results generalize to the population of all relevant items? • All vocab words • All fictional resumes • All questionnaire items that measure extraversion • All faces
  • 25. Problem 1B: Crossed Random Effects • Again, we are sampling two things—subjects and items • Arrangement is slightly different because each subject gets each item • Crossed random effects • Still, problem is that we have multiple random effects (things being sampled) Subject 1 Subject 2 EAGLE MONKEY
  • 26. • Robustness across stimuli has been a major concern in psycholinguistics for a long time Problem 1B: Crossed Random Effects
  • 27. • Robustness across stimuli has been a major concern in psycholinguistics for a long time • If you are doing research related to language processing, you’ll be expected to address this • (But stats classes don’t always teach you how) • Now growing interest in other fields, too Problem 1B: Crossed Random Effects
  • 28. • Robustness across stimuli has been a major concern in psycholinguistics for a long time • If you are doing research related to language processing, you’ll be expected to address this • (But stats classes don’t always teach you how) • Now growing interest in other fields, too • Be a statistical pioneer! • Test generalization across items • Characterize variability • Increase power (more likely to detect a significant effect) Problem 1B: Crossed Random Effects
  • 29. F1(1,3) = 18.31, p < .05 F2(1,4) = 22.45, p < .01 Problem 1B: Crossed Random Effects ! OLD ANOVA solution: Do 2 analyses ! Subjects analysis: Compare each subject (averaging over all of the items) ! Does the effect generalize across subjects? ! Items analysis: Compare each item (averaging over all of the subjects) ! Does the effect generalize across items? SUBJECT ANALYSIS ITEM ANALYSIS
  • 30. Problem 1B: Crossed Random Effects ! OLD ANOVA solution: Do 2 analyses ! Subjects analysis ! Items analysis ! Problem: We now have 2 different sets of results. Might conflict! ! Possible to combine them with min F’, but not widely used F1(1,3) = 18.31, p < .05 F2(1,4) = 22.45, p < .01 SUBJECT ANALYSIS ITEM ANALYSIS
  • 31. Mixed Effects Models Intro ! Course goals & requirements ! Flex @ Pitt considerations ! Motivation for mixed effects models - Multiple random effects - Nested random effects - Crossed random effects - Categorical data - Continuous predictors ! Big picture view of mixed effects models ! Terminology ! R
  • 32. Problem 2: Categorical Data ! Basic linear model assumes our response (dependent) measure is continuous ! But, we often want to look at categorical data RT: 833 ms Does student graduate high school or not? Item recalled or not? What predicts DSM diagnosis of ASD? Income: $30,000
  • 33. Problem One: Categorical Data ! Traditional solution: Analyze percentages ! Maybe with some transformation (e.g., arcsine, logit) ! Violates assumptions of linear model - Among other issues: Linear model assumes normal DV, which has infinite tails - But percentages are clearly bounded - Model could predict impossible values like 110% Problem 2: Categorical Data But 0% ≤ percentages ≤ 100% ∞ - ∞ 100% 0%
  • 34. Problem One: Categorical Data ! Traditional solution: Analyze percentages ! Violates assumptions of ANOVA - Among other issues: ANOVA assumes normal distribution, which has infinite tails - But proportions are clearly - Model could predict impossible values like 110% Problem 2: Categorical Data ∞ - ∞ But 0% ≤ percentages ≤ 100% 100% 0%
  • 35. Problem One: Categorical Data ! Traditional solution: Analyze percentages ! Maybe with some transformation (e.g., arcsine, logit) ! Violates assumptions of linear model ! Can lead to: ! Spurious effects (false positives / Type I error) ! Missing real effects (false negatives / Type II error) Problem 2: Categorical Data
  • 36. Mixed Effects Models Intro ! Course goals & requirements ! Flex @ Pitt considerations ! Motivation for mixed effects models - Multiple random effects - Nested random effects - Crossed random effects - Categorical data - Continuous predictors ! Big picture view of mixed effects models ! Terminology ! R
  • 37. ! Many interesting independent variables vary continuously ! e.g., Word frequency Problem 3: Continuous Predictors pitohui eagle penguin
  • 38. ! Many interesting independent variables vary continuously ! Or: Second language proficiency or reading skill ! ANOVAs require division into categories ! e.g., median split Problem 3: Continuous Predictors
  • 39. ! Many interesting independent variables vary continuously ! Or: Second language proficiency or reading skill ! ANOVAs require division into categories ! e.g., median split ! Or: extreme groups design Problem 3: Continuous Predictors
  • 40. ! Many interesting independent variables vary continuously ! Or: Second language proficiency or reading skill ! ANOVAs require division into categories ! Problem: Can only ask “is there a difference?”, not form of relationship ! Loss of statistical power (Cohen, 1983) Problem 3: Continuous Predictors
  • 41.
  • 42. Mixed Effects Models Intro ! Course goals & requirements ! Flex @ Pitt considerations ! Motivation for mixed effects models - Multiple random effects - Nested random effects - Crossed random effects - Categorical data - Continuous predictors ! Big picture view of mixed effects models ! Terminology ! R Power of subjects analysis! Power of items analysis! Captain Mixed Effects to the rescue!
  • 43. ! Biggest contribution of mixed-effects models is to incorporate multiple random effects into the same analysis Mixed Effects Models to the Rescue! How does the effect of parental stress on screen time generalize across children and families? How does the effect of aphasia on sentence processing generalize across subjects and sentences?
  • 44. Mixed Models to the Rescue! ! Extension of linear model (regression) = School + + GPA Motiv- ational intervention Subject Outcome Problem 1A solved! 3.07
  • 45. ! For many experimental designs, this means a change in what gets analyzed ! ANOVA: Unit of analysis is cell mean ! Mixed effects models: Unit of analysis is individual trial! Mixed Effects Models to the Rescue!
  • 46. Mixed Models to the Rescue! ! Extension of linear model (regression) ! Look at individual trials/observations (not means) = Item + + RT Prime? Subject Lexical decision RT Problem 1B solved!
  • 47. Mixed Models to the Rescue! ! In a linear model (regression), easy to include independent variables that are continuous = Item + + RT Lexical Freq. Subject Lexical decision RT Problem 3 solved! 2.32
  • 48. Mixed Models to the Rescue! ! Link functions allow us to relate model to DV that isn’t normally distributed = Item + + Lexical Freq. Subject Odds of correct response on this trial (yes or no?) Accuracy Problem 2 solved!
  • 49. Mixed Models to the Rescue! ! Link functions allow us to relate model to DV that isn’t normally distributed = Odds of graduating college Yes or No? Problem 2 solved! School + + Motiv- ational intervention Subject
  • 50. Mixed Effects Models Intro ! Course goals & requirements ! Flex @ Pitt considerations ! Motivation for mixed effects models - Multiple random effects - Nested random effects - Crossed random effects - Categorical data - Continuous predictors ! Big picture view of mixed effects models ! Terminology ! R
  • 51. A Terminological Note… ! “Mixed effects models” is a more general term ! Any model that includes sampled subjects, classrooms, or items (a “random effect”) plus predictor variables of interest (“fixed effects”) ! “Mixing” these two types of effects ! One specific type that we’ll be discussing are “hierarchical linear models”
  • 52. Mixed Effects Models Intro ! Course goals & requirements ! Flex @ Pitt considerations ! Motivation for mixed effects models - Multiple random effects - Nested random effects - Crossed random effects - Categorical data - Continuous predictors ! Big picture view of mixed effects models ! Terminology ! R
  • 53. R ! How do we run mixed effects models? ! Multiple software packages could be used to fit the same conceptual model ! Most popular solution: R with lme4
  • 54. R Pros R Cons ! Free & open-source! ! Runs on any computer ! Lots of add-ons— can do just about any type of model ! Widespread use ! Makes analyses clear & more reproducible ! Documentation / help files not the best ! Other online resources ! Requires some programming, not just menus
  • 55. Two Ways to Use R ! Regular R < www.r-project.org > ! RStudio < www.rstudio.com > ! Different interface ! Some additional windows/tools to help you keep track of what you’re doing ! Same commands, same results ! Also available for just about any platform ! Recommended (but not required) ! Requires you to download regular R first ! Homework for next class: Download them!
  • 56. Mixed Effects Models Intro ! Course goals & requirements ! Flex @ Pitt considerations ! Motivation for mixed effects models - Multiple random effects - Nested random effects - Crossed random effects - Categorical data - Continuous predictors ! Big picture view of mixed effects models ! Terminology ! R
  • 57. Wrap-Up ! Mixed effects models solve three common problems with linear model ! Multiple random effects (subjects, items, classrooms, schools) ! Categorical outcomes ! Continuous predictors ! For next week: Download R! ! Next class, we’ll get started using R ! Canvas survey about your research background & Flex@Pitt implementation