SlideShare una empresa de Scribd logo
1 de 29
Mediation in health research:
A statistics workshop using SPSS
Dr. Sean P. Mackinnon
Dalhousie University
Crossroads Interdisciplinary Health Conference, 2015
What kinds of questions does
mediation answer?
• Mediation asks about the process by which a
predictor variable affects an outcome
• “Does X predict M, which in turn predicts Y?”
• E.g., “Does exercise improve cardiovascular
health, which in turn increases longevity?”
Linear Regression
• Understanding mediation requires a basic
understanding of linear regression
• Displayed as a path diagram, it could look
something like this:
Impulsivity Binge Drinking
.30
The number depicted here is the slope (B value, or b1 above)
c-path
also called the “total effect”
iii XbbY  10
Mediation
• Mediation builds on this basic linear regression model by
adding a third variable (i.e., the “mediator”)
• In mediation, the third variable is thought to come in
between X & Y. So, X leads to the mediator, which in turn
leads to Y.
Impulsivity Binge Drinking
Enhancement
Motives
Mediation
• The idea is, the c-path (the direct effect) should get smaller
with the addition of a mediator.
• So, we want to know if the c-path – c’-path is “statistically
significant.”
Impulsivity Binge Drinking
Enhancement
Motives
c’-path
Also called the “direct effect”
Mediation
• To test this, you first need to get the slope of two other
relationships: a and b paths
Impulsivity Binge Drinking
Enhancement
Motives
c’-path
Get the slope of this
relationship
a-path
Get the slope of this
relationship while also
controlling for
enhancement motives
b-path
Mediation
• Mathematicians have shown that
– (a-path * b-path) = c-path – c’ path
– (But only when X and M are continuous)
• Thus, if a*b (“the indirect effect”) is statistically significant,
mediation has occurred
Impulsivity Binge Drinking
Enhancement
Motives
c’-path
a-path b-path
Preacher & Hayes (2008)
Significance of Indirect Effect
• Lots of ways to test the significance of a*b
– Test of Joint Significance
– Sobel Test
– Bootstrapped Confidence Intervals
• Of these methods, bootstrapping is currently the most preferred
• But … Hayes & Scharkow (2013) have shown that the different
methods agree > 90% of the time…
Joint Significance Test
(Baron & Kenny, 1986)
• If the a-path AND the b-path are both significant,
conclude that a*b is also significant.
• This is a liberal test (i.e., high Type I error) and is
usually used as a supplement to other methods.
Impulsivity Binge Drinking
Enhancement
Motives
.05
.25* .28*
c’ path
a-path b-path
Sobel Test (Sobel, 1982)
• An alternative is to estimate the indirect effect and its significance
using the Sobel test (Sobel. 1982).
• It is a conservative test (i.e., high Type II error)
• z-value = a*b/SQRT(b2*sa
2 + a2*sb
2)
– a = B value (slope) for a-path
– b = B value (slope) for b-path
– sa = SE for a-path
– sa = SE for b-path
• Online Calculator for Sobel Test:
– http://quantpsy.org/sobel/sobel.htm
– Also available in the PROCESS macro discussed later
Bootstrapping
• The sobel test is inaccurate because it relies on an
assumption of a normal sampling distrbution:
– However, the sampling distribution distribution of a*b is
non-normal except in very large samples…
• Bootstrapping is a computer intensive, robust analysis
technique that can be applied to non-normal data.
• Virtually any analysis can be bootstrapped, but we’re
going to apply it to testing the significance of the
indirect effect (a*b).
What is a “Re-Sample?”
In SPSS, Each row is a “person” who has an ID, and lots of values on measures
A “re-sample” randomly samples participants from the sample, with replacement
Re-sample 1
ID1
ID3
ID4
ID2
Re-sample 2
ID1
ID1
ID3
ID2
Re-sample 3
ID4
ID4
ID2
ID2
Note that people can be duplicated in the resamples using this method
What is bootstrapping?
The idea of the sampling distribution of the sample mean x-bar: take
very many samples, collect the x-values from each, and look at the
distribution of these values
From Hesterberg et al. (2003)
What is bootstrapping?
From Hesterberg et al. (2003)
The theory shortcut: if we know that the population values follow
a normal distribution, theory tells us that the sampling
distribution of x-bar is also normal.
This is known as the
central limit theorem
What is bootstrapping?
From Hesterberg et al. (2003)
The bootstrap idea: when theory fails and we can afford only one
sample, that sample stands in for the population, and
the distribution of x in many resamples stands in for the sampling
distribution
Bootstrapping Indirect Effects
• Create 1000s of simulated datasets using re-
sampling with replacement
– Pretends as though your sample is the population, and
you simulate other samples from that.
• Run the analysis once in each of these 1000s of
samples
• Of those analyses, 95% of the generated statistics
will fall between two numbers. If zero isn’t in that
interval, p < .05!
Effect Sizes for Mediation
• There are many different ways to calculate effect
sizes for mediation analysis (Preacher & Kelly, 2011)
• Two simple-to-understand effect size measures are:
– Percent mediation (PM)
– Completely Standardized Indirect Effect (abcs)
Percent Mediation
Impulsivity Binge Drinking
Enhancement
Motives
.12* (.05)
.25* .28*
c-path (c’ path)
a-path b-path
ab = .25 * .28 = .07
c = .12
PM = .07 / .12 = .583
Interpreted as the percent of the total effect (c) accounted
for by your indirect effect (a*b).
Note about Percent Mediation…
• The direct effect (c’-path) can sometimes be
larger than the total effect (c-path)
– Inconsistent mediation
• In these cases, take the absolute value of c’
before calculating effect size to avoid
proportions greater than 1.0.
Completely Standardized Indirect
Effect
• So, it’s just two steps:
– 1. Calculate the standardized regression paths for the a and b
paths
– 2. Multiply them together to get the ES
– (So, just standardize your variables before analysis and you can
get a 95% CI!)
• Is now a standardized version that will be similar in
interpretation across measures … but it’s no longer
bounded by -1 and 1 like a correlation.
Which is the
same as …
Installing the PROCESS macro in SPSS
• Download files from here:
– process.spd
– http://www.processmacro.org/download.html
Once you do this, you’ll get a new analysis
you can run under:
Analyze  Regression  PROCESS
Now every time you open SPSS, you’ll
have the option to run mediation analyses!
A Sample Model w. Output
Conscientious
Personality
Overall Physical
Health
Health-Related
Behaviours
Uses a (fabricated) dataset you can find online here if
you want to try it on your own time for practice:
http://savvystatistics.com/wp-
content/uploads/2015/03/crossroads.2015.data_.csv
RQ: Do health related behaviours mediate the relationship between
conscientious personality and overall physical health?
How to Run in SPSS
For basic mediation, use “model 4”
Conscientiousness = X
Physical health = Y
Health-Related Behaviours = M
Annotated Output: a, b. c’ paths
Coeff = Slope; SE = standard error; t = t-statistic; p = p-value
LLCI & ULCI = lower and upper levels for confidence interval
a-path
b-path
c'-path (direct effect)
Annotated Output: c-path
c-path
(total effect)
Annotated Output: Effect Size &
Significance of Indirect Effect
Effect Size 1: abcs
(Report the 95% CI For this)
Effect Size 2: PM
(Don’t use the 95% CI For this)
Upper and Lower
Bootstrapped 95% CI
a*b or “indirect effect”
Report the 95% CI for this
If the CI for a*b does not include
zero, then mediation has occurred!
Reporting Mediation Analysis
There was a significant indirect effect of
conscientiousness on overall physical health through
health-related behaviours, ab = 0.21, BCa CI [0.15,
0.26]. The mediator could account for roughly half of
the total effect, PM = .44.
Conscientious
Personality
Overall Physical
Health
Health-Related
Behaviours0.52*** 0.39***
0.26***
(0.47)***
Questions / Contact
Thank you for your time! 
• Email: mackinnon.sean@dal.ca
Appendix: Syntax
*Make sure to run the process.sps macro first, or
this won’t work!
*This is an alternative to running using the GUI
PROCESS vars = health bfi.c behave
/y=health/x=bfi.c/m=behave/w=/z=/v=/q=/
model =4/boot=1000/center=0/hc3=1/effsize=1/
normal=1/coeffci=1/conf=95/percent=0/total=1/
covmy=0/jn=0/quantile =0/plot=0/contrast=0/
decimals=F10.4/covcoeff=0.
2015-03-24

Más contenido relacionado

La actualidad más candente

Logistic regression with SPSS
Logistic regression with SPSSLogistic regression with SPSS
Logistic regression with SPSSLNIPE
 
Null hypothesis for multiple linear regression
Null hypothesis for multiple linear regressionNull hypothesis for multiple linear regression
Null hypothesis for multiple linear regressionKen Plummer
 
Structural equation modeling in amos
Structural equation modeling in amosStructural equation modeling in amos
Structural equation modeling in amosBalaji P
 
Confirmatory Factor Analysis Presented by Mahfoudh Mgammal
Confirmatory Factor Analysis Presented by Mahfoudh MgammalConfirmatory Factor Analysis Presented by Mahfoudh Mgammal
Confirmatory Factor Analysis Presented by Mahfoudh MgammalDr. Mahfoudh Hussein Mgammal
 
Reporting a Factorial ANOVA
Reporting a Factorial ANOVAReporting a Factorial ANOVA
Reporting a Factorial ANOVAKen Plummer
 
My regression lecture mk3 (uploaded to web ct)
My regression lecture   mk3 (uploaded to web ct)My regression lecture   mk3 (uploaded to web ct)
My regression lecture mk3 (uploaded to web ct)chrisstiff
 
Reporting an ANCOVA
Reporting an ANCOVAReporting an ANCOVA
Reporting an ANCOVAKen Plummer
 
Lecture2 hypothesis testing
Lecture2 hypothesis testingLecture2 hypothesis testing
Lecture2 hypothesis testingo_devinyak
 
Linear Regression Using SPSS
Linear Regression Using SPSSLinear Regression Using SPSS
Linear Regression Using SPSSDr Athar Khan
 
Chapter 3 Confidence Interval
Chapter 3 Confidence IntervalChapter 3 Confidence Interval
Chapter 3 Confidence Intervalghalan
 
Moderator mediator
Moderator mediatorModerator mediator
Moderator mediatorCarlo Magno
 

La actualidad más candente (20)

Logistic regression with SPSS
Logistic regression with SPSSLogistic regression with SPSS
Logistic regression with SPSS
 
Null hypothesis for multiple linear regression
Null hypothesis for multiple linear regressionNull hypothesis for multiple linear regression
Null hypothesis for multiple linear regression
 
Structural equation modeling in amos
Structural equation modeling in amosStructural equation modeling in amos
Structural equation modeling in amos
 
Confirmatory Factor Analysis Presented by Mahfoudh Mgammal
Confirmatory Factor Analysis Presented by Mahfoudh MgammalConfirmatory Factor Analysis Presented by Mahfoudh Mgammal
Confirmatory Factor Analysis Presented by Mahfoudh Mgammal
 
Reporting a Factorial ANOVA
Reporting a Factorial ANOVAReporting a Factorial ANOVA
Reporting a Factorial ANOVA
 
My regression lecture mk3 (uploaded to web ct)
My regression lecture   mk3 (uploaded to web ct)My regression lecture   mk3 (uploaded to web ct)
My regression lecture mk3 (uploaded to web ct)
 
Confirmatory Factor Analysis
Confirmatory Factor AnalysisConfirmatory Factor Analysis
Confirmatory Factor Analysis
 
Reporting an ANCOVA
Reporting an ANCOVAReporting an ANCOVA
Reporting an ANCOVA
 
Lecture2 hypothesis testing
Lecture2 hypothesis testingLecture2 hypothesis testing
Lecture2 hypothesis testing
 
Linear Regression Using SPSS
Linear Regression Using SPSSLinear Regression Using SPSS
Linear Regression Using SPSS
 
Path analysis with manifest variables
Path analysis with manifest variablesPath analysis with manifest variables
Path analysis with manifest variables
 
Sem lecture
Sem lectureSem lecture
Sem lecture
 
Assumptions of ANOVA
Assumptions of ANOVAAssumptions of ANOVA
Assumptions of ANOVA
 
Sem with amos ii
Sem with amos iiSem with amos ii
Sem with amos ii
 
Hypothesis testing
Hypothesis testingHypothesis testing
Hypothesis testing
 
Key ideas, terms and concepts in SEM
Key ideas, terms and concepts in SEMKey ideas, terms and concepts in SEM
Key ideas, terms and concepts in SEM
 
Chapter 3 Confidence Interval
Chapter 3 Confidence IntervalChapter 3 Confidence Interval
Chapter 3 Confidence Interval
 
Moderator mediator
Moderator mediatorModerator mediator
Moderator mediator
 
Path analysis
Path analysisPath analysis
Path analysis
 
Qualitative data analysis
Qualitative data analysisQualitative data analysis
Qualitative data analysis
 

Destacado

Wavelet bootstrap Multiple linear regression models
Wavelet bootstrap Multiple linear regression modelsWavelet bootstrap Multiple linear regression models
Wavelet bootstrap Multiple linear regression modelsVinit Sehgal
 
rights and legal aspects of disability in India
rights and legal aspects of disability in Indiarights and legal aspects of disability in India
rights and legal aspects of disability in IndiaNeeraja Cj
 
PhD Presentation (Doctorate)
PhD Presentation (Doctorate)PhD Presentation (Doctorate)
PhD Presentation (Doctorate)Sharif Omar Salem
 
Intorduction to Cisa
Intorduction to CisaIntorduction to Cisa
Intorduction to CisaAli Katouzian
 
CISA Domain 1 - IS Auditing (day 1)
CISA Domain 1 - IS Auditing (day 1)CISA Domain 1 - IS Auditing (day 1)
CISA Domain 1 - IS Auditing (day 1)Cyril Soeri
 
CISA exam 100 practice question
CISA exam 100 practice questionCISA exam 100 practice question
CISA exam 100 practice questionArshad A Javed
 

Destacado (8)

Wavelet bootstrap Multiple linear regression models
Wavelet bootstrap Multiple linear regression modelsWavelet bootstrap Multiple linear regression models
Wavelet bootstrap Multiple linear regression models
 
rights and legal aspects of disability in India
rights and legal aspects of disability in Indiarights and legal aspects of disability in India
rights and legal aspects of disability in India
 
PhD Presentation (Doctorate)
PhD Presentation (Doctorate)PhD Presentation (Doctorate)
PhD Presentation (Doctorate)
 
Intorduction to Cisa
Intorduction to CisaIntorduction to Cisa
Intorduction to Cisa
 
CISA Domain 1 - IS Auditing (day 1)
CISA Domain 1 - IS Auditing (day 1)CISA Domain 1 - IS Auditing (day 1)
CISA Domain 1 - IS Auditing (day 1)
 
CISA exam 100 practice question
CISA exam 100 practice questionCISA exam 100 practice question
CISA exam 100 practice question
 
CISA Training - Chapter 2 - 2016
CISA Training - Chapter 2 - 2016CISA Training - Chapter 2 - 2016
CISA Training - Chapter 2 - 2016
 
CISA Training - Chapter 1 - 2016
CISA Training - Chapter 1 - 2016CISA Training - Chapter 1 - 2016
CISA Training - Chapter 1 - 2016
 

Similar a Introduction to Mediation using SPSS

Network meta-analysis & models for inconsistency
Network meta-analysis & models for inconsistencyNetwork meta-analysis & models for inconsistency
Network meta-analysis & models for inconsistencycheweb1
 
Causality in Python PyCon 2021 ISRAEL
Causality in Python PyCon 2021 ISRAELCausality in Python PyCon 2021 ISRAEL
Causality in Python PyCon 2021 ISRAELHanan Shteingart
 
Statistics pres 3.31.2014
Statistics pres 3.31.2014Statistics pres 3.31.2014
Statistics pres 3.31.2014tjcarter
 
Chapter 13 Data Analysis Inferential Methods and Analysis of Time Series
Chapter 13 Data Analysis Inferential Methods and Analysis of Time SeriesChapter 13 Data Analysis Inferential Methods and Analysis of Time Series
Chapter 13 Data Analysis Inferential Methods and Analysis of Time SeriesInternational advisers
 
Simple-Mediation-Analysis.pptx
Simple-Mediation-Analysis.pptxSimple-Mediation-Analysis.pptx
Simple-Mediation-Analysis.pptxBayanahBayanah
 
Meta-analysis when the normality assumptions are violated (2008)
Meta-analysis when the normality assumptions are violated (2008)Meta-analysis when the normality assumptions are violated (2008)
Meta-analysis when the normality assumptions are violated (2008)Evangelos Kontopantelis
 
Quantitative analysis
Quantitative analysisQuantitative analysis
Quantitative analysisRajesh Mishra
 
Quantitative_analysis.ppt
Quantitative_analysis.pptQuantitative_analysis.ppt
Quantitative_analysis.pptmousaderhem1
 
SPSS statistics - get help using SPSS
SPSS statistics - get help using SPSSSPSS statistics - get help using SPSS
SPSS statistics - get help using SPSScsula its training
 
Between Black and White Population1. Comparing annual percent .docx
Between Black and White Population1. Comparing annual percent .docxBetween Black and White Population1. Comparing annual percent .docx
Between Black and White Population1. Comparing annual percent .docxjasoninnes20
 
Statistics assignment on statistical inference
Statistics assignment on statistical inferenceStatistics assignment on statistical inference
Statistics assignment on statistical inferencesadiakarim8
 
Statistical tools in research
Statistical tools in researchStatistical tools in research
Statistical tools in researchShubhrat Sharma
 
Statistical Analysis Of Data Final
Statistical Analysis Of Data FinalStatistical Analysis Of Data Final
Statistical Analysis Of Data FinalSaba Butt
 
BUS 308 Week 5 Lecture 3 A Different View Effect Sizes .docx
BUS 308 Week 5 Lecture 3 A Different View Effect Sizes .docxBUS 308 Week 5 Lecture 3 A Different View Effect Sizes .docx
BUS 308 Week 5 Lecture 3 A Different View Effect Sizes .docxcurwenmichaela
 
Selection of appropriate data analysis technique
Selection of appropriate data analysis techniqueSelection of appropriate data analysis technique
Selection of appropriate data analysis techniqueRajaKrishnan M
 
1) The path length from A to B in the following graph is .docx
1) The path length from A to B in the following graph is .docx1) The path length from A to B in the following graph is .docx
1) The path length from A to B in the following graph is .docxmonicafrancis71118
 
Presentation David Kenny.pdf
Presentation David Kenny.pdfPresentation David Kenny.pdf
Presentation David Kenny.pdfJoshuaLau29
 

Similar a Introduction to Mediation using SPSS (20)

Network meta-analysis & models for inconsistency
Network meta-analysis & models for inconsistencyNetwork meta-analysis & models for inconsistency
Network meta-analysis & models for inconsistency
 
Causality in Python PyCon 2021 ISRAEL
Causality in Python PyCon 2021 ISRAELCausality in Python PyCon 2021 ISRAEL
Causality in Python PyCon 2021 ISRAEL
 
Statistics pres 3.31.2014
Statistics pres 3.31.2014Statistics pres 3.31.2014
Statistics pres 3.31.2014
 
Chapter 13 Data Analysis Inferential Methods and Analysis of Time Series
Chapter 13 Data Analysis Inferential Methods and Analysis of Time SeriesChapter 13 Data Analysis Inferential Methods and Analysis of Time Series
Chapter 13 Data Analysis Inferential Methods and Analysis of Time Series
 
Simple-Mediation-Analysis.pptx
Simple-Mediation-Analysis.pptxSimple-Mediation-Analysis.pptx
Simple-Mediation-Analysis.pptx
 
Meta-analysis when the normality assumptions are violated (2008)
Meta-analysis when the normality assumptions are violated (2008)Meta-analysis when the normality assumptions are violated (2008)
Meta-analysis when the normality assumptions are violated (2008)
 
Quantitative analysis
Quantitative analysisQuantitative analysis
Quantitative analysis
 
Quantitative_analysis.ppt
Quantitative_analysis.pptQuantitative_analysis.ppt
Quantitative_analysis.ppt
 
SPSS statistics - get help using SPSS
SPSS statistics - get help using SPSSSPSS statistics - get help using SPSS
SPSS statistics - get help using SPSS
 
Between Black and White Population1. Comparing annual percent .docx
Between Black and White Population1. Comparing annual percent .docxBetween Black and White Population1. Comparing annual percent .docx
Between Black and White Population1. Comparing annual percent .docx
 
Statistics assignment on statistical inference
Statistics assignment on statistical inferenceStatistics assignment on statistical inference
Statistics assignment on statistical inference
 
Basics of Statistics.pptx
Basics of Statistics.pptxBasics of Statistics.pptx
Basics of Statistics.pptx
 
Statistical tools in research
Statistical tools in researchStatistical tools in research
Statistical tools in research
 
Statistical Analysis Of Data Final
Statistical Analysis Of Data FinalStatistical Analysis Of Data Final
Statistical Analysis Of Data Final
 
BUS 308 Week 5 Lecture 3 A Different View Effect Sizes .docx
BUS 308 Week 5 Lecture 3 A Different View Effect Sizes .docxBUS 308 Week 5 Lecture 3 A Different View Effect Sizes .docx
BUS 308 Week 5 Lecture 3 A Different View Effect Sizes .docx
 
Selection of appropriate data analysis technique
Selection of appropriate data analysis techniqueSelection of appropriate data analysis technique
Selection of appropriate data analysis technique
 
12.pdf
12.pdf12.pdf
12.pdf
 
1) The path length from A to B in the following graph is .docx
1) The path length from A to B in the following graph is .docx1) The path length from A to B in the following graph is .docx
1) The path length from A to B in the following graph is .docx
 
Presentation David Kenny.pdf
Presentation David Kenny.pdfPresentation David Kenny.pdf
Presentation David Kenny.pdf
 
chi_square test.pptx
chi_square test.pptxchi_square test.pptx
chi_square test.pptx
 

Más de smackinnon

Using Cloud-based statistics applications to enhance statistics education
Using Cloud-based statistics applications to enhance statistics educationUsing Cloud-based statistics applications to enhance statistics education
Using Cloud-based statistics applications to enhance statistics educationsmackinnon
 
One-Way ANOVA: Conceptual Foundations
One-Way ANOVA: Conceptual FoundationsOne-Way ANOVA: Conceptual Foundations
One-Way ANOVA: Conceptual Foundationssmackinnon
 
Generalized Linear Models for Between-Subjects Designs
Generalized Linear Models for Between-Subjects DesignsGeneralized Linear Models for Between-Subjects Designs
Generalized Linear Models for Between-Subjects Designssmackinnon
 
Increasing Power without Increasing Sample Size
Increasing Power without Increasing Sample SizeIncreasing Power without Increasing Sample Size
Increasing Power without Increasing Sample Sizesmackinnon
 
Basics of Structural Equation Modeling
Basics of Structural Equation ModelingBasics of Structural Equation Modeling
Basics of Structural Equation Modelingsmackinnon
 
A gentle introduction to growth curves using SPSS
A gentle introduction to growth curves using SPSSA gentle introduction to growth curves using SPSS
A gentle introduction to growth curves using SPSSsmackinnon
 

Más de smackinnon (6)

Using Cloud-based statistics applications to enhance statistics education
Using Cloud-based statistics applications to enhance statistics educationUsing Cloud-based statistics applications to enhance statistics education
Using Cloud-based statistics applications to enhance statistics education
 
One-Way ANOVA: Conceptual Foundations
One-Way ANOVA: Conceptual FoundationsOne-Way ANOVA: Conceptual Foundations
One-Way ANOVA: Conceptual Foundations
 
Generalized Linear Models for Between-Subjects Designs
Generalized Linear Models for Between-Subjects DesignsGeneralized Linear Models for Between-Subjects Designs
Generalized Linear Models for Between-Subjects Designs
 
Increasing Power without Increasing Sample Size
Increasing Power without Increasing Sample SizeIncreasing Power without Increasing Sample Size
Increasing Power without Increasing Sample Size
 
Basics of Structural Equation Modeling
Basics of Structural Equation ModelingBasics of Structural Equation Modeling
Basics of Structural Equation Modeling
 
A gentle introduction to growth curves using SPSS
A gentle introduction to growth curves using SPSSA gentle introduction to growth curves using SPSS
A gentle introduction to growth curves using SPSS
 

Último

Student profile product demonstration on grades, ability, well-being and mind...
Student profile product demonstration on grades, ability, well-being and mind...Student profile product demonstration on grades, ability, well-being and mind...
Student profile product demonstration on grades, ability, well-being and mind...Seán Kennedy
 
Learn How Data Science Changes Our World
Learn How Data Science Changes Our WorldLearn How Data Science Changes Our World
Learn How Data Science Changes Our WorldEduminds Learning
 
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...Boston Institute of Analytics
 
Digital Marketing Plan, how digital marketing works
Digital Marketing Plan, how digital marketing worksDigital Marketing Plan, how digital marketing works
Digital Marketing Plan, how digital marketing worksdeepakthakur548787
 
Semantic Shed - Squashing and Squeezing.pptx
Semantic Shed - Squashing and Squeezing.pptxSemantic Shed - Squashing and Squeezing.pptx
Semantic Shed - Squashing and Squeezing.pptxMike Bennett
 
Real-Time AI Streaming - AI Max Princeton
Real-Time AI  Streaming - AI Max PrincetonReal-Time AI  Streaming - AI Max Princeton
Real-Time AI Streaming - AI Max PrincetonTimothy Spann
 
Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)Cathrine Wilhelmsen
 
The Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptx
The Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptxThe Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptx
The Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptxTasha Penwell
 
convolutional neural network and its applications.pdf
convolutional neural network and its applications.pdfconvolutional neural network and its applications.pdf
convolutional neural network and its applications.pdfSubhamKumar3239
 
Conf42-LLM_Adding Generative AI to Real-Time Streaming Pipelines
Conf42-LLM_Adding Generative AI to Real-Time Streaming PipelinesConf42-LLM_Adding Generative AI to Real-Time Streaming Pipelines
Conf42-LLM_Adding Generative AI to Real-Time Streaming PipelinesTimothy Spann
 
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default  Presentation : Data Analysis Project PPTPredictive Analysis for Loan Default  Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPTBoston Institute of Analytics
 
Advanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsAdvanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsVICTOR MAESTRE RAMIREZ
 
6 Tips for Interpretable Topic Models _ by Nicha Ruchirawat _ Towards Data Sc...
6 Tips for Interpretable Topic Models _ by Nicha Ruchirawat _ Towards Data Sc...6 Tips for Interpretable Topic Models _ by Nicha Ruchirawat _ Towards Data Sc...
6 Tips for Interpretable Topic Models _ by Nicha Ruchirawat _ Towards Data Sc...Dr Arash Najmaei ( Phd., MBA, BSc)
 
SMOTE and K-Fold Cross Validation-Presentation.pptx
SMOTE and K-Fold Cross Validation-Presentation.pptxSMOTE and K-Fold Cross Validation-Presentation.pptx
SMOTE and K-Fold Cross Validation-Presentation.pptxHaritikaChhatwal1
 
Bank Loan Approval Analysis: A Comprehensive Data Analysis Project
Bank Loan Approval Analysis: A Comprehensive Data Analysis ProjectBank Loan Approval Analysis: A Comprehensive Data Analysis Project
Bank Loan Approval Analysis: A Comprehensive Data Analysis ProjectBoston Institute of Analytics
 
Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 2Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 217djon017
 
INTRODUCTION TO Natural language processing
INTRODUCTION TO Natural language processingINTRODUCTION TO Natural language processing
INTRODUCTION TO Natural language processingsocarem879
 
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...Thomas Poetter
 

Último (20)

Student profile product demonstration on grades, ability, well-being and mind...
Student profile product demonstration on grades, ability, well-being and mind...Student profile product demonstration on grades, ability, well-being and mind...
Student profile product demonstration on grades, ability, well-being and mind...
 
Learn How Data Science Changes Our World
Learn How Data Science Changes Our WorldLearn How Data Science Changes Our World
Learn How Data Science Changes Our World
 
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...
Decoding the Heart: Student Presentation on Heart Attack Prediction with Data...
 
Digital Marketing Plan, how digital marketing works
Digital Marketing Plan, how digital marketing worksDigital Marketing Plan, how digital marketing works
Digital Marketing Plan, how digital marketing works
 
Semantic Shed - Squashing and Squeezing.pptx
Semantic Shed - Squashing and Squeezing.pptxSemantic Shed - Squashing and Squeezing.pptx
Semantic Shed - Squashing and Squeezing.pptx
 
Real-Time AI Streaming - AI Max Princeton
Real-Time AI  Streaming - AI Max PrincetonReal-Time AI  Streaming - AI Max Princeton
Real-Time AI Streaming - AI Max Princeton
 
Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)
 
The Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptx
The Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptxThe Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptx
The Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptx
 
convolutional neural network and its applications.pdf
convolutional neural network and its applications.pdfconvolutional neural network and its applications.pdf
convolutional neural network and its applications.pdf
 
Conf42-LLM_Adding Generative AI to Real-Time Streaming Pipelines
Conf42-LLM_Adding Generative AI to Real-Time Streaming PipelinesConf42-LLM_Adding Generative AI to Real-Time Streaming Pipelines
Conf42-LLM_Adding Generative AI to Real-Time Streaming Pipelines
 
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default  Presentation : Data Analysis Project PPTPredictive Analysis for Loan Default  Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
 
Advanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsAdvanced Machine Learning for Business Professionals
Advanced Machine Learning for Business Professionals
 
6 Tips for Interpretable Topic Models _ by Nicha Ruchirawat _ Towards Data Sc...
6 Tips for Interpretable Topic Models _ by Nicha Ruchirawat _ Towards Data Sc...6 Tips for Interpretable Topic Models _ by Nicha Ruchirawat _ Towards Data Sc...
6 Tips for Interpretable Topic Models _ by Nicha Ruchirawat _ Towards Data Sc...
 
SMOTE and K-Fold Cross Validation-Presentation.pptx
SMOTE and K-Fold Cross Validation-Presentation.pptxSMOTE and K-Fold Cross Validation-Presentation.pptx
SMOTE and K-Fold Cross Validation-Presentation.pptx
 
Bank Loan Approval Analysis: A Comprehensive Data Analysis Project
Bank Loan Approval Analysis: A Comprehensive Data Analysis ProjectBank Loan Approval Analysis: A Comprehensive Data Analysis Project
Bank Loan Approval Analysis: A Comprehensive Data Analysis Project
 
Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 2Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 2
 
INTRODUCTION TO Natural language processing
INTRODUCTION TO Natural language processingINTRODUCTION TO Natural language processing
INTRODUCTION TO Natural language processing
 
Data Analysis Project: Stroke Prediction
Data Analysis Project: Stroke PredictionData Analysis Project: Stroke Prediction
Data Analysis Project: Stroke Prediction
 
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...
 
Insurance Churn Prediction Data Analysis Project
Insurance Churn Prediction Data Analysis ProjectInsurance Churn Prediction Data Analysis Project
Insurance Churn Prediction Data Analysis Project
 

Introduction to Mediation using SPSS

  • 1. Mediation in health research: A statistics workshop using SPSS Dr. Sean P. Mackinnon Dalhousie University Crossroads Interdisciplinary Health Conference, 2015
  • 2. What kinds of questions does mediation answer? • Mediation asks about the process by which a predictor variable affects an outcome • “Does X predict M, which in turn predicts Y?” • E.g., “Does exercise improve cardiovascular health, which in turn increases longevity?”
  • 3. Linear Regression • Understanding mediation requires a basic understanding of linear regression • Displayed as a path diagram, it could look something like this: Impulsivity Binge Drinking .30 The number depicted here is the slope (B value, or b1 above) c-path also called the “total effect” iii XbbY  10
  • 4. Mediation • Mediation builds on this basic linear regression model by adding a third variable (i.e., the “mediator”) • In mediation, the third variable is thought to come in between X & Y. So, X leads to the mediator, which in turn leads to Y. Impulsivity Binge Drinking Enhancement Motives
  • 5. Mediation • The idea is, the c-path (the direct effect) should get smaller with the addition of a mediator. • So, we want to know if the c-path – c’-path is “statistically significant.” Impulsivity Binge Drinking Enhancement Motives c’-path Also called the “direct effect”
  • 6. Mediation • To test this, you first need to get the slope of two other relationships: a and b paths Impulsivity Binge Drinking Enhancement Motives c’-path Get the slope of this relationship a-path Get the slope of this relationship while also controlling for enhancement motives b-path
  • 7. Mediation • Mathematicians have shown that – (a-path * b-path) = c-path – c’ path – (But only when X and M are continuous) • Thus, if a*b (“the indirect effect”) is statistically significant, mediation has occurred Impulsivity Binge Drinking Enhancement Motives c’-path a-path b-path Preacher & Hayes (2008)
  • 8. Significance of Indirect Effect • Lots of ways to test the significance of a*b – Test of Joint Significance – Sobel Test – Bootstrapped Confidence Intervals • Of these methods, bootstrapping is currently the most preferred • But … Hayes & Scharkow (2013) have shown that the different methods agree > 90% of the time…
  • 9. Joint Significance Test (Baron & Kenny, 1986) • If the a-path AND the b-path are both significant, conclude that a*b is also significant. • This is a liberal test (i.e., high Type I error) and is usually used as a supplement to other methods. Impulsivity Binge Drinking Enhancement Motives .05 .25* .28* c’ path a-path b-path
  • 10. Sobel Test (Sobel, 1982) • An alternative is to estimate the indirect effect and its significance using the Sobel test (Sobel. 1982). • It is a conservative test (i.e., high Type II error) • z-value = a*b/SQRT(b2*sa 2 + a2*sb 2) – a = B value (slope) for a-path – b = B value (slope) for b-path – sa = SE for a-path – sa = SE for b-path • Online Calculator for Sobel Test: – http://quantpsy.org/sobel/sobel.htm – Also available in the PROCESS macro discussed later
  • 11. Bootstrapping • The sobel test is inaccurate because it relies on an assumption of a normal sampling distrbution: – However, the sampling distribution distribution of a*b is non-normal except in very large samples… • Bootstrapping is a computer intensive, robust analysis technique that can be applied to non-normal data. • Virtually any analysis can be bootstrapped, but we’re going to apply it to testing the significance of the indirect effect (a*b).
  • 12. What is a “Re-Sample?” In SPSS, Each row is a “person” who has an ID, and lots of values on measures A “re-sample” randomly samples participants from the sample, with replacement Re-sample 1 ID1 ID3 ID4 ID2 Re-sample 2 ID1 ID1 ID3 ID2 Re-sample 3 ID4 ID4 ID2 ID2 Note that people can be duplicated in the resamples using this method
  • 13. What is bootstrapping? The idea of the sampling distribution of the sample mean x-bar: take very many samples, collect the x-values from each, and look at the distribution of these values From Hesterberg et al. (2003)
  • 14. What is bootstrapping? From Hesterberg et al. (2003) The theory shortcut: if we know that the population values follow a normal distribution, theory tells us that the sampling distribution of x-bar is also normal. This is known as the central limit theorem
  • 15. What is bootstrapping? From Hesterberg et al. (2003) The bootstrap idea: when theory fails and we can afford only one sample, that sample stands in for the population, and the distribution of x in many resamples stands in for the sampling distribution
  • 16. Bootstrapping Indirect Effects • Create 1000s of simulated datasets using re- sampling with replacement – Pretends as though your sample is the population, and you simulate other samples from that. • Run the analysis once in each of these 1000s of samples • Of those analyses, 95% of the generated statistics will fall between two numbers. If zero isn’t in that interval, p < .05!
  • 17. Effect Sizes for Mediation • There are many different ways to calculate effect sizes for mediation analysis (Preacher & Kelly, 2011) • Two simple-to-understand effect size measures are: – Percent mediation (PM) – Completely Standardized Indirect Effect (abcs)
  • 18. Percent Mediation Impulsivity Binge Drinking Enhancement Motives .12* (.05) .25* .28* c-path (c’ path) a-path b-path ab = .25 * .28 = .07 c = .12 PM = .07 / .12 = .583 Interpreted as the percent of the total effect (c) accounted for by your indirect effect (a*b).
  • 19. Note about Percent Mediation… • The direct effect (c’-path) can sometimes be larger than the total effect (c-path) – Inconsistent mediation • In these cases, take the absolute value of c’ before calculating effect size to avoid proportions greater than 1.0.
  • 20. Completely Standardized Indirect Effect • So, it’s just two steps: – 1. Calculate the standardized regression paths for the a and b paths – 2. Multiply them together to get the ES – (So, just standardize your variables before analysis and you can get a 95% CI!) • Is now a standardized version that will be similar in interpretation across measures … but it’s no longer bounded by -1 and 1 like a correlation. Which is the same as …
  • 21. Installing the PROCESS macro in SPSS • Download files from here: – process.spd – http://www.processmacro.org/download.html Once you do this, you’ll get a new analysis you can run under: Analyze  Regression  PROCESS Now every time you open SPSS, you’ll have the option to run mediation analyses!
  • 22. A Sample Model w. Output Conscientious Personality Overall Physical Health Health-Related Behaviours Uses a (fabricated) dataset you can find online here if you want to try it on your own time for practice: http://savvystatistics.com/wp- content/uploads/2015/03/crossroads.2015.data_.csv RQ: Do health related behaviours mediate the relationship between conscientious personality and overall physical health?
  • 23. How to Run in SPSS For basic mediation, use “model 4” Conscientiousness = X Physical health = Y Health-Related Behaviours = M
  • 24. Annotated Output: a, b. c’ paths Coeff = Slope; SE = standard error; t = t-statistic; p = p-value LLCI & ULCI = lower and upper levels for confidence interval a-path b-path c'-path (direct effect)
  • 26. Annotated Output: Effect Size & Significance of Indirect Effect Effect Size 1: abcs (Report the 95% CI For this) Effect Size 2: PM (Don’t use the 95% CI For this) Upper and Lower Bootstrapped 95% CI a*b or “indirect effect” Report the 95% CI for this If the CI for a*b does not include zero, then mediation has occurred!
  • 27. Reporting Mediation Analysis There was a significant indirect effect of conscientiousness on overall physical health through health-related behaviours, ab = 0.21, BCa CI [0.15, 0.26]. The mediator could account for roughly half of the total effect, PM = .44. Conscientious Personality Overall Physical Health Health-Related Behaviours0.52*** 0.39*** 0.26*** (0.47)***
  • 28. Questions / Contact Thank you for your time!  • Email: mackinnon.sean@dal.ca
  • 29. Appendix: Syntax *Make sure to run the process.sps macro first, or this won’t work! *This is an alternative to running using the GUI PROCESS vars = health bfi.c behave /y=health/x=bfi.c/m=behave/w=/z=/v=/q=/ model =4/boot=1000/center=0/hc3=1/effsize=1/ normal=1/coeffci=1/conf=95/percent=0/total=1/ covmy=0/jn=0/quantile =0/plot=0/contrast=0/ decimals=F10.4/covcoeff=0. 2015-03-24