SlideShare una empresa de Scribd logo
1 de 57
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

Mixed Effects Models - Data Processing
Mixed Effects Models - Data ProcessingMixed Effects Models - Data Processing
Mixed Effects Models - Data ProcessingScott Fraundorf
 
Mixed Effects Models - Post-Hoc Comparisons
Mixed Effects Models - Post-Hoc ComparisonsMixed Effects Models - Post-Hoc Comparisons
Mixed Effects Models - Post-Hoc ComparisonsScott Fraundorf
 
Mixed Effects Models - Crossed Random Effects
Mixed Effects Models - Crossed Random EffectsMixed Effects Models - Crossed Random Effects
Mixed Effects Models - Crossed Random EffectsScott Fraundorf
 
Mixed Effects Models - Growth Curve Analysis
Mixed Effects Models - Growth Curve AnalysisMixed Effects Models - Growth Curve Analysis
Mixed Effects Models - Growth Curve AnalysisScott Fraundorf
 
Mixed Effects Models - Autocorrelation
Mixed Effects Models - AutocorrelationMixed Effects Models - Autocorrelation
Mixed Effects Models - AutocorrelationScott Fraundorf
 
Introduction to z-Scores
Introduction to z-Scores Introduction to z-Scores
Introduction to z-Scores Sr Edith Bogue
 
Confusion matrix, accuracy, precision, recall, f score
Confusion matrix, accuracy, precision, recall, f scoreConfusion matrix, accuracy, precision, recall, f score
Confusion matrix, accuracy, precision, recall, f scoreSaurabh Singh
 
Introduction to t-tests (statistics)
Introduction to t-tests (statistics)Introduction to t-tests (statistics)
Introduction to t-tests (statistics)Dr Bryan Mills
 
Canonical Correlation Analysis
Canonical Correlation AnalysisCanonical Correlation Analysis
Canonical Correlation Analysisrizalbisnis
 
Probability distribution for Dummies
Probability distribution for DummiesProbability distribution for Dummies
Probability distribution for DummiesBalaji P
 
Introduction to Natural Language Processing
Introduction to Natural Language ProcessingIntroduction to Natural Language Processing
Introduction to Natural Language ProcessingMercy Rani
 
Autocorrelation
AutocorrelationAutocorrelation
AutocorrelationADITHYAT1
 
Random number generation
Random number generationRandom number generation
Random number generationvinay126me
 
Null hypothesis for a Factorial ANOVA
Null hypothesis for a Factorial ANOVANull hypothesis for a Factorial ANOVA
Null hypothesis for a Factorial ANOVAKen Plummer
 
Research methods in psychology 1
Research methods in psychology 1Research methods in psychology 1
Research methods in psychology 1Samar Hayat
 
Dependent T Test
Dependent T TestDependent T Test
Dependent T Testshoffma5
 

La actualidad más candente (20)

Mixed Effects Models - Data Processing
Mixed Effects Models - Data ProcessingMixed Effects Models - Data Processing
Mixed Effects Models - Data Processing
 
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 - Crossed Random Effects
Mixed Effects Models - Crossed Random EffectsMixed Effects Models - Crossed Random Effects
Mixed Effects Models - Crossed Random Effects
 
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
 
Correlation
CorrelationCorrelation
Correlation
 
Introduction to z-Scores
Introduction to z-Scores Introduction to z-Scores
Introduction to z-Scores
 
Confusion matrix, accuracy, precision, recall, f score
Confusion matrix, accuracy, precision, recall, f scoreConfusion matrix, accuracy, precision, recall, f score
Confusion matrix, accuracy, precision, recall, f score
 
Introduction to t-tests (statistics)
Introduction to t-tests (statistics)Introduction to t-tests (statistics)
Introduction to t-tests (statistics)
 
Canonical Correlation Analysis
Canonical Correlation AnalysisCanonical Correlation Analysis
Canonical Correlation Analysis
 
Probability distribution for Dummies
Probability distribution for DummiesProbability distribution for Dummies
Probability distribution for Dummies
 
Introduction to Natural Language Processing
Introduction to Natural Language ProcessingIntroduction to Natural Language Processing
Introduction to Natural Language Processing
 
Autocorrelation
AutocorrelationAutocorrelation
Autocorrelation
 
Factor analysis
Factor analysisFactor analysis
Factor analysis
 
Curs 3
Curs 3Curs 3
Curs 3
 
Random number generation
Random number generationRandom number generation
Random number generation
 
Null hypothesis for a Factorial ANOVA
Null hypothesis for a Factorial ANOVANull hypothesis for a Factorial ANOVA
Null hypothesis for a Factorial ANOVA
 
Research methods in psychology 1
Research methods in psychology 1Research methods in psychology 1
Research methods in psychology 1
 
Analysis
AnalysisAnalysis
Analysis
 
Dependent T Test
Dependent T TestDependent T Test
Dependent T Test
 

Similar a 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 VariablesScott 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 2015Jeff Loats
 
Mixed Effects Models - Missing Data
Mixed Effects Models - Missing DataMixed Effects Models - Missing Data
Mixed Effects Models - Missing DataScott Fraundorf
 
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 2015Jeff Loats
 
Generalizability in fMRI, fast and slow
Generalizability in fMRI, fast and slowGeneralizability in fMRI, fast and slow
Generalizability in fMRI, fast and slowTal 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 2015Jeff 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.docxdorishigh
 
Psych Investigations Revision PowerPoint
Psych Investigations Revision PowerPointPsych Investigations Revision PowerPoint
Psych Investigations Revision PowerPointJamie Davies
 
psychological investigations
psychological investigationspsychological investigations
psychological investigationsMadiya 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.pdfJenniferMartin432818
 
Experimental design
Experimental designExperimental design
Experimental designmetalkid132
 
First Pages Cotner 907-6
First Pages Cotner 907-6First Pages Cotner 907-6
First Pages Cotner 907-6bluedoor, LLC.
 
Designing quality open ended tasks
Designing quality open ended tasksDesigning quality open ended tasks
Designing quality open ended tasksevat71
 
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 testaTansy Jessop
 
Oral Exams and Rubrics: An introduction
Oral Exams and Rubrics: An introductionOral Exams and Rubrics: An introduction
Oral Exams and Rubrics: An introductionJoAnn MIller
 

Similar a 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
 

Más de Scott Fraundorf

Mixed Effects Models - Signal Detection Theory
Mixed Effects Models - Signal Detection TheoryMixed Effects Models - Signal Detection Theory
Mixed Effects Models - Signal Detection TheoryScott Fraundorf
 
Mixed Effects Models - Power
Mixed Effects Models - PowerMixed Effects Models - Power
Mixed Effects Models - PowerScott Fraundorf
 
Mixed Effects Models - Effect Size
Mixed Effects Models - Effect SizeMixed Effects Models - Effect Size
Mixed Effects Models - Effect SizeScott Fraundorf
 
Mixed Effects Models - Empirical Logit
Mixed Effects Models - Empirical LogitMixed Effects Models - Empirical Logit
Mixed Effects Models - Empirical LogitScott Fraundorf
 
Mixed Effects Models - Random Intercepts
Mixed Effects Models - Random InterceptsMixed Effects Models - Random Intercepts
Mixed Effects Models - Random InterceptsScott Fraundorf
 
Mixed Effects Models - Fixed Effect Interactions
Mixed Effects Models - Fixed Effect InteractionsMixed Effects Models - Fixed Effect Interactions
Mixed Effects Models - Fixed Effect InteractionsScott Fraundorf
 

Más de 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 - Effect Size
Mixed Effects Models - Effect SizeMixed Effects Models - Effect Size
Mixed Effects Models - Effect Size
 
Mixed Effects Models - Empirical Logit
Mixed Effects Models - Empirical LogitMixed Effects Models - Empirical Logit
Mixed Effects Models - Empirical Logit
 
Mixed Effects Models - Random Intercepts
Mixed Effects Models - Random InterceptsMixed Effects Models - Random Intercepts
Mixed Effects Models - Random Intercepts
 
Mixed Effects Models - Fixed Effect Interactions
Mixed Effects Models - Fixed Effect InteractionsMixed Effects Models - Fixed Effect Interactions
Mixed Effects Models - Fixed Effect Interactions
 
Scott_Fraundorf_Resume
Scott_Fraundorf_ResumeScott_Fraundorf_Resume
Scott_Fraundorf_Resume
 

Último

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Association for Project Management
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 

Último (20)

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 

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