class: center, middle, inverse, title-slide .title[ # Lecture 09: Mediation & Moderation ] .subtitle[ ##
Same same but different
] .author[ ### Dr Danielle Evans ] .date[ ### 16 April 2024 ] --- class: red, middle <style type="text/css"> a { color: #009af5; font-weight: bold; } a.glossary { font-weight: bold; color: #8e7df1; cursor: help; position: relative; } .remark-inline-code { font-size: var(--code-inline-font-size); color: #4266ff; padding: 2px; } strong { font-weight: bold; color: black; } .remark-slide-number { color: black; opacity: 1; font-size: 0.9rem; } .hljs-github .hljs-string, .hljs-github .hljs-doctag { color: #333; } .hljs-github .hljs-literal { color: #333; } .hiddenFrame{ height:1px; width:1px; opacity: 0; } .red.remark-slide-content { background-color: #000000; font-size: 0rem; padding: 0; width: 100%; height: 100%; } <!-- .remark-container { --> <!-- background: #000000; --> <!-- margin: 0; --> <!-- overflow: hidden; --> <!-- } --> </style> <img src="data:image/png;base64,#img/ps.jpg" width="100%" style="display: block; margin: auto;" /> --- ## Overview **Part 1: Mediation Analysis - The How...** - What is it? + Total effects, direct effects, & indirect effects - How do we use it? - Reporting it in APA style <br> **Part 2: Moderation Analysis - The When...** - What is it? + Main effects & interactions - How do we use it? + Grand mean centring - Reporting it in APA style ??? not gonna ask how youre doing because i think i know its a tough time atm but i really hope ur all doing ok just a couple more weeks to get through before summer we're gonna get through it, and it will all be ok COMMON ANALYSES FOR DISS PROJECTS EXAM TOPICS --- ## Mediation - <a class='glossary' title='Mediation analysis is a statistical method used to explore the indirect effect of a predictor variable on an outcome variable through one (or more) intervening variables, known as mediators. In other words, it examines the mechanism or pathway through which the predictor influences the outcome.'>Mediation</a> occurs when the relationship between a **predictor** and an **outcome**, can be **explained** by their relationship to a third variable: the **mediator** - Previously, we've looked at simple relationships between a **predictor** and an **outcome**: <br><br><br><br><br> .center[ <img src="data:image/png;base64,#img/09_1.png" width="70%" /> ] --- ## Mediation - With <a class='glossary' title='Mediation analysis is a statistical method used to explore the indirect effect of a predictor variable on an outcome variable through one (or more) intervening variables, known as mediators. In other words, it examines the mechanism or pathway through which the predictor influences the outcome.'>mediation</a>, we're looking at **how** variables are related, we're attempting to further our understanding by **explaining** the relationship between the **predictor** and the **outcome** - we're interested in **pathways**: <br><br> .center[ <img src="data:image/png;base64,#img/09_2.png" width="70%" /> ] <br> - Change in the **predictor** = change in the **mediator** = change in the **outcome** --- ## Mediation - So, we can extend our simpler model between **predictor** and **outcome**: <br> .center[ <img src="data:image/png;base64,#img/09_3.png" width="70%" /> ] <br> - To examine the **pathways** that might **explain** that relationship: .center[ <img src="data:image/png;base64,#img/09_4.png" width="70%" /> ] --- ## Mediation - We can use a <a class='glossary' title='Mediation analysis is a statistical method used to explore the indirect effect of a predictor variable on an outcome variable through one (or more) intervening variables, known as mediators. In other words, it examines the mechanism or pathway through which the predictor influences the outcome.'>mediation model</a> whenever we use a **linear model** + A mediation is essentially a few linear models! - Can be used in <a class='glossary' title='a form of research in which you naturally observe the relationships between variables. Correlational studies are non-experimental, which means that the experimenter does not manipulate or interfere with any of the variables'>correlational</a> or <a class='glossary' title='a form of research in which at least one variable is systematically manipulated to see the effect on an outcome variable'>experimental</a> designs - The mediator used and the pathways should be **theoretically driven** + We can investigate further to check if our decisions are appropriate - But we need to be careful with our interpretations & conclusions: + With **mediation** we're implying there is a **directional path** between our variables, but without a **causal design**, we cannot infer causality from our results! <br> <div class="sweat" style="font-size:90%"> <p><b>Easy Error!</b> Even in a mediation, <b>correlation does not equal causation</b>!! </p> </div> --- ## Mediation: Pathways - We start with the **Total Effect**, which is the simple relationship between **predictor** and **outcome**, where we're not adjusting for any other variables: <br><br> .center[ <img src="data:image/png;base64,#img/09_5.png" width="70%" /> ] <br> <br> <br> - It might help to think of it as being the overall relationship between your two variables... --- ## Mediation: Pathways - We then partition this **Total Effect** into: + An **Indirect Effect** which is the effect of the **predictor** on the **outcome**, through the **mediator** + & a **Direct Effect** which is the effect of the **predictor** on the **outcome**, after adjusting for the **mediator** .center[ <img src="data:image/png;base64,#img/09_6.png" width="60%" /> ] --- ## Mediation: Pathways <br> .pull-left[ <img src="data:image/png;base64,#img/09_7.png" width="80%" /> ] .pull-right[ <br> <br> <br> <br> <br> <br> <img src="data:image/png;base64,#img/09_8.png" width="100%" /> ] --- ## Mediation: Pathways <br> .pull-left[ <img src="data:image/png;base64,#img/09_9.png" width="80%" /> ] .pull-right[ <br> <br> <br> <img src="data:image/png;base64,#img/09_10.png" width="100%" /> ] --- ## Mediation: Pathways <br> .pull-left[ <img src="data:image/png;base64,#img/09_11.png" width="80%" /> ] .pull-right[ <br> <br> <br> <img src="data:image/png;base64,#img/09_12.png" width="100%" /> ] --- ## Mediation: Partitions <br> .center[ <img src="data:image/png;base64,#img/09_13.png" width="85%" /> ] --- ## Mediation: Partitions - The terms for each of these pathways can feel counter-intuitive... - The **Total Effect** is comprised of the **Indirect Effect** AND the **Direct Effect** - Even though we call it the **Total Effect**, it's still just the simple relationship between **predictor** and **outcome** - we haven't accounted for any other variables - By adding in a mediator, we can see how much of this **Total Effect** is a **Direct Effect** of our predictor, and how much can be explained by our mediator (i.e., the **Indirect Effect**) <br> <br> <br> <div class="sweat" style="font-size:90%"> <p><b>Easy Error!</b> People often get 'Direct Effect' & 'Total Effect' muddled up!! The total effect does not adjust for any other variables - the direct effect <i>does..</i></p> </div> ??? the direct effect adjusts!!!! --- ## A Mathsy Mediation Example - **SES** is a predictor of **children's maths attainment** (Evans et al., 2018, 2020a, 2020b, 2020c) - There are many possible mechanisms underlying this relationship, which is what we are trying to uncover with a mediation - So, starting with the simple relationship between predictor and outcome, we have the **Total Effect** of SES on children's maths ability: <br> .center[ <img src="data:image/png;base64,#img/09_14.png" width="75%" /> ] <br> - We can then include a mediator in our model to see *how* SES is related to children's maths ability, and whether this relationship can be explained by another variable... --- ## A Mathsy Mediation Example - You should use theory and research to decide what the mediator might be in this scenario - For today, **parental involvement in educational activities** seems to be a sensible mediator - And so our **mediation model** is: <div style="line-height:5%;"> <br> </div> .center[ <img src="data:image/png;base64,#img/09_15.png" width="75%" /> ] <div style="line-height:5%;"> <br> </div> - We're testing whether SES predicts maths ability, and if/how much of this relationship can be explained by parental involvement in education --- ## Doing a Mediation - Step 1. Does the predictor predict the outcome (**Total Effect**) + We could theoretically test this with a simple regression in **R** <div style="line-height:65%;"> <br> </div> <br> <br> <br> <br> .center[ <img src="data:image/png;base64,#img/09_16.png" width="75%" /> ] --- ## Doing a Mediation - Step 2a: Separate the **Total Effect** into an **Indirect Effect** (path *ab*) by first working out **path** **_a_**: <br> .center[ <img src="data:image/png;base64,#img/09_17.png" width="75%" /> ] - We could theoretically test this with another simple regression in **R** <div style="line-height:40%;"> <br> </div> <div class="tu" style="font-size:90%"> <p><b>Top Tip!</b> The Indirect Effect is the product of paths <i>a</i> and <i>b</i> - we can just multiply the estimates together to get the Indirect Effect </p> </div> --- ## Doing a Mediation - Step 2b: Separate the **Total Effect** into an **Indirect Effect** (path *ab*) by first working out path *a*, and then **path** **_b_**, adjusting for the predictor: <br> .center[ <img src="data:image/png;base64,#img/09_18.png" width="75%" /> ] - We could test this with a multiple regression in **R** where we adjust for our predictor + We need to adjust for the predictor because if we don't control for it the outcome and the mediator could be correlated just because our predictor is related to them both --- ## Doing a Mediation - Step 3: See whether our predictor still predicts our outcome **path** **_c_** (the **Direct Effect**), after accounting for the Indirect Effect: <br> .center[ <img src="data:image/png;base64,#img/09_19.png" width="75%" /> ] - We could test this with a multiple regression in **R** where we adjust for our mediator --- ## Mediation in R - To run a mediation in R we use the `sem()` function from the `lavaan` package + The code looks pretty scary, but there's no reason to be afraid! ```r # step 1: define the model my_mod <- 'outcome ~ c*predictor + b*mediator mediator ~ a*predictor indirect_effect := a*b total_effect := c + (a*b) ' # step 2: fit the model with FIML and robust SEs my_fit <- lavaan::sem(my_mod, data = my_data, missing = "FIML", estimator = "MLR") # step 3: summarize the model broom::glance(my_fit) broom::tidy(my_fit, conf.int = TRUE) ``` <div style="line-height:1%;"> <br> </div> <div class="sweat" style="font-size:90%"> <p><b>Don't Panic!</b> We'll go over the code in the discovr_10 tutorial & the skills lab!</p> </div> --- ## Mathsy Mediation in R - Our mathsy mediation model in **R** with ses (predictor), parent_inv (mediator), and maths_att (outcome): ```r # step 1: define the model my_mod <- 'maths_att ~ c*ses + b*parent_inv parent_inv ~ a*ses indirect_effect := a*b total_effect := c + (a*b) ' # step 2: fit the model with FIML and robust SEs my_fit <- lavaan::sem(my_mod, data = my_data, missing = "FIML", estimator = "MLR") # step 3: summarize the model broom::glance(my_fit) broom::tidy(my_fit, conf.int = TRUE) ``` --- ## Mathsy Mediation in R - We can see the **parameter estimates** (unstandardized betas) for each pathway in the **estimate** column below: ```r # step 3: summarize the model broom::tidy(my_fit, conf.int = TRUE) ``` <table class="table" style="font-size: 14px; margin-left: auto; margin-right: auto;"> <thead> <tr> <th style="text-align:left;background-color: #3f51b5; color: #fff; !important;"> term </th> <th style="text-align:left;background-color: #3f51b5; color: #fff; !important;"> op </th> <th style="text-align:left;background-color: #3f51b5; color: #fff; !important;"> label </th> <th style="text-align:right;background-color: #3f51b5; color: #fff; !important;"> estimate </th> <th style="text-align:right;background-color: #3f51b5; color: #fff; !important;"> std.error </th> <th style="text-align:right;background-color: #3f51b5; color: #fff; !important;"> statistic </th> <th style="text-align:right;background-color: #3f51b5; color: #fff; !important;"> p.value </th> <th style="text-align:right;background-color: #3f51b5; color: #fff; !important;"> conf.low </th> <th style="text-align:right;background-color: #3f51b5; color: #fff; !important;"> conf.high </th> </tr> </thead> <tbody> <tr> <td style="text-align:left;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> maths_att ~ ses </td> <td style="text-align:left;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> ~ </td> <td style="text-align:left;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> c </td> <td style="text-align:right;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> 4.071 </td> <td style="text-align:right;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> 0.455 </td> <td style="text-align:right;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> 8.951 </td> <td style="text-align:right;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> 0 </td> <td style="text-align:right;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> 3.179 </td> <td style="text-align:right;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> 4.962 </td> </tr> <tr> <td style="text-align:left;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> maths_att ~ parent_inv </td> <td style="text-align:left;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> ~ </td> <td style="text-align:left;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> b </td> <td style="text-align:right;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> 71.906 </td> <td style="text-align:right;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> 6.394 </td> <td style="text-align:right;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> 11.245 </td> <td style="text-align:right;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> 0 </td> <td style="text-align:right;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> 59.373 </td> <td style="text-align:right;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> 84.439 </td> </tr> <tr> <td style="text-align:left;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> parent_inv ~ ses </td> <td style="text-align:left;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> ~ </td> <td style="text-align:left;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> a </td> <td style="text-align:right;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> 0.024 </td> <td style="text-align:right;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> 0.004 </td> <td style="text-align:right;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> 6.731 </td> <td style="text-align:right;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> 0 </td> <td style="text-align:right;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> 0.017 </td> <td style="text-align:right;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> 0.031 </td> </tr> <tr> <td style="text-align:left;background-color: #e4eaff; color: #black; !important;"> maths_att ~~ maths_att </td> <td style="text-align:left;background-color: #e4eaff; color: #black; !important;"> ~~ </td> <td style="text-align:left;background-color: #e4eaff; color: #black; !important;"> </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 343190.477 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 23717.965 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 14.470 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 0 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 296704.119 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 389676.835 </td> </tr> <tr> <td style="text-align:left;background-color: #e4eaff; color: #black; !important;"> parent_inv ~~ parent_inv </td> <td style="text-align:left;background-color: #e4eaff; color: #black; !important;"> ~~ </td> <td style="text-align:left;background-color: #e4eaff; color: #black; !important;"> </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 27.000 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 1.884 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 14.331 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 0 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 23.307 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 30.692 </td> </tr> <tr> <td style="text-align:left;background-color: #e4eaff; color: #black; !important;"> ses ~~ ses </td> <td style="text-align:left;background-color: #e4eaff; color: #black; !important;"> ~~ </td> <td style="text-align:left;background-color: #e4eaff; color: #black; !important;"> </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 4713.358 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 0.000 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> NA </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> NA </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 4713.358 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 4713.358 </td> </tr> <tr> <td style="text-align:left;background-color: #e4eaff; color: #black; !important;"> maths_att ~1 </td> <td style="text-align:left;background-color: #e4eaff; color: #black; !important;"> ~1 </td> <td style="text-align:left;background-color: #e4eaff; color: #black; !important;"> </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 2077.997 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 325.090 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 6.392 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 0 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 1440.833 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 2715.161 </td> </tr> <tr> <td style="text-align:left;background-color: #e4eaff; color: #black; !important;"> parent_inv ~1 </td> <td style="text-align:left;background-color: #e4eaff; color: #black; !important;"> ~1 </td> <td style="text-align:left;background-color: #e4eaff; color: #black; !important;"> </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 50.027 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 0.848 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 58.991 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 0 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 48.365 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 51.689 </td> </tr> <tr> <td style="text-align:left;background-color: #e4eaff; color: #black; !important;"> ses ~1 </td> <td style="text-align:left;background-color: #e4eaff; color: #black; !important;"> ~1 </td> <td style="text-align:left;background-color: #e4eaff; color: #black; !important;"> </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> -254.129 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 0.000 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> NA </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> NA </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> -254.129 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> -254.129 </td> </tr> <tr> <td style="text-align:left;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> indirect_effect := a*b </td> <td style="text-align:left;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> := </td> <td style="text-align:left;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> indirect_effect </td> <td style="text-align:right;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> 1.727 </td> <td style="text-align:right;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> 0.330 </td> <td style="text-align:right;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> 5.240 </td> <td style="text-align:right;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> 0 </td> <td style="text-align:right;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> 1.081 </td> <td style="text-align:right;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> 2.373 </td> </tr> <tr> <td style="text-align:left;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> total_effect := c+(a*b) </td> <td style="text-align:left;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> := </td> <td style="text-align:left;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> total_effect </td> <td style="text-align:right;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> 5.798 </td> <td style="text-align:right;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> 0.472 </td> <td style="text-align:right;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> 12.281 </td> <td style="text-align:right;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> 0 </td> <td style="text-align:right;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> 4.873 </td> <td style="text-align:right;font-weight: bold;background-color: #c8d0ff; color: #black; !important;"> 6.724 </td> </tr> </tbody> </table> --- ## Building our Model - We can use the estimates (betas) and the label (the path) to build a diagram of our model: <br> .center[ <img src="data:image/png;base64,#img/09_20.png" width="85%" /> ] <br><br><br> <p style="text-align:left; font-size:50%">*these results are fictional</p> --- ## Interpreting Results We can interpret the __*b*__s in the same way as we would with a linear model: + Path __*a*__ tells us the effect for the predictor on the mediator + Path __*b*__ tells us the effect for the mediator on the outcome adjusting for the predictor + Path __*c*__ (**Direct Effect**) tells us the effect for the predictor on the outcome adjusting for the mediator + The **Indirect Effect** tells us whether there is a mediation + The **Total Effect** tells us the effect of the predictor on the outcome, NOT adjusting for the mediator --- ## Interpreting Results - To see if we have a significant mediation, we look at the size, the confidence interval, and the *p*-value of the **Indirect Effect** + If the confidence intervals do not contain 0 and if the *p*-value is less than .05 then we can say there is a **mediation effect** - We can have different types of mediation: + **Partial mediation** is when the Direct Effect (*c*) is reduced but still significant - there's both an indirect and direct effect of the predictor on the outcome + **Full mediation** is when Direct Effect (*c*) reduced to non-significance - the effect of the predictor on the outcomes goes entirely through the mediator - It's generally best to avoid thinking of mediations as being full or partial when based on *p*-values because of the all-or-nothing conclusions drawn from significance tests, instead, it's better to ask: **is the size of the mediation effect substantial enough to care about it?** <!-- - We can use the **index of mediation** as a way of standardising the *b* for the **Indirect Effect** to compare it across studies and measures, or we can look in the **std.all** column of the output for the standardised estimates --> --- ## Interpreting Results - So, based on our mathsy mediation: <br> .center[ <img src="data:image/png;base64,#img/09_21.png" width="85%" /> ] - SES predicts maths ability directly (*b* = 4.07) - SES predicts maths ability indirectly through parental involvement (*b* = 1.73) <br> <p style="text-align:left; font-size:50%">*these results are fictional</p> --- ## Reporting Mediations - To report the results of our **mediation** in **APA style**, we could write something like the below, along with a diagram displaying the **parameter estimates** for each effect/pathway: **"There was a significant indirect effect of SES, on children's maths attainment, through parental involvement in educational activities, *b* = 1.73, 95% CI [1.08, 2.37], *p* < .001."** .center[ <img src="data:image/png;base64,#img/res.png" width="65%" /> ] <div style="line-height:1%;"> <br> </div> <div class="swr" style="font-size:90%"> <p><b>Pet Peeve!</b> Your result is NOT 'insignificant' - it is <b>nonsignificant!!</b> </p> </div> --- ## Moderation - So we've looked at *how* variables are related with **mediation** - With <a class='glossary' title='Moderation analysis is a statistical technique used to examine whether the relationship between two variables (the predictor and outcome variables) changes depending on the level of a third variable, known as the moderator'>moderation</a> we're looking at *when* variables are related - With <a class='glossary' title='Moderation analysis is a statistical technique used to examine whether the relationship between two variables (the predictor and outcome variables) changes depending on the level of a third variable, known as the moderator'>moderation</a> we can investigate whether the effect of our predictor is the same for all people or whether it differs under different conditions depending on the value of another variable – the **moderator** - Differences could be the <a class='glossary' title='Using a categorical moderator as an example, this means a significant relationship between the predictor variable and the outcome variable is present for one group, but absent for the other group'>presence</a> of an effect, the <a class='glossary' title='Using a categorical moderator as an example, this means the relationship between the predictor variable and the outcome variable is stronger for one group, and weaker for the other group'>size</a> of the effect, or the <a class='glossary' title='Using a categorical moderator as an example, this means the relationship between the predictor variable and the outcome variable is positive for one group, and negative for the other group'>direction</a> of the effect <br> .center[ <img src="data:image/png;base64,#img/modnew1.png" width="65%" /> ] --- ## Moderation - A **moderator** is a variable that affects the relationship between two others - it **modifies** it - Can be used in <a class='glossary' title='a form of research in which you naturally observe the relationships between variables. Correlational studies are non-experimental, which means that the experimenter does not manipulate or interfere with any of the variables'>correlational</a> or <a class='glossary' title='a form of research in which at least one variable is systematically manipulated to see the effect on an outcome variable'>experimental</a> designs with continuous or categorical variables - It's mathematically the same as the **interactions** we encountered in **Discovering Statistics** last term - we run a moderation in the same way as a linear model with 3 predictors: <br> .center[ <img src="data:image/png;base64,#img/modnew2.png" width="65%" /> ] --- ## Moderation - The key conceptual difference is that you are implying a variable (the **moderator**) alters the relationship between the other two variables - The moderator chosen should be **theoretically driven** - the same as a mediation - However, the same issues around causation apply here too - We are implying a directional relationship (i.e., the moderator modifies the relationship) but **correlation does not equal causation** unless you have a causal design <br> <br> <br> <br> <div class="sweat" style="font-size:90%"> <p><b>Easy Error!</b> Predictors and moderators are mathematically the same in our model - the only differences are conceptual!</p> </div> --- ## A Mathsy Moderation Example - **Parental maths anxiety** is a predictor of **children's maths anxiety** - But research suggests that when parents help with maths homework, the outcomes might be **different** for parents experiencing maths anxiety, and that under certain conditions helping children with their homework might actually be harmful - One idea is that when parents have maths anxiety, helping with maths homework can **increase their child's maths anxiety**, compared to math-anxious parents that don't help - So, our conceptual model is: .center[ <img src="data:image/png;base64,#img/09_22.png" width="70%" /> ] ??? we're hypothesising that the relationship between parental maths anx and childrens maths anx, changes due to how many hours parents help with hw could be presence, size, or direction --- ## A Mathsy Moderation Example - We can run a linear model with 3 predictors to test this idea - Where we have two **main effects** and one **interaction effect** <div style="line-height:5%;"> <br> </div> .center[ <img src="data:image/png;base64,#img/09_23.png" width="70%" /> ] <div style="line-height:5%;"> <br> </div> - We must include the **main effects** for both the predictor and moderator otherwise the interaction and main effects are confounded & a significant interaction can’t be interpreted - If the interaction is significant, then that is evidence of moderation --- ## The Catch - When using a **linear model** with multiple predictors, each of the effects (*b*s) are interpreted when the other variables in the model are 0 - So if we had parental maths anxiety and parental homework help as predictors in a non-moderated linear model, we would interpret the *b* of parental maths anxiety when parental homework help is at 0, and vice versa - In some scenarios this interpretation isn't problematic because 0 is a plausible and meaningful score + I.e., a child *could* get a score of 0 on our maths anxiety measure meaning they have no anxiety at all - But often it doesn't make sense for a predictor to be interpreted in this way because a score of 0 isn't possible or doesn't make sense + Imagine we measured parental anxiety by measuring heart rate, here, a score of 0 would indicate something is very wrong with our participant - The interaction term in our moderation means that the *b*s for the main effects are usually uninterpretable... ??? with an interaction, we're saying that the effect of our predictor changes, at different levels of our moderator, so if we have an interaction effect, the beta we get for the predictors wil change depending on the values of the other variables in our model When there is no interaction, this doesn’t matter because the b parameter doesn’t change at different levels of our moderator --- ## Grand Mean Centring - So, to make interpretation easier, we <a class='glossary' title='Centering, in the context of statistics and data analysis, refers to the process of adjusting the values of a variable so that the new values have a specified property, usually a mean of zero. This adjustment involves subtracting a constant value from each observation in the variable, typically the mean of the original variable.'>centre</a> our variables by transforming them into deviations around a fixed point - in **grand mean centring** this 'fixed point' is the overall mean of that measure - We can then interpret our effects at average levels of the other variable - This applies to our **predictor** and **moderator** only + We don't need to centre our outcome because we interpret the effects of our predictors at specific values of our *b*s, with grand mean centring, this 'specific value' becomes the mean of the other variable(s) - Centring is super easy to do in **R** with **mutate()** and **mean()**, we're just taking the overall mean away from each participants individual score - we'll go over the code in your skills lab this week! <div style="line-height:5%;"> <br> </div> <div class="sweat" style="font-size:90%"> <p><b>Easy Error!</b> You can use centring in any model where it makes sense, we <b>need</b> to use it in moderations for interpretation but we can use it elsewhere too!</p> </div> --- ## Grand Mean Centring - So what happens is that our predictors and moderators now **shift** to have a **mean of 0** but the overall distribution stays the same: <br> .center[ <img src="data:image/png;base64,#img/dist.png" width="75%" /> ] --- ## Mathsy Moderation in R - To do a moderation in R, we'll be using the same code as we have done before with a linear model: ```r # step 1: fit model with our centred variables math_anx_lm <- lm(child_maths_anx ~ parent_maths_anx*parent_hw_help, data = ma_data) # step 2: summarize the model with robust SEs broom::tidy(math_anx_lm, conf.int = TRUE) parameters::model_parameters(math_anx_lm, robust = TRUE, vcov.type = "HC4", digits = 3) ``` --- ## Mathsy Moderation in R - Our results would look like this where we have **2x main effects**, and **1x interaction effect**: <div style="line-height:50%;"> <br> </div> <table class="table" style="font-size: 16px; margin-left: auto; margin-right: auto;"> <thead> <tr> <th style="text-align:left;background-color: #3f51b5; color: #fff; !important;"> term </th> <th style="text-align:right;background-color: #3f51b5; color: #fff; !important;"> estimate </th> <th style="text-align:right;background-color: #3f51b5; color: #fff; !important;"> std.error </th> <th style="text-align:right;background-color: #3f51b5; color: #fff; !important;"> statistic </th> <th style="text-align:right;background-color: #3f51b5; color: #fff; !important;"> p.value </th> <th style="text-align:right;background-color: #3f51b5; color: #fff; !important;"> conf.low </th> <th style="text-align:right;background-color: #3f51b5; color: #fff; !important;"> conf.high </th> </tr> </thead> <tbody> <tr> <td style="text-align:left;background-color: #e4eaff; color: #black; !important;"> (Intercept) </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 40.598 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 0.310 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 130.958 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 0 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 39.988 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 41.207 </td> </tr> <tr> <td style="text-align:left;background-color: #e4eaff; color: #black; !important;"> parent_maths_anx </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 0.507 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 0.018 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 28.099 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 0 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 0.471 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 0.542 </td> </tr> <tr> <td style="text-align:left;background-color: #e4eaff; color: #black; !important;"> parent_hw_help </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> -166.756 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 39.805 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> -4.189 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 0 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> -245.052 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> -88.460 </td> </tr> <tr> <td style="text-align:left;background-color: #e4eaff; color: #black; !important;"> parent_maths_anx:parent_hw_help </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 23.955 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 3.962 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 6.046 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 0 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 16.161 </td> <td style="text-align:right;background-color: #e4eaff; color: #black; !important;"> 31.749 </td> </tr> </tbody> </table> <div style="line-height:50%;"> <br> </div> - If our interaction is significant then we have a moderation effect, it would also mean we're no longer that interested in the <a class='glossary' title='Lower-order effects typically refer to the main effects or direct effects of independent variables on a dependent variable in a statistical model. In other words, they are the effects of the independent variables on the dependent variable without considering any interactions or moderation effects.'>lower-order</a>/main effects because they **change at different levels of our moderator** <br> <div class="mb" style="font-size:90%"> <p><b>Woah!</b> <a class='glossary' title='Higher-order effects refer to interactions or moderation effects in statistical models. Unlike lower-order effects, which represent the main effects of independent variables on a dependent variable, higher-order effects involve the combined influence of multiple variables, often through interaction terms or moderation.'>Higher-order effects</a> refer to interactions, and <a class='glossary' title='Lower-order effects typically refer to the main effects or direct effects of independent variables on a dependent variable in a statistical model. In other words, they are the effects of the independent variables on the dependent variable without considering any interactions or moderation effects.'>lower-order effects</a> refer to the main effects!</p> </div> --- ## Probing Interactions - If we find a significant moderation effect, we need to follow it up to understand *how* the relationship between the predictor and the outcome changes at different values of the moderator + Remember that a moderation can occur from differences in effect <a class='glossary' title='Using a categorical moderator as an example, this means a significant relationship between the predictor variable and the outcome variable is present for one group, but absent for the other group'>presence</a>, <a class='glossary' title='Using a categorical moderator as an example, this means the relationship between the predictor variable and the outcome variable is stronger for one group, and weaker for the other group'>size</a>, or <a class='glossary' title='Using a categorical moderator as an example, this means the relationship between the predictor variable and the outcome variable is positive for one group, and negative for the other group'>direction</a>... + Without probing the interaction further, we don't know what's actually happening in this relationship - We can use two techniques to follow up a significant interaction effect: + <a class='glossary' title='Simple slopes analysis involves calculating separate regression slopes/linear models (simple slopes) for the predictor variable at different levels of the moderating variable. Typically, simple slopes are calculated at specific values or intervals of the moderating variable such as -1 SD (low), the mean, and +1 SD (high). After calculating the simple slopes, we can interpret how the relationship between the predictor and the outcome changes across different levels of the moderator. We can examine whether the slopes are significant and in which direction they are trending.'>Simple Slopes</a> + <a class='glossary' title='Johnson-Neyman intervals identify the range of values for the moderating variable where the relationship between the predictor variable and the outcome variable changes from statistically significant to statistically nonsignificant, or vice versa.'>Johnson-Neyman interval</a> - These tell us the coefficient for our predictor (i.e., the effect it has on our outcome) at different values of our moderator --- ## Simple Slopes Analysis - Here we compare the relationship between our predictor and our outcome, at low, mean, and high levels of our moderator (using SDs) - We get models of parental maths anxiety and children's maths anxiety at **low** parental homework help (-1 SD), **mean** parental homework help, and **high** parental homework help (+1 SD) .pull-left[ - We can then look at the **significance** of these slopes, the **value/size** of our *b*, and the **direction** to see how the relationship between parental maths anxiety and children's maths anxiety changes at different levels of our moderator parental homework help ] .pull-right[ <img src="data:image/png;base64,#img/slopes.png" width="100%" /> ] --- ## Simple Slopes Analysis - The interactions plot displays this same information much nicer: .pull-left[ <img src="data:image/png;base64,#index_files/figure-html/unnamed-chunk-41-1.png" width="100%" /> ] .pull-right[ + When homework help is high (+1 SD from mean), parental maths anxiety is strongly positively related to children's anxiety scores + At the mean of homework help, parental maths anxiety is positively related related to children's anxiety scores + When homework help is low (-1SD), parental maths anxiety is more weakly positively related to children's anxiety scores ] --- ## Johnson-Neyman Interval .pull-left[ - Instead of only looking at low, mean, and high values of our moderator, we can look at many values of it with the <a class='glossary' title='Johnson-Neyman intervals identify the range of values for the moderating variable where the relationship between the predictor variable and the outcome variable changes from statistically significant to statistically nonsignificant, or vice versa.'>Johnson-Neyman interval</a> - This interval estimates the model of our predictor and outcome, at lots of different values of our moderator - We get a 'zone of significance', i.e., the interval in which the relationship between our predictor and outcome is significant ] .pull-right[ <p style="text-align:left; font-size:75%">JOHNSON-NEYMAN INTERVAL<br> When parent_hw_help is OUTSIDE the interval [-0.03, -0.02], the slope of parent_hw_help is p < .05.</p> <img src="data:image/png;base64,#index_files/figure-html/unnamed-chunk-43-1.png" width="90%" /> ] - The black line is where the relationship between our predictor and outcome is 0, above it is positive, below it is negative --- ## Reporting Moderations - There's 3 key pieces of information to report for a moderation: the **main effects**, the **interaction effect**, and then a **simple slopes analysis**/**Johnson-Neyman interval** if a moderation was found: <p style="font-size:75%"> "At the mean of parental homework help, there was a significant positive relationship between parental maths anxiety and child maths anxiety, <i>b</i> = 0.51, <i>t</i> = 28.10, <i>p</i> < .001, 95% CI [0.47, 0.54]. At the mean of parental maths anxiety, there was a significant negative relationship between parental homework help and child maths anxiety, <i>b</i> = -166.75, <i>t</i> = -4.19, <i>p</i> < .001, 95% CI [-245.05, -88.46]. <br><br> The interaction between parental maths anxiety and parental homework help was significantly related to child maths anxiety, <i>b</i> = 23.96, <i>t</i> = 6.05, <i>p</i> < .001, 95% CI [16.16, 31.75]. <br><br> When parental homework help is low (-1 SD), there is a significant positive relationship between parental maths anxiety and child maths anxiety, <i>b</i> = 0.34, 95% CI [0.27, 0.40 ], <i>t</i> = 9.97, <i>p</i> < .001. At the mean of parental homework help, there is a significant positive relationship between parental maths anxiety and child maths anxiety, <i>b</i> = 0.51, 95% CI [0.47, 0.54 ], <i>t</i> = 30.04, <i>p</i> < .001. When parental homework help is high (+1 SD), there is a significant positive relationship between parental maths anxiety and child maths anxiety, <i>b</i> = 0.68, 95% CI [0.62, 0.73 ], <i>t</i> = 22.6, <i>p</i> < .001." </p> <br> <div class="tu" style="font-size:90%"> <p><b>Top Tip!</b> If we're using grand mean centring, the effects should be interpreted at the mean values of the variables!</p> </div> --- ## Reporting Moderations - We could also include a table of our results, something like this 😍: <br> .center[ <div class="tabwid"><style>.cl-a659de98{table-layout:auto;}.cl-a65200ec{font-family:'Times New Roman';font-size:12pt;font-weight:normal;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-a6520100{font-family:'Times New Roman';font-size:12pt;font-weight:normal;font-style:italic;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-a654fc70{margin:0;text-align:center;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);padding-bottom:5pt;padding-top:5pt;padding-left:5pt;padding-right:5pt;line-height: 2;background-color:transparent;}.cl-a654fc7a{margin:0;text-align:left;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);padding-bottom:5pt;padding-top:5pt;padding-left:5pt;padding-right:5pt;line-height: 2;background-color:transparent;}.cl-a65511e2{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0.5pt solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-a65511ec{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-a65511f6{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-a65511f7{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-a6551200{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}</style><table data-quarto-disable-processing='true' class='cl-a659de98'><thead><tr style="overflow-wrap:break-word;"><th class="cl-a65511e2"><p class="cl-a654fc70"><span class="cl-a65200ec">Term</span></p></th><th class="cl-a65511e2"><p class="cl-a654fc70"><span class="cl-a6520100">b</span></p></th><th class="cl-a65511e2"><p class="cl-a654fc70"><span class="cl-a6520100">SE</span></p></th><th class="cl-a65511e2"><p class="cl-a654fc70"><span class="cl-a6520100">t</span></p></th><th class="cl-a65511e2"><p class="cl-a654fc70"><span class="cl-a6520100">p</span></p></th><th class="cl-a65511e2"><p class="cl-a654fc70"><span class="cl-a65200ec">95% CI</span></p></th></tr></thead><tbody><tr style="overflow-wrap:break-word;"><td class="cl-a65511ec"><p class="cl-a654fc7a"><span class="cl-a65200ec">Intercept</span></p></td><td class="cl-a65511f6"><p class="cl-a654fc70"><span class="cl-a65200ec">40.60</span></p></td><td class="cl-a65511f6"><p class="cl-a654fc70"><span class="cl-a65200ec">0.31</span></p></td><td class="cl-a65511f6"><p class="cl-a654fc70"><span class="cl-a65200ec">130.96</span></p></td><td class="cl-a65511f6"><p class="cl-a654fc70"><span class="cl-a65200ec">< .001***</span></p></td><td class="cl-a65511f6"><p class="cl-a654fc70"><span class="cl-a65200ec">[39.99, 41.21]</span></p></td></tr><tr style="overflow-wrap:break-word;"><td class="cl-a65511ec"><p class="cl-a654fc7a"><span class="cl-a65200ec">Parental Maths Anxiety</span></p></td><td class="cl-a65511f6"><p class="cl-a654fc70"><span class="cl-a65200ec">0.51</span></p></td><td class="cl-a65511f6"><p class="cl-a654fc70"><span class="cl-a65200ec">0.02</span></p></td><td class="cl-a65511f6"><p class="cl-a654fc70"><span class="cl-a65200ec">28.10</span></p></td><td class="cl-a65511f6"><p class="cl-a654fc70"><span class="cl-a65200ec">< .001***</span></p></td><td class="cl-a65511f6"><p class="cl-a654fc70"><span class="cl-a65200ec">[0.47, 0.54]</span></p></td></tr><tr style="overflow-wrap:break-word;"><td class="cl-a65511ec"><p class="cl-a654fc7a"><span class="cl-a65200ec">Parental Homework Help</span></p></td><td class="cl-a65511f6"><p class="cl-a654fc70"><span class="cl-a65200ec">-166.76</span></p></td><td class="cl-a65511f6"><p class="cl-a654fc70"><span class="cl-a65200ec">39.80</span></p></td><td class="cl-a65511f6"><p class="cl-a654fc70"><span class="cl-a65200ec">-4.19</span></p></td><td class="cl-a65511f6"><p class="cl-a654fc70"><span class="cl-a65200ec">< .001***</span></p></td><td class="cl-a65511f6"><p class="cl-a654fc70"><span class="cl-a65200ec">[-245.05, -88.46]</span></p></td></tr><tr style="overflow-wrap:break-word;"><td class="cl-a65511f7"><p class="cl-a654fc7a"><span class="cl-a65200ec">Parental Maths Anxiety x Parental Homework Help</span></p></td><td class="cl-a6551200"><p class="cl-a654fc70"><span class="cl-a65200ec">23.96</span></p></td><td class="cl-a6551200"><p class="cl-a654fc70"><span class="cl-a65200ec">3.96</span></p></td><td class="cl-a6551200"><p class="cl-a654fc70"><span class="cl-a65200ec">6.05</span></p></td><td class="cl-a6551200"><p class="cl-a654fc70"><span class="cl-a65200ec">< .001***</span></p></td><td class="cl-a6551200"><p class="cl-a654fc70"><span class="cl-a65200ec">[16.16, 31.75]</span></p></td></tr></tbody></table></div> ] <br><br><br><br><br> <p style="text-align:left; font-size:50%">*these results are fictional</p> --- ## Summary - <a class='glossary' title='Mediation analysis is a statistical method used to explore the indirect effect of a predictor variable on an outcome variable through one (or more) intervening variables, known as mediators. In other words, it examines the mechanism or pathway through which the predictor influences the outcome.'>Mediation</a> occurs when the relationship between two variables can be explained (either in part or in full), by another variable - We start with a total effect (the simple relationship between predictor and outcome), and we partition this into a direct effect & an indirect effect - We can test for mediation by investigating the size of an indirect effect - if the effect is significant and the CIs don't include 0, we assume a mediation effect does exist - <a class='glossary' title='Moderation analysis is a statistical technique used to examine whether the relationship between two variables (the predictor and outcome variables) changes depending on the level of a third variable, known as the moderator'>Moderation</a> occurs when the relationship between two variables changes as a function of a third variable - We should centre our predictor and moderator before analysis to make the *b*s interpretable - If a moderation effect is found we can use <a class='glossary' title='Simple slopes analysis involves calculating separate regression slopes/linear models (simple slopes) for the predictor variable at different levels of the moderating variable. Typically, simple slopes are calculated at specific values or intervals of the moderating variable such as -1 SD (low), the mean, and +1 SD (high). After calculating the simple slopes, we can interpret how the relationship between the predictor and the outcome changes across different levels of the moderator. We can examine whether the slopes are significant and in which direction they are trending.'>Simple Slopes</a> analysis to explore the relationship between our predictor and outcome, at different levels of our moderator - & finally, **correlation doesn't equal causation!!** --- ## *That's all - happy modelling!* <br> <br> .center[ <iframe src="https://giphy.com/embed/k83fBZ8YfpGLzJwXvx" width="576" height="319" frameBorder="0" class="giphy-embed" allowFullScreen></iframe><p></p> <br> [Give session feedback here!](https://forms.gle/ZyXAB7kZzUUyct9n6) 😀 ]