SlideShare una empresa de Scribd logo
1 de 58
Descargar para leer sin conexión
Mixed Effects Models!
• Next 3 weeks: Basics of a mixed effects
analysis with continuous/numerical variables
• This week: Fixed effects (effects of interest)
• Next 2 weeks: Random effects (e.g., subjects,
classrooms, items, firms, dyads/couples)
• After that: categorical variables
• As predictors
• As outcomes
Week 3.1: Fixed Effects
! Sample Dataset & Research Questions
! Theoretical Model
! lme4 in R
! Parameter Interpretation
! Slopes
! Intercept
! Hypothesis Testing
! t-test
! Confidence Interval
! More About Model Fitting
Introduction to Fixed Effects
• Canvas: Modules " Week 3.1
• Team problem-solving task in organizations
• Assemble a landline phone
• 10 teams at each of 11 companies (total 110)
• Dependent measure: Minutes
taken to complete the task
• Predictor variables:
• Number of newcomers on the
team
• Average years of experience
Lewis, Belliveau, Herndon, & Keller (2007)
Introduction to Fixed Effects
• Canvas: Modules " Week 3.1
• Team problem-solving task in organizations
• Assemble a landline phone
• 10 teams at each of 11 companies (total 110)
Week 3.1: Fixed Effects
! Sample Dataset & Research Questions
! Theoretical Model
! lme4 in R
! Parameter Interpretation
! Slopes
! Intercept
! Hypothesis Testing
! t-test
! Confidence Interval
! More About Model Fitting
Introduction to Fixed Effects
=
Minutes
taken to
assemble
phone
Newcomers
+ +
Years of
Experience
+ Company
Baseline
• Predicting one variable as a function of others
Introduction to Fixed Effects
=
Minutes
taken to
assemble
phone
Newcomers
+ +
Years of
Experience
+ Company
Baseline
• Predicting one variable as a function of others
NEXT
WEEK!
Introduction to Fixed Effects
=
Minutes
taken to
assemble
phone
Newcomers
+ +
Years of
Experience
Baseline
• Predicting one variable as a function of others
Fixed effects that we’re
trying to model
Introduction to Fixed Effects
=
Minutes
taken to
assemble
phone
Newcomers
+ +
Years of
Experience
Baseline
• Predicting one variable as a function of others
γ00
(Bryk & Raudenbush, 1992; Quene & van den Bergh, 2004, 2008)
THEORY AND DEFINITION:
Introduction to Fixed Effects
=
Minutes
taken to
assemble
phone
Newcomers
+ +
Years of
Experience
Baseline
• Predicting one variable as a function of others
γ00
(Bryk & Raudenbush, 1992; Quene & van den Bergh, 2004, 2008)
x1i(j) x2i(j)
THEORY AND DEFINITION:
Introduction to Fixed Effects
• Predicting one variable as a function of others
• Relationship of number of newcomers to completion
time in minutes is probably not 1:1
(Bryk & Raudenbush, 1992; Quene & van den Bergh, 2004, 2008)
Regression line
relating number of
newcomers to
completion time
Introduction to Fixed Effects
=
Minutes
taken to
assemble
phone
Newcomers
+ +
Years of
Experience
Baseline
• Predicting one variable as a function of others
• γ20 = slope of line relating newcomers to time taken
• One of the fixed effects we want to find this out
• How do newcomers affect completion time in this task?
γ00
(Bryk & Raudenbush, 1992; Quene & van den Bergh, 2004, 2008)
γ10x1i(j) γ20x2i(j)
Introduction to Fixed Effects
=
Minutes
taken to
assemble
phone
Newcomers
+ +
Years of
Experience
Baseline
• Can we determine the exact completion time
based on team composition?
γ00
(Bryk & Raudenbush, 1992; Quene & van den Bergh, 2004, 2008)
γ10x1i(j) γ20x2i(j)
Introduction to Fixed Effects
• Can we determine the exact completion time
based on team composition?
• Probably not.
(Bryk & Raudenbush, 1992; Quene & van den Bergh, 2004, 2008)
Introduction to Fixed Effects
=
Minutes
taken to
assemble
phone
Newcomers
+ +
Years of
Experience
Baseline
• Can we determine the exact completion time
based on team composition?
• Probably not.
• These variables just provide our best guess
• The expected value
γ00
(Bryk & Raudenbush, 1992; Quene & van den Bergh, 2004, 2008)
γ10x1i(j) γ20x2i(j)
E(Yi(j))
Introduction to Fixed Effects
=
Minutes
taken to
assemble
phone
Newcomers
+ +
Years of
Experience
Baseline
• To represent the actual observation, we
need to add an error term
• Discrepancy between expected & actual value
γ00
γ10x1i(j) γ20x2i(j)
yi(j)
+ Error
Introduction to Fixed Effects
=
Minutes
taken to
assemble
phone
Newcomers
+ +
Years of
Experience
Baseline
• To represent the actual observation, we
need to add an error term
• Discrepancy between expected & actual value
γ00
γ10x1i(j) γ20x2i(j)
yi(j)
+ ei(j)
Error
Introduction to Fixed Effects
• What if we aren’t interested in predicting
specific values?
• e.g., We want to know whether a variable matters or
the size of its effect
• But: We learn this from asking whether
and how an independent variable predicts
the dependent variable
• If number of newcomers significantly predicts what
the completion time will be, there’s a relation
Week 3.1: Fixed Effects
! Sample Dataset & Research Questions
! Theoretical Model
! lme4 in R
! Parameter Interpretation
! Slopes
! Intercept
! Hypothesis Testing
! t-test
! Confidence Interval
! More About Model Fitting
Running the Model in R
L
M
E
R
inear
ixed
ffects
egression
Running the Model in R
• Time to fit our first model!
• model1 <-
lmer(
MinutesTaken ~
1 +
Newcomers + YearsExperience
+ (1|CompanyID)
, data=problemsolving)
• Here it is as a single line:
• model1 <- lmer(MinutesTaken ~ 1 + Newcomers
+ YearsExperience + (1|CompanyID),
data=problemsolving)
Name of our model, like naming a dataframe
Linear mixed effects regression (function name)
Dependent measure comes before the ~
Intercept (we’ll discuss this more very soon)
Variables of interest (fixed
effects)
Random effect variable
Name of the dataframe where
your data is
Running the Model in R
• Time to fit our first model!
• model1 <-
lmer(
MinutesTaken ~
1 +
Newcomers + YearsExperience
+ (1|CompanyID)
, data=problemsolving)
• Quick note: This version of the model makes assumptions
about the random effects that might or might not be true.
We’ll deal with this in the next two weeks when we discuss
random effects.
Name of our model, like naming a dataframe
Linear mixed effects regression (function name)
Dependent measure comes before the ~
Intercept (we’ll discuss this more very soon)
Variables of interest (fixed
effects)
Random effect variable
Name of the dataframe where
your data is
Running the Model in R
• Where are my results?
• Just like with a dataframe, we’ve saved
them in something we can view later
• To view the model results:
• model1 %>% summary()
• Or whatever your model name is
• Saving the model makes it easy to compare
models later or to view your results again
Sample Model Results
Formula: Variables
you included
Data: Dataframe you
ran this model on
Check that these two
matched what you wanted!
Relevant to model fitting.
Will discuss soon.
Random effects = next week!
Number of observations,
# of clustering groups
Results for fixed effects of
interest
Correlations between effects
• Probably don’t need to
worry about this unless
correlations are very high
(Friedman & Wall, 2005;
Wurm & Fisicaro, 2014)
Week 3.1: Fixed Effects
! Sample Dataset & Research Questions
! Theoretical Model
! lme4 in R
! Parameter Interpretation
! Slopes
! Intercept
! Hypothesis Testing
! t-test
! Confidence Interval
! More About Model Fitting
Parameter Estimates
• Estimates are the γ values from the model
notation
• In our sample:
• Each additional newcomer ≈ another 2.2 minutes of
solving time
• Each additional year of experience ≈ 0.10 decrease in
solving time
• Each of these effects is while holding the others constant
• Core feature of multiple regression!
• Don’t need to do residualization for this
(Wurm & Fisicaro, 2014)
Week 3.1: Fixed Effects
! Sample Dataset & Research Questions
! Theoretical Model
! lme4 in R
! Parameter Interpretation
! Slopes
! Intercept
! Hypothesis Testing
! t-test
! Confidence Interval
! More About Model Fitting
Parameter Estimates
• What about the intercept?
• Let’s go back to our theoretical model
=
Minutes Newcomers
+ +
Years of
Experience
Baseline
γ00
γ10 *x1i(j) γ20 * x2i(j)
E(Yi(j))
Parameter Estimates
• What about the intercept?
• Let’s go back to our theoretical model
=
Minutes Newcomers
+ +
Years of
Experience
Baseline
γ00
2.16 *x1i(j) -0.09 * x2i(j)
E(Yi(j))
Parameter Estimates
• What about the intercept?
• Let’s go back to our theoretical model
• What if a team had 0 newcomers (x1i(j) = 0), and 0
years of prior experience (x2i(j) = 0)?
=
Minutes Newcomers
+ +
Years of
Experience
Baseline
γ00
2.16 * 0 -0.09 * 0
E(Yi(j))
Parameter Estimates
• What about the intercept?
• Let’s go back to our theoretical model
• What if a team had 0 newcomers (x1i(j) = 0), and 0
years of prior experience (x2i(j) = 0)?
• Even in this case, we wouldn’t expect the team to
solve the problem in 0 minutes (that’s ridiculous!)
=
Minutes Newcomers
+ +
Years of
Experience
Baseline
γ00
0 0
E(Yi(j))
Parameter Estimates
• What about the intercept?
• Intercept is what we expect when all other predictor
variables are equal to 0
• Here, a team with 0 newcomers but 0 years prior
experience would be expected to solve the problem in
38.25 minutes
=
Minutes Newcomers
+ +
Years of
Experience
Intercept
38.25 0 0
E(Yi(j))
Parameter Estimates
• Equation for a
line (courtesy
middle school)
• y = mx + b
• m: Slope. How
steep is the
line?
• How
strongly
does IV
affect DV?
Slope = 2.16
For every
newcomer, average
solve time increases
by 2.16 min.
Parameter Estimates
• Equation for a
line (courtesy
middle school)
• y = mx + b
• m: Slope. How
steep is the
line?
• b: Intercept.
Where does it
cross y-axis?
• What DV is
expected
when IV is
0?
38.25
Parameter Estimates
• Default is to include the intercept in the model,
and that’s appropriate
• model1 <- lmer(MinutesTaken ~ 1 + Newcomers +
YearsExperience + (1|CompanyID),
data=problemsolving)
• If we eliminated the intercept, we would be
assuming that the DV is exactly 0 when all
predictors are 0
• That would be a more constrained model—makes more
assumptions about the data
• We allowed our model to freely estimate the intercept, and we
came up with 38.25
Week 3.1: Fixed Effects
! Sample Dataset & Research Questions
! Theoretical Model
! lme4 in R
! Parameter Interpretation
! Slopes
! Intercept
! Hypothesis Testing
! t-test
! Confidence Interval
! More About Model Fitting
Parameter Estimates
WHERE THE
@#$^@$ ARE
MY P-VALUES!?
Hypothesis Testing—t test
• Reminder of why we do inferential statistics
• We know there’s some relationship between
newcomers & problem-solving time in our
sample
Hypothesis Testing—t test
• Reminder of why we do inferential statistics
• We know there’s some relationship between
newcomers & problem-solving time in our
sample
• But:
• Would this hold true for all people (the
population) doing group problem-solving?
• Or is this sampling error? (i.e., random chance)
Hypothesis Testing—t test
• Newcomr effect in our sample estimated to be
2.16 min. … is this good evidence of an effect
in the population?
• Would want to compare relative to a measure
of sampling error
t =
Estimate
Std. error =
2.1642
0.2690
Hypothesis Testing—t test
• We don’t have p-values (yet), but do we
have a t statistic
• Effect divided by its standard error (as with any t
statistic)
• A t test comparing this γ estimate to 0
• 0 is the γ expected under the null hypothesis that
this variable has no effect
Point—Counterpoint
Great! A t value. This will be really helpful for
my inferential statistics.
But you also need the degrees of freedom!
And degrees of freedom are not exactly
defined for mixed effects models. GOT YOU!
But, we can estimate the degrees of freedom.
Curses! Foiled again!
Hypothesis Testing—lmerTest
• Another add-on
package, lmerTest,
that estimates the d.f.
for the t-test
• Similar to correction for
unequal variance
Kuznetsova, Brockhoff, & Christensen, 2017
Hypothesis Testing—lmerTest
• Once we have lmerTest installed,
need to load it … remember how?
• library(lmerTest)
• With lmerTest loaded, re-run the
lmer() model, then get its summary
• Will have p-values
• In the future, no need to run model twice.
Can load lmerTest from the beginning
• This was just for demonstration purposes
Hypothesis Testing—lmerTest
ESTIMATED degrees of freedom – note that
it’s possible to have non-integer numbers
because it’s an estimate
p-value
• What does 1.84e-12 mean?
• Scientific notation shows up if a number is very
large or very small
• 1.84e-12 = 1.84 x 10-12 = .00000000000184
• This p-value is very small! Significant effect of
number of newcomers on problem solving time
Hypothesis Testing—lmerTest
ESTIMATED degrees of freedom – note that
it’s possible to have non-integer numbers
because it’s an estimate
p-value
• What does 1.84e-12 mean?
• Scientific notation shows up if a number is very
large or very small
• 1.84e-12 = 1.84 x 10-12 = .00000000000184
• e-12: Move the decimal 12 places to the left
• Can copy & paste the scientific notation into the R
command line to get the regular number
Hypothesis Testing—lmerTest
ESTIMATED degrees of freedom – note that
it’s possible to have non-integer numbers
because it’s an estimate
p-value
• What about the other variables?
• Years of experience: Not significant
• A numerical relation, but not significant effect it
generalizes to the broader population
• Intercept significantly differs from 0
• Even if 0 newcomers and 0 years of experience, still
takes time to solve the problem (duh!)
Week 3.1: Fixed Effects
! Sample Dataset & Research Questions
! Theoretical Model
! lme4 in R
! Parameter Interpretation
! Slopes
! Intercept
! Hypothesis Testing
! t-test
! Confidence Interval
! More About Model Fitting
Confidence Intervals
• 95% confidence intervals are:
• Estimate (1.96 * std. error)
• Try calculating the confidence interval for the
newcomer effect
• This is slightly anticonservative
• In other words, with small samples, CI will be too
small (elevated risk of Type I error)
• But OK with even moderately large samples
Confidence Intervals
• http://www.scottfraundorf.com/statistics.html
• Another add-on package: psycholing
• Includes summaryCI() function that does this
for all fixed effects
Week 3.1: Fixed Effects
! Sample Dataset & Research Questions
! Theoretical Model
! lme4 in R
! Parameter Interpretation
! Slopes
! Intercept
! Hypothesis Testing
! t-test
! Confidence Interval
! More About Model Fitting
More on Model Fitting
• We specified the formula
• How does R know what the right γ
values are for this model?
More on Model Fitting
• Solve for x:
• 2(x + 7) = 18
2(x + 7) = 18
• Two ways you might solve this:
• Use algebra
• 2(x+7) = 18
• x+7 = 9
• x = 2
• Guaranteed to give you the right answer
• Guess and check:
• x = 10? -> 34 = 18 Way off!
• x = 1? -> 9 = 18 Closer!
• x = 2? -> 18 = 18 Got it!
• Might have to check a few numbers
ANALYTIC
SOLUTION
NON-
ANALYTIC
SOLUTION
More on Model Fitting
• Two ways you might solve this:
• t-test: Simple formula you can solve with algebra
• Mixed effects models: Need to search for the best
estimates
ANALYTIC
SOLUTION
NON-
ANALYTIC
SOLUTION
More on Model Fitting
• What, specifically, are we searching for?
• Probability: Chance of an outcome given model
• Given a fair coin, probability of heads is 50%
• Likelihood: Chance of a model given data
• Given 52 heads out of 100, is this likely to be a fair coin?
• Looking for the parameter estimates that result in
a model with the highest likelihood
• Maximum likelihood estimation
More on Model Fitting
• Not guessing randomly. Looks
for better & better parameters
until it converges on the
solution
• Like playing “warmer”/“colder”
Model Fitting—Implications
• More complex models take more time to fit
• model1 <- lmer(MinutesTaken ~ 1 +
Newcomers + YearsExperience +
(1|CompanyID), data=problemsolving,
verbose=2)
• verbose=2 shows R’s steps in the search
• Probably don’t need this; just shows you how it works
• Possible for model to fail to converge on a
set of parameters
• Issue comes up more when you have more
complex models (namely, lots of random effects)
• We’ll talk more in a few weeks about when this
might happen & what to do about it

Más contenido relacionado

La actualidad más candente

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 - Autocorrelation
Mixed Effects Models - AutocorrelationMixed Effects Models - Autocorrelation
Mixed Effects Models - AutocorrelationScott 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
 
Binary OR Binomial logistic regression
Binary OR Binomial logistic regression Binary OR Binomial logistic regression
Binary OR Binomial logistic regression Dr Athar Khan
 
Multinomial logisticregression basicrelationships
Multinomial logisticregression basicrelationshipsMultinomial logisticregression basicrelationships
Multinomial logisticregression basicrelationshipsAnirudha si
 
Multiple Regression.ppt
Multiple Regression.pptMultiple Regression.ppt
Multiple Regression.pptTanyaWadhwani4
 
Chi-square, Yates, Fisher & McNemar
Chi-square, Yates, Fisher & McNemarChi-square, Yates, Fisher & McNemar
Chi-square, Yates, Fisher & McNemarAzmi Mohd Tamil
 
Survival Data Analysis for Sekolah Tinggi Ilmu Statistik Jakarta
Survival Data Analysis for Sekolah Tinggi Ilmu Statistik JakartaSurvival Data Analysis for Sekolah Tinggi Ilmu Statistik Jakarta
Survival Data Analysis for Sekolah Tinggi Ilmu Statistik JakartaSetia Pramana
 
Covariance and correlation(Dereje JIMA)
Covariance and correlation(Dereje JIMA)Covariance and correlation(Dereje JIMA)
Covariance and correlation(Dereje JIMA)Dereje Jima
 
Confidence Intervals: Basic concepts and overview
Confidence Intervals: Basic concepts and overviewConfidence Intervals: Basic concepts and overview
Confidence Intervals: Basic concepts and overviewRizwan S A
 
Multinomial Logistic Regression Analysis
Multinomial Logistic Regression AnalysisMultinomial Logistic Regression Analysis
Multinomial Logistic Regression AnalysisHARISH Kumar H R
 
Introduction of mixed effect model
Introduction of mixed effect modelIntroduction of mixed effect model
Introduction of mixed effect modelVivian S. Zhang
 
Logistic regression
Logistic regressionLogistic regression
Logistic regressionsaba khan
 
R square vs adjusted r square
R square vs adjusted r squareR square vs adjusted r square
R square vs adjusted r squareAkhilesh Joshi
 
Hypothesis testing ppt final
Hypothesis testing ppt finalHypothesis testing ppt final
Hypothesis testing ppt finalpiyushdhaker
 
Heteroscedasticity
HeteroscedasticityHeteroscedasticity
HeteroscedasticityMuhammad Ali
 
Regression analysis
Regression analysisRegression analysis
Regression analysisRavi shankar
 

La actualidad más candente (20)

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 - Autocorrelation
Mixed Effects Models - AutocorrelationMixed Effects Models - Autocorrelation
Mixed Effects Models - Autocorrelation
 
Mixed Effects Models - Post-Hoc Comparisons
Mixed Effects Models - Post-Hoc ComparisonsMixed Effects Models - Post-Hoc Comparisons
Mixed Effects Models - Post-Hoc Comparisons
 
Binary OR Binomial logistic regression
Binary OR Binomial logistic regression Binary OR Binomial logistic regression
Binary OR Binomial logistic regression
 
Multinomial logisticregression basicrelationships
Multinomial logisticregression basicrelationshipsMultinomial logisticregression basicrelationships
Multinomial logisticregression basicrelationships
 
Multiple Regression.ppt
Multiple Regression.pptMultiple Regression.ppt
Multiple Regression.ppt
 
Chi-square, Yates, Fisher & McNemar
Chi-square, Yates, Fisher & McNemarChi-square, Yates, Fisher & McNemar
Chi-square, Yates, Fisher & McNemar
 
Simple linear regression
Simple linear regressionSimple linear regression
Simple linear regression
 
Survival Data Analysis for Sekolah Tinggi Ilmu Statistik Jakarta
Survival Data Analysis for Sekolah Tinggi Ilmu Statistik JakartaSurvival Data Analysis for Sekolah Tinggi Ilmu Statistik Jakarta
Survival Data Analysis for Sekolah Tinggi Ilmu Statistik Jakarta
 
Covariance and correlation(Dereje JIMA)
Covariance and correlation(Dereje JIMA)Covariance and correlation(Dereje JIMA)
Covariance and correlation(Dereje JIMA)
 
Confidence Intervals: Basic concepts and overview
Confidence Intervals: Basic concepts and overviewConfidence Intervals: Basic concepts and overview
Confidence Intervals: Basic concepts and overview
 
Multinomial Logistic Regression Analysis
Multinomial Logistic Regression AnalysisMultinomial Logistic Regression Analysis
Multinomial Logistic Regression Analysis
 
Introduction of mixed effect model
Introduction of mixed effect modelIntroduction of mixed effect model
Introduction of mixed effect model
 
Logistic regression
Logistic regressionLogistic regression
Logistic regression
 
R square vs adjusted r square
R square vs adjusted r squareR square vs adjusted r square
R square vs adjusted r square
 
Discrete Probability Distributions.
Discrete Probability Distributions.Discrete Probability Distributions.
Discrete Probability Distributions.
 
Hypothesis testing ppt final
Hypothesis testing ppt finalHypothesis testing ppt final
Hypothesis testing ppt final
 
Heteroscedasticity
HeteroscedasticityHeteroscedasticity
Heteroscedasticity
 
Regression analysis
Regression analysisRegression analysis
Regression analysis
 
Testing Hypothesis
Testing HypothesisTesting Hypothesis
Testing Hypothesis
 

Similar a Mixed Effects Models - Fixed Effects

Mixed Effects Models - Fixed Effect Interactions
Mixed Effects Models - Fixed Effect InteractionsMixed Effects Models - Fixed Effect Interactions
Mixed Effects Models - Fixed Effect InteractionsScott Fraundorf
 
Dowhy: An end-to-end library for causal inference
Dowhy: An end-to-end library for causal inferenceDowhy: An end-to-end library for causal inference
Dowhy: An end-to-end library for causal inferenceAmit Sharma
 
Selection and Scheduling Problem in Continuous Time with Pairwise-interdepend...
Selection and Scheduling Problem in Continuous Time with Pairwise-interdepend...Selection and Scheduling Problem in Continuous Time with Pairwise-interdepend...
Selection and Scheduling Problem in Continuous Time with Pairwise-interdepend...Beniamino Murgante
 
Mixed Effects Models - Random Intercepts
Mixed Effects Models - Random InterceptsMixed Effects Models - Random Intercepts
Mixed Effects Models - Random InterceptsScott Fraundorf
 
TIE: A Framework for Embedding-based Incremental Temporal Knowledge Graph Com...
TIE: A Framework for Embedding-based Incremental Temporal Knowledge Graph Com...TIE: A Framework for Embedding-based Incremental Temporal Knowledge Graph Com...
TIE: A Framework for Embedding-based Incremental Temporal Knowledge Graph Com...Jiapeng Wu
 
Software Arch TDD ppt.pdf
Software Arch TDD ppt.pdfSoftware Arch TDD ppt.pdf
Software Arch TDD ppt.pdfTed M. Young
 
Experimental design
Experimental designExperimental design
Experimental designmetalkid132
 
'A critique of testing' UK TMF forum January 2015
'A critique of testing' UK TMF forum January 2015 'A critique of testing' UK TMF forum January 2015
'A critique of testing' UK TMF forum January 2015 Georgina Tilby
 
Principles of design of experiments (doe)20 5-2014
Principles of  design of experiments (doe)20 5-2014Principles of  design of experiments (doe)20 5-2014
Principles of design of experiments (doe)20 5-2014Awad Albalwi
 
How much time it takes for my feature to arrive?
How much time it takes for my feature to arrive?How much time it takes for my feature to arrive?
How much time it takes for my feature to arrive?Daniel Alencar
 
Icsme14danieletal 150722141344-lva1-app6891
Icsme14danieletal 150722141344-lva1-app6891Icsme14danieletal 150722141344-lva1-app6891
Icsme14danieletal 150722141344-lva1-app6891SAIL_QU
 
Forecasting Intraday Arrivals at a Call Centre using Neural Networks: Forecas...
Forecasting Intraday Arrivals at a Call Centre using Neural Networks: Forecas...Forecasting Intraday Arrivals at a Call Centre using Neural Networks: Forecas...
Forecasting Intraday Arrivals at a Call Centre using Neural Networks: Forecas...Devon K. Barrow
 
Teaching Constraint Programming, Patrick Prosser
Teaching Constraint Programming,  Patrick ProsserTeaching Constraint Programming,  Patrick Prosser
Teaching Constraint Programming, Patrick ProsserPierre Schaus
 
Operation research history and overview application limitation
Operation research history and overview application limitationOperation research history and overview application limitation
Operation research history and overview application limitationBalaji P
 
Replicable Evaluation of Recommender Systems
Replicable Evaluation of Recommender SystemsReplicable Evaluation of Recommender Systems
Replicable Evaluation of Recommender SystemsAlejandro Bellogin
 
Outpost24 webinar - The economics of penetration testing in the new threat la...
Outpost24 webinar - The economics of penetration testing in the new threat la...Outpost24 webinar - The economics of penetration testing in the new threat la...
Outpost24 webinar - The economics of penetration testing in the new threat la...Outpost24
 
FE3.ppt
FE3.pptFE3.ppt
FE3.pptasde13
 
Weapons of Math Instruction: Evolving from Data0-Driven to Science-Driven
Weapons of Math Instruction: Evolving from Data0-Driven to Science-DrivenWeapons of Math Instruction: Evolving from Data0-Driven to Science-Driven
Weapons of Math Instruction: Evolving from Data0-Driven to Science-Drivenindeedeng
 

Similar a Mixed Effects Models - Fixed Effects (20)

Mixed Effects Models - Fixed Effect Interactions
Mixed Effects Models - Fixed Effect InteractionsMixed Effects Models - Fixed Effect Interactions
Mixed Effects Models - Fixed Effect Interactions
 
Dowhy: An end-to-end library for causal inference
Dowhy: An end-to-end library for causal inferenceDowhy: An end-to-end library for causal inference
Dowhy: An end-to-end library for causal inference
 
Selection and Scheduling Problem in Continuous Time with Pairwise-interdepend...
Selection and Scheduling Problem in Continuous Time with Pairwise-interdepend...Selection and Scheduling Problem in Continuous Time with Pairwise-interdepend...
Selection and Scheduling Problem in Continuous Time with Pairwise-interdepend...
 
Mixed Effects Models - Random Intercepts
Mixed Effects Models - Random InterceptsMixed Effects Models - Random Intercepts
Mixed Effects Models - Random Intercepts
 
TIE: A Framework for Embedding-based Incremental Temporal Knowledge Graph Com...
TIE: A Framework for Embedding-based Incremental Temporal Knowledge Graph Com...TIE: A Framework for Embedding-based Incremental Temporal Knowledge Graph Com...
TIE: A Framework for Embedding-based Incremental Temporal Knowledge Graph Com...
 
Software Arch TDD ppt.pdf
Software Arch TDD ppt.pdfSoftware Arch TDD ppt.pdf
Software Arch TDD ppt.pdf
 
Experimental design
Experimental designExperimental design
Experimental design
 
'A critique of testing' UK TMF forum January 2015
'A critique of testing' UK TMF forum January 2015 'A critique of testing' UK TMF forum January 2015
'A critique of testing' UK TMF forum January 2015
 
Principles of design of experiments (doe)20 5-2014
Principles of  design of experiments (doe)20 5-2014Principles of  design of experiments (doe)20 5-2014
Principles of design of experiments (doe)20 5-2014
 
How much time it takes for my feature to arrive?
How much time it takes for my feature to arrive?How much time it takes for my feature to arrive?
How much time it takes for my feature to arrive?
 
Icsme14danieletal 150722141344-lva1-app6891
Icsme14danieletal 150722141344-lva1-app6891Icsme14danieletal 150722141344-lva1-app6891
Icsme14danieletal 150722141344-lva1-app6891
 
Test for AI model
Test for AI modelTest for AI model
Test for AI model
 
Forecasting Intraday Arrivals at a Call Centre using Neural Networks: Forecas...
Forecasting Intraday Arrivals at a Call Centre using Neural Networks: Forecas...Forecasting Intraday Arrivals at a Call Centre using Neural Networks: Forecas...
Forecasting Intraday Arrivals at a Call Centre using Neural Networks: Forecas...
 
Housing price prediction
Housing price predictionHousing price prediction
Housing price prediction
 
Teaching Constraint Programming, Patrick Prosser
Teaching Constraint Programming,  Patrick ProsserTeaching Constraint Programming,  Patrick Prosser
Teaching Constraint Programming, Patrick Prosser
 
Operation research history and overview application limitation
Operation research history and overview application limitationOperation research history and overview application limitation
Operation research history and overview application limitation
 
Replicable Evaluation of Recommender Systems
Replicable Evaluation of Recommender SystemsReplicable Evaluation of Recommender Systems
Replicable Evaluation of Recommender Systems
 
Outpost24 webinar - The economics of penetration testing in the new threat la...
Outpost24 webinar - The economics of penetration testing in the new threat la...Outpost24 webinar - The economics of penetration testing in the new threat la...
Outpost24 webinar - The economics of penetration testing in the new threat la...
 
FE3.ppt
FE3.pptFE3.ppt
FE3.ppt
 
Weapons of Math Instruction: Evolving from Data0-Driven to Science-Driven
Weapons of Math Instruction: Evolving from Data0-Driven to Science-DrivenWeapons of Math Instruction: Evolving from Data0-Driven to Science-Driven
Weapons of Math Instruction: Evolving from Data0-Driven to Science-Driven
 

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 - Missing Data
Mixed Effects Models - Missing DataMixed Effects Models - Missing Data
Mixed Effects Models - Missing DataScott Fraundorf
 
Mixed Effects Models - Empirical Logit
Mixed Effects Models - Empirical LogitMixed Effects Models - Empirical Logit
Mixed Effects Models - Empirical LogitScott Fraundorf
 
Mixed Effects Models - Logit Models
Mixed Effects Models - Logit ModelsMixed Effects Models - Logit Models
Mixed Effects Models - Logit ModelsScott Fraundorf
 
Mixed Effects Models - Level-2 Variables
Mixed Effects Models - Level-2 VariablesMixed Effects Models - Level-2 Variables
Mixed Effects Models - Level-2 VariablesScott Fraundorf
 
Mixed Effects Models - Descriptive Statistics
Mixed Effects Models - Descriptive StatisticsMixed Effects Models - Descriptive Statistics
Mixed Effects Models - Descriptive StatisticsScott Fraundorf
 

Más de Scott Fraundorf (9)

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 - Missing Data
Mixed Effects Models - Missing DataMixed Effects Models - Missing Data
Mixed Effects Models - Missing Data
 
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 - Level-2 Variables
Mixed Effects Models - Level-2 VariablesMixed Effects Models - Level-2 Variables
Mixed Effects Models - Level-2 Variables
 
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
 

Último

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
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
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
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
 
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
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdfssuserdda66b
 
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
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
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
 
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
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
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
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
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
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 

Último (20)

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
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
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.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...
 
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
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
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
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
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
 
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...
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
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
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
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
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 

Mixed Effects Models - Fixed Effects

  • 1. Mixed Effects Models! • Next 3 weeks: Basics of a mixed effects analysis with continuous/numerical variables • This week: Fixed effects (effects of interest) • Next 2 weeks: Random effects (e.g., subjects, classrooms, items, firms, dyads/couples) • After that: categorical variables • As predictors • As outcomes
  • 2. Week 3.1: Fixed Effects ! Sample Dataset & Research Questions ! Theoretical Model ! lme4 in R ! Parameter Interpretation ! Slopes ! Intercept ! Hypothesis Testing ! t-test ! Confidence Interval ! More About Model Fitting
  • 3. Introduction to Fixed Effects • Canvas: Modules " Week 3.1 • Team problem-solving task in organizations • Assemble a landline phone • 10 teams at each of 11 companies (total 110) • Dependent measure: Minutes taken to complete the task • Predictor variables: • Number of newcomers on the team • Average years of experience Lewis, Belliveau, Herndon, & Keller (2007)
  • 4. Introduction to Fixed Effects • Canvas: Modules " Week 3.1 • Team problem-solving task in organizations • Assemble a landline phone • 10 teams at each of 11 companies (total 110)
  • 5. Week 3.1: Fixed Effects ! Sample Dataset & Research Questions ! Theoretical Model ! lme4 in R ! Parameter Interpretation ! Slopes ! Intercept ! Hypothesis Testing ! t-test ! Confidence Interval ! More About Model Fitting
  • 6. Introduction to Fixed Effects = Minutes taken to assemble phone Newcomers + + Years of Experience + Company Baseline • Predicting one variable as a function of others
  • 7. Introduction to Fixed Effects = Minutes taken to assemble phone Newcomers + + Years of Experience + Company Baseline • Predicting one variable as a function of others NEXT WEEK!
  • 8. Introduction to Fixed Effects = Minutes taken to assemble phone Newcomers + + Years of Experience Baseline • Predicting one variable as a function of others Fixed effects that we’re trying to model
  • 9. Introduction to Fixed Effects = Minutes taken to assemble phone Newcomers + + Years of Experience Baseline • Predicting one variable as a function of others γ00 (Bryk & Raudenbush, 1992; Quene & van den Bergh, 2004, 2008) THEORY AND DEFINITION:
  • 10. Introduction to Fixed Effects = Minutes taken to assemble phone Newcomers + + Years of Experience Baseline • Predicting one variable as a function of others γ00 (Bryk & Raudenbush, 1992; Quene & van den Bergh, 2004, 2008) x1i(j) x2i(j) THEORY AND DEFINITION:
  • 11. Introduction to Fixed Effects • Predicting one variable as a function of others • Relationship of number of newcomers to completion time in minutes is probably not 1:1 (Bryk & Raudenbush, 1992; Quene & van den Bergh, 2004, 2008) Regression line relating number of newcomers to completion time
  • 12. Introduction to Fixed Effects = Minutes taken to assemble phone Newcomers + + Years of Experience Baseline • Predicting one variable as a function of others • γ20 = slope of line relating newcomers to time taken • One of the fixed effects we want to find this out • How do newcomers affect completion time in this task? γ00 (Bryk & Raudenbush, 1992; Quene & van den Bergh, 2004, 2008) γ10x1i(j) γ20x2i(j)
  • 13. Introduction to Fixed Effects = Minutes taken to assemble phone Newcomers + + Years of Experience Baseline • Can we determine the exact completion time based on team composition? γ00 (Bryk & Raudenbush, 1992; Quene & van den Bergh, 2004, 2008) γ10x1i(j) γ20x2i(j)
  • 14. Introduction to Fixed Effects • Can we determine the exact completion time based on team composition? • Probably not. (Bryk & Raudenbush, 1992; Quene & van den Bergh, 2004, 2008)
  • 15. Introduction to Fixed Effects = Minutes taken to assemble phone Newcomers + + Years of Experience Baseline • Can we determine the exact completion time based on team composition? • Probably not. • These variables just provide our best guess • The expected value γ00 (Bryk & Raudenbush, 1992; Quene & van den Bergh, 2004, 2008) γ10x1i(j) γ20x2i(j) E(Yi(j))
  • 16. Introduction to Fixed Effects = Minutes taken to assemble phone Newcomers + + Years of Experience Baseline • To represent the actual observation, we need to add an error term • Discrepancy between expected & actual value γ00 γ10x1i(j) γ20x2i(j) yi(j) + Error
  • 17. Introduction to Fixed Effects = Minutes taken to assemble phone Newcomers + + Years of Experience Baseline • To represent the actual observation, we need to add an error term • Discrepancy between expected & actual value γ00 γ10x1i(j) γ20x2i(j) yi(j) + ei(j) Error
  • 18. Introduction to Fixed Effects • What if we aren’t interested in predicting specific values? • e.g., We want to know whether a variable matters or the size of its effect • But: We learn this from asking whether and how an independent variable predicts the dependent variable • If number of newcomers significantly predicts what the completion time will be, there’s a relation
  • 19. Week 3.1: Fixed Effects ! Sample Dataset & Research Questions ! Theoretical Model ! lme4 in R ! Parameter Interpretation ! Slopes ! Intercept ! Hypothesis Testing ! t-test ! Confidence Interval ! More About Model Fitting
  • 20. Running the Model in R L M E R inear ixed ffects egression
  • 21. Running the Model in R • Time to fit our first model! • model1 <- lmer( MinutesTaken ~ 1 + Newcomers + YearsExperience + (1|CompanyID) , data=problemsolving) • Here it is as a single line: • model1 <- lmer(MinutesTaken ~ 1 + Newcomers + YearsExperience + (1|CompanyID), data=problemsolving) Name of our model, like naming a dataframe Linear mixed effects regression (function name) Dependent measure comes before the ~ Intercept (we’ll discuss this more very soon) Variables of interest (fixed effects) Random effect variable Name of the dataframe where your data is
  • 22. Running the Model in R • Time to fit our first model! • model1 <- lmer( MinutesTaken ~ 1 + Newcomers + YearsExperience + (1|CompanyID) , data=problemsolving) • Quick note: This version of the model makes assumptions about the random effects that might or might not be true. We’ll deal with this in the next two weeks when we discuss random effects. Name of our model, like naming a dataframe Linear mixed effects regression (function name) Dependent measure comes before the ~ Intercept (we’ll discuss this more very soon) Variables of interest (fixed effects) Random effect variable Name of the dataframe where your data is
  • 23. Running the Model in R • Where are my results? • Just like with a dataframe, we’ve saved them in something we can view later • To view the model results: • model1 %>% summary() • Or whatever your model name is • Saving the model makes it easy to compare models later or to view your results again
  • 24. Sample Model Results Formula: Variables you included Data: Dataframe you ran this model on Check that these two matched what you wanted! Relevant to model fitting. Will discuss soon. Random effects = next week! Number of observations, # of clustering groups Results for fixed effects of interest Correlations between effects • Probably don’t need to worry about this unless correlations are very high (Friedman & Wall, 2005; Wurm & Fisicaro, 2014)
  • 25. Week 3.1: Fixed Effects ! Sample Dataset & Research Questions ! Theoretical Model ! lme4 in R ! Parameter Interpretation ! Slopes ! Intercept ! Hypothesis Testing ! t-test ! Confidence Interval ! More About Model Fitting
  • 26. Parameter Estimates • Estimates are the γ values from the model notation • In our sample: • Each additional newcomer ≈ another 2.2 minutes of solving time • Each additional year of experience ≈ 0.10 decrease in solving time • Each of these effects is while holding the others constant • Core feature of multiple regression! • Don’t need to do residualization for this (Wurm & Fisicaro, 2014)
  • 27. Week 3.1: Fixed Effects ! Sample Dataset & Research Questions ! Theoretical Model ! lme4 in R ! Parameter Interpretation ! Slopes ! Intercept ! Hypothesis Testing ! t-test ! Confidence Interval ! More About Model Fitting
  • 28. Parameter Estimates • What about the intercept? • Let’s go back to our theoretical model = Minutes Newcomers + + Years of Experience Baseline γ00 γ10 *x1i(j) γ20 * x2i(j) E(Yi(j))
  • 29. Parameter Estimates • What about the intercept? • Let’s go back to our theoretical model = Minutes Newcomers + + Years of Experience Baseline γ00 2.16 *x1i(j) -0.09 * x2i(j) E(Yi(j))
  • 30. Parameter Estimates • What about the intercept? • Let’s go back to our theoretical model • What if a team had 0 newcomers (x1i(j) = 0), and 0 years of prior experience (x2i(j) = 0)? = Minutes Newcomers + + Years of Experience Baseline γ00 2.16 * 0 -0.09 * 0 E(Yi(j))
  • 31. Parameter Estimates • What about the intercept? • Let’s go back to our theoretical model • What if a team had 0 newcomers (x1i(j) = 0), and 0 years of prior experience (x2i(j) = 0)? • Even in this case, we wouldn’t expect the team to solve the problem in 0 minutes (that’s ridiculous!) = Minutes Newcomers + + Years of Experience Baseline γ00 0 0 E(Yi(j))
  • 32. Parameter Estimates • What about the intercept? • Intercept is what we expect when all other predictor variables are equal to 0 • Here, a team with 0 newcomers but 0 years prior experience would be expected to solve the problem in 38.25 minutes = Minutes Newcomers + + Years of Experience Intercept 38.25 0 0 E(Yi(j))
  • 33. Parameter Estimates • Equation for a line (courtesy middle school) • y = mx + b • m: Slope. How steep is the line? • How strongly does IV affect DV? Slope = 2.16 For every newcomer, average solve time increases by 2.16 min.
  • 34. Parameter Estimates • Equation for a line (courtesy middle school) • y = mx + b • m: Slope. How steep is the line? • b: Intercept. Where does it cross y-axis? • What DV is expected when IV is 0? 38.25
  • 35. Parameter Estimates • Default is to include the intercept in the model, and that’s appropriate • model1 <- lmer(MinutesTaken ~ 1 + Newcomers + YearsExperience + (1|CompanyID), data=problemsolving) • If we eliminated the intercept, we would be assuming that the DV is exactly 0 when all predictors are 0 • That would be a more constrained model—makes more assumptions about the data • We allowed our model to freely estimate the intercept, and we came up with 38.25
  • 36. Week 3.1: Fixed Effects ! Sample Dataset & Research Questions ! Theoretical Model ! lme4 in R ! Parameter Interpretation ! Slopes ! Intercept ! Hypothesis Testing ! t-test ! Confidence Interval ! More About Model Fitting
  • 38. Hypothesis Testing—t test • Reminder of why we do inferential statistics • We know there’s some relationship between newcomers & problem-solving time in our sample
  • 39. Hypothesis Testing—t test • Reminder of why we do inferential statistics • We know there’s some relationship between newcomers & problem-solving time in our sample • But: • Would this hold true for all people (the population) doing group problem-solving? • Or is this sampling error? (i.e., random chance)
  • 40. Hypothesis Testing—t test • Newcomr effect in our sample estimated to be 2.16 min. … is this good evidence of an effect in the population? • Would want to compare relative to a measure of sampling error t = Estimate Std. error = 2.1642 0.2690
  • 41. Hypothesis Testing—t test • We don’t have p-values (yet), but do we have a t statistic • Effect divided by its standard error (as with any t statistic) • A t test comparing this γ estimate to 0 • 0 is the γ expected under the null hypothesis that this variable has no effect
  • 42. Point—Counterpoint Great! A t value. This will be really helpful for my inferential statistics. But you also need the degrees of freedom! And degrees of freedom are not exactly defined for mixed effects models. GOT YOU! But, we can estimate the degrees of freedom. Curses! Foiled again!
  • 43. Hypothesis Testing—lmerTest • Another add-on package, lmerTest, that estimates the d.f. for the t-test • Similar to correction for unequal variance Kuznetsova, Brockhoff, & Christensen, 2017
  • 44. Hypothesis Testing—lmerTest • Once we have lmerTest installed, need to load it … remember how? • library(lmerTest) • With lmerTest loaded, re-run the lmer() model, then get its summary • Will have p-values • In the future, no need to run model twice. Can load lmerTest from the beginning • This was just for demonstration purposes
  • 45. Hypothesis Testing—lmerTest ESTIMATED degrees of freedom – note that it’s possible to have non-integer numbers because it’s an estimate p-value • What does 1.84e-12 mean? • Scientific notation shows up if a number is very large or very small • 1.84e-12 = 1.84 x 10-12 = .00000000000184 • This p-value is very small! Significant effect of number of newcomers on problem solving time
  • 46. Hypothesis Testing—lmerTest ESTIMATED degrees of freedom – note that it’s possible to have non-integer numbers because it’s an estimate p-value • What does 1.84e-12 mean? • Scientific notation shows up if a number is very large or very small • 1.84e-12 = 1.84 x 10-12 = .00000000000184 • e-12: Move the decimal 12 places to the left • Can copy & paste the scientific notation into the R command line to get the regular number
  • 47. Hypothesis Testing—lmerTest ESTIMATED degrees of freedom – note that it’s possible to have non-integer numbers because it’s an estimate p-value • What about the other variables? • Years of experience: Not significant • A numerical relation, but not significant effect it generalizes to the broader population • Intercept significantly differs from 0 • Even if 0 newcomers and 0 years of experience, still takes time to solve the problem (duh!)
  • 48. Week 3.1: Fixed Effects ! Sample Dataset & Research Questions ! Theoretical Model ! lme4 in R ! Parameter Interpretation ! Slopes ! Intercept ! Hypothesis Testing ! t-test ! Confidence Interval ! More About Model Fitting
  • 49. Confidence Intervals • 95% confidence intervals are: • Estimate (1.96 * std. error) • Try calculating the confidence interval for the newcomer effect • This is slightly anticonservative • In other words, with small samples, CI will be too small (elevated risk of Type I error) • But OK with even moderately large samples
  • 50. Confidence Intervals • http://www.scottfraundorf.com/statistics.html • Another add-on package: psycholing • Includes summaryCI() function that does this for all fixed effects
  • 51. Week 3.1: Fixed Effects ! Sample Dataset & Research Questions ! Theoretical Model ! lme4 in R ! Parameter Interpretation ! Slopes ! Intercept ! Hypothesis Testing ! t-test ! Confidence Interval ! More About Model Fitting
  • 52. More on Model Fitting • We specified the formula • How does R know what the right γ values are for this model?
  • 53. More on Model Fitting • Solve for x: • 2(x + 7) = 18
  • 54. 2(x + 7) = 18 • Two ways you might solve this: • Use algebra • 2(x+7) = 18 • x+7 = 9 • x = 2 • Guaranteed to give you the right answer • Guess and check: • x = 10? -> 34 = 18 Way off! • x = 1? -> 9 = 18 Closer! • x = 2? -> 18 = 18 Got it! • Might have to check a few numbers ANALYTIC SOLUTION NON- ANALYTIC SOLUTION
  • 55. More on Model Fitting • Two ways you might solve this: • t-test: Simple formula you can solve with algebra • Mixed effects models: Need to search for the best estimates ANALYTIC SOLUTION NON- ANALYTIC SOLUTION
  • 56. More on Model Fitting • What, specifically, are we searching for? • Probability: Chance of an outcome given model • Given a fair coin, probability of heads is 50% • Likelihood: Chance of a model given data • Given 52 heads out of 100, is this likely to be a fair coin? • Looking for the parameter estimates that result in a model with the highest likelihood • Maximum likelihood estimation
  • 57. More on Model Fitting • Not guessing randomly. Looks for better & better parameters until it converges on the solution • Like playing “warmer”/“colder”
  • 58. Model Fitting—Implications • More complex models take more time to fit • model1 <- lmer(MinutesTaken ~ 1 + Newcomers + YearsExperience + (1|CompanyID), data=problemsolving, verbose=2) • verbose=2 shows R’s steps in the search • Probably don’t need this; just shows you how it works • Possible for model to fail to converge on a set of parameters • Issue comes up more when you have more complex models (namely, lots of random effects) • We’ll talk more in a few weeks about when this might happen & what to do about it