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 Slopes
Mixed Effects Models - Random SlopesMixed Effects Models - Random Slopes
Mixed Effects Models - Random Slopes
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
 
Mixed Effects Models - Autocorrelation
Mixed Effects Models - AutocorrelationMixed Effects Models - Autocorrelation
Mixed Effects Models - Autocorrelation
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 - Effect Size
Mixed Effects Models - Effect SizeMixed Effects Models - Effect Size
Mixed Effects Models - Effect Size
Scott Fraundorf
 
What is a one-way repeated measures ANOVA?
What is a one-way repeated measures ANOVA?What is a one-way repeated measures ANOVA?
What is a one-way repeated measures ANOVA?
Ken Plummer
 
Logistic regression
Logistic regressionLogistic regression
Logistic regression
Khaled Abd Elaziz
 
What is an independent samples-t test?
What is an independent samples-t test?What is an independent samples-t test?
What is an independent samples-t test?
Ken Plummer
 
Logistic Ordinal Regression
Logistic Ordinal RegressionLogistic Ordinal Regression
Logistic Ordinal Regression
Sri Ambati
 
Ordinal logistic regression
Ordinal logistic regression Ordinal logistic regression
Ordinal logistic regression
Dr Athar Khan
 
Topics Modeling
Topics ModelingTopics Modeling
Topics Modeling
Svitlana volkova
 
Single linear regression
Single linear regressionSingle linear regression
Single linear regression
Ken Plummer
 
Word2Vec
Word2VecWord2Vec
Word2Vec
hyunyoung Lee
 
Maximizing the Representation Gap between In-domain & OOD examples
Maximizing the Representation Gap between In-domain & OOD examplesMaximizing the Representation Gap between In-domain & OOD examples
Maximizing the Representation Gap between In-domain & OOD examples
Jay Nandy
 
Clone detection in Python
Clone detection in PythonClone detection in Python
Clone detection in Python
Valerio Maggio
 
Course recommender system
Course recommender systemCourse recommender system
Course recommender system
Aakash Chotrani
 
Pa 298 measures of correlation
Pa 298 measures of correlationPa 298 measures of correlation
Pa 298 measures of correlation
Maria Theresa
 
Introduction to Generalized Linear Models
Introduction to Generalized Linear ModelsIntroduction to Generalized Linear Models
Introduction to Generalized Linear Models
richardchandler
 
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
 
Natural Language parsing.pptx
Natural Language parsing.pptxNatural Language parsing.pptx
Natural Language parsing.pptx
siddhantroy13
 

What's hot (20)

Mixed Effects Models - Random Slopes
Mixed Effects Models - Random SlopesMixed Effects Models - Random Slopes
Mixed Effects Models - Random Slopes
 
Mixed Effects Models - Growth Curve Analysis
Mixed Effects Models - Growth Curve AnalysisMixed Effects Models - Growth Curve Analysis
Mixed Effects Models - Growth Curve Analysis
 
Mixed Effects Models - Autocorrelation
Mixed Effects Models - AutocorrelationMixed Effects Models - Autocorrelation
Mixed Effects Models - Autocorrelation
 
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 - Effect Size
Mixed Effects Models - Effect SizeMixed Effects Models - Effect Size
Mixed Effects Models - Effect Size
 
What is a one-way repeated measures ANOVA?
What is a one-way repeated measures ANOVA?What is a one-way repeated measures ANOVA?
What is a one-way repeated measures ANOVA?
 
Logistic regression
Logistic regressionLogistic regression
Logistic regression
 
What is an independent samples-t test?
What is an independent samples-t test?What is an independent samples-t test?
What is an independent samples-t test?
 
Logistic Ordinal Regression
Logistic Ordinal RegressionLogistic Ordinal Regression
Logistic Ordinal Regression
 
Ordinal logistic regression
Ordinal logistic regression Ordinal logistic regression
Ordinal logistic regression
 
Topics Modeling
Topics ModelingTopics Modeling
Topics Modeling
 
Single linear regression
Single linear regressionSingle linear regression
Single linear regression
 
Word2Vec
Word2VecWord2Vec
Word2Vec
 
Maximizing the Representation Gap between In-domain & OOD examples
Maximizing the Representation Gap between In-domain & OOD examplesMaximizing the Representation Gap between In-domain & OOD examples
Maximizing the Representation Gap between In-domain & OOD examples
 
Clone detection in Python
Clone detection in PythonClone detection in Python
Clone detection in Python
 
Course recommender system
Course recommender systemCourse recommender system
Course recommender system
 
Pa 298 measures of correlation
Pa 298 measures of correlationPa 298 measures of correlation
Pa 298 measures of correlation
 
Introduction to Generalized Linear Models
Introduction to Generalized Linear ModelsIntroduction to Generalized Linear Models
Introduction to Generalized Linear Models
 
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
 
Natural Language parsing.pptx
Natural Language parsing.pptxNatural Language parsing.pptx
Natural Language parsing.pptx
 

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
 

More from 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 - Power
Mixed Effects Models - PowerMixed Effects Models - Power
Mixed Effects Models - Power
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 - Logit Models
Mixed Effects Models - Logit ModelsMixed Effects Models - Logit Models
Mixed Effects Models - Logit Models
Scott Fraundorf
 
Mixed Effects Models - Fixed Effects
Mixed Effects Models - Fixed EffectsMixed Effects Models - Fixed Effects
Mixed Effects Models - Fixed Effects
Scott Fraundorf
 
Mixed Effects Models - Descriptive Statistics
Mixed Effects Models - Descriptive StatisticsMixed Effects Models - Descriptive Statistics
Mixed Effects Models - Descriptive Statistics
Scott Fraundorf
 
Scott_Fraundorf_Resume
Scott_Fraundorf_ResumeScott_Fraundorf_Resume
Scott_Fraundorf_Resume
Scott Fraundorf
 

More from Scott Fraundorf (7)

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 - Power
Mixed Effects Models - PowerMixed Effects Models - Power
Mixed Effects Models - Power
 
Mixed Effects Models - Empirical Logit
Mixed Effects Models - Empirical LogitMixed Effects Models - Empirical Logit
Mixed Effects Models - Empirical Logit
 
Mixed Effects Models - Logit Models
Mixed Effects Models - Logit ModelsMixed Effects Models - Logit Models
Mixed Effects Models - Logit Models
 
Mixed Effects Models - Fixed Effects
Mixed Effects Models - Fixed EffectsMixed Effects Models - Fixed Effects
Mixed Effects Models - Fixed Effects
 
Mixed Effects Models - Descriptive Statistics
Mixed Effects Models - Descriptive StatisticsMixed Effects Models - Descriptive Statistics
Mixed Effects Models - Descriptive Statistics
 
Scott_Fraundorf_Resume
Scott_Fraundorf_ResumeScott_Fraundorf_Resume
Scott_Fraundorf_Resume
 

Recently uploaded

BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
Nguyen Thanh Tu Collection
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
TechSoup
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
EduSkills OECD
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
HajraNaeem15
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
Nguyen Thanh Tu Collection
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
Himanshu Rai
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
Wahiba Chair Training & Consulting
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
S. Raj Kumar
 

Recently uploaded (20)

BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
 

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