Psychology week 6 assignment
the number of traffic accidents, I think. All right, good. So our recording is started and I will start my screen share. So if you all have taken a peek at the work this week, I'm sure you're relieved to see that you're only required to do your discussion post this week and the assignment is completely optional. So if you want to complete the assignment, I will grade it and those points will go toward your final score. If you don't want to, you don't have to. If you just want to play around with it and email me later in the week, if you want to test out some of these more complicated techniques, I'm happy to take a look at your work. But if you need a little downtime this week, you want to start taking a look at your big project for next week and get a jumpstart on that, we give you a little bit of downtime here in week six to choose to do that if you want. So starting off with a little relief. Okay. So this week, week six, we're going to get into moderation and mediation, but I want you all to understand how this builds upon multiple regression. So in the last couple of weeks, you all have learned about regression. and then last week you learned about multiple regression. So you've learned that multiple factors, it's rarely just one factor. Often it's multiple factors that predict various outcomes. Those variables work together. And in those type of research designs, it's really important to control for confounding variables and to be able to parse apart the unique contributions of each factor or predictor. So now what we're going to do is go a little bit deeper. So we don't just want to know what variables predict what and what percentage of variance they explain. We also want to be able to ask more meaningful questions like, how do these relationships actually work? When are they the strongest? Why do some interventions work better than others? Or, for example, for whom? Are there certain groups of folks that treatments tend to work best for? So in order to tease apart those things, we need to look at our options for mediation and moderation. So the best way to remember these two concepts, you all, so statistical mediation, that gives you the how and why for an effect. So it's essentially explaining the effect of an independent variable or predictor on the dependent variable. It's telling you how that effect happens or why it happens. So mediation actually explains those mechanisms, identifies the specific pathways from variable to mediator to outcome, and reveals those processes if they exist. So that's mediation. It's the how or the why. Now moderation, this refers to when or for whom. So either of these can be categorical or continuous, but when we think of moderation, many of them happen to be categorical. So when does this happen after an intervention, after six months of an intervention, or for whom does it work? Does it work better for men or for women or for other people with anxiety versus those with mainly depressive symptoms? So it gives us that when or for whom. It helps us identify the conditions, show the boundaries of the effect, and reveal those meaningful contexts, okay? So let's first dig a little bit more into the types of variables in mediation. So as I was just mentioning, they can either be, the independent variable can either be categorical or continuous. So remember, categorical variables are when you're only in one category or the other. So you would be either in the treatment group or in the control group, right? Or your independent variable could be continuous. It could be on a numerical scale. So for example, your level of stress, you might be at zero or you might be at 100. So that could also be the predictor. They could be categorical or continuous. But mediators tend to be continuous. They absolutely must be measurable. So this is often why we find them, why we use continuous variables in these types of analyses. And we expect them to vary naturally. So stress level is a great example because we all have naturally different varied levels of stress. So, that's what that naturally varying means. So, that refers to the independent variable, typically continuous, although not always. Now, your dependent variable can be either. It can either be continuous or categorical. There are different statistics for the different types. So, they kind of follow those regression models. So, if you have a continuous outcome, you could do the linear type regression with the mediation. And if not, you would need to do some logarithmic transformations. You would need to do the non-parametric. So, those are different statistics for different types. And your choice of outcome, well, your choice of all affects the type of analysis that you actually conduct. All right. So when we think of, when we use mediation in practice, we are always going to build these little models to help you understand what's happening. So say that our research question was, how does stress affect academic performance? So consider stress as being the independent variable and academic performance like GPA being the outcome variable. So, we know that relationship exists, but how or why does that relationship exist? So, there are possible mediators of that relationship between stress and academic performance. So, some of the three most common would be the quality of your sleep. So, if you're stressed out and you're not sleeping well, that's going to have a negative effect on your academic performance. And vice versa, if you're sleeping really well, that can help improve. Ultimately, you decrease your stress and improve your academic performance. So same kind of mediation relationships possible with the other variables like study habits and test anxiety, just off the top of my head there. So those would be the mediator. Any one of those could be a potential mediator that explains this relationship, okay? So to help you understand mediation, as I mentioned, this is a variable that explains how or why an effect happens. So here's an important thing. There must be a causal sequence to use mediation. So, the independent variable must come first, then it's followed by the mediator, and then the outcome is measured after. So, we must have that causal sequence to be able to draw meaningful conclusions from mediation. So, some good examples that demonstrate that. So, say that we first gave you some kind of new treatment intervention and then measured your coping skills and then measured outcomes. So, the independent variable must always come first. So, then the second one, you experience some kind of training that should impact your knowledge, which should then impact your performance. Similarly with stress, if you are stressed, that's going to affect your sleep, which will ultimately affect your overall health. So mediators are essentially explaining that path, that causal path for how or why we see this effect. So that temporal order is important there, meaning that we have to have the independent variable followed by the mediator followed by the outcome so how do we go about testing mediation well think of it if you break it down it's very simple we test the whether or not x predicts y so that direct relationship that we're interested in if the independent variable predicts the dependent variable and then we test whether x the independent variable predicts our mediator and then we test whether our mediator predicts the outcome while controlling for the independent variable and here's the cool thing that mediation allows us to do is we see if the effect of the independent variable on the dependent variable is reduced when controlled, when we control for the mediator. So, it allows us to see, does that, so there can be partial mediation or full mediation. If that effect reduces, we would call that partial mediation, and if the effect completely disappears, that would be considered full mediation. Okay, so then let's move on to moderators. Now, typically, we're going to think about categorical independent variables for moderation. OK, so things like gender or treatment group or any kind of category that you'd be interested in, work sector, political orientation, any any category. And the analysis focuses on the difference among groups using an ANOVA framework, and we make those multiple group comparisons, okay? So, we need a categorical predictor, and then we need a continuous outcome. So things like age or personality scores, anxiety scores, depression scores, test scores, any continuous outcome that you might be interested in measuring. And we do this with the regression approach and looking at the interaction terms between all of those possible group comparisons. And we plot them in moderation at plus or minus one standard deviation. Okay. So here's a nice illustration of moderation. So say this research question is, when is test anxiety most harmful? So the predictor is test anxiety and harm is the outcome. So look at this little model here. The predictor is test anxiety. The outcome is harm. So then what are things that could completely change or alter the effect? So that's what moderation does. It tells us when does this happen or for whom does this effect happen? So potential moderators could be course difficulty. So a really easy class versus a really difficult class. That could absolutely explain those four in a more difficult class are likely to have higher test anxiety. Student ability level would be another good moderator to consider. students who um struggle with mathematics with math concepts are more likely to have test anxiety going into an exam than students who are really great at math so looking at those those different groups so we can see when or for whom we expect this effect to be most evident Another potential moderator here is support resources. Students who have greater levels of support are most likely to experience less test anxiety and experience less harm, ultimately. Okay, so in understanding moderation, in contrast to mediation, which fully explains the relationship, it tells you how or why it happens, moderation changes the relationship strength or direction based on the groups, based on which category. So this allows us to look more closely at boundary conditions, which is really helpful. So some good examples of this would be looking at treatment effects that vary by age. So younger children might benefit more from an early reading intervention than high schoolers, for example. Or maybe an intervention works better for some groups, those who have really low anxiety versus those with really high anxiety. Or if their relationship changes across contexts, right? So, in order to test moderation, the first thing you must do is to center your continuous variables. So, that involves calculating the mean and then creating a new centered variable where you subtract the mean from every score in the distribution in your data set. And then it centers it where your mean becomes zero and your standard deviation, well, not the standard deviation, it centers it so that your mean becomes zero. Then you will create your interaction term. So looking at the two variables together, you'll test the significance, plot the interactions in a visual, and then test the simple ******, which you're familiar with from regression. Oh, that moved quickly. Okay. So as if you wanted it more complicated, often what we do is use a combined approach. So there are two ways you could go. You could do a moderated mediation where mediation varies across the level of moderator, or we could flip it and have a mediated moderation where we're trying to understand why the moderation occurs using mediation. So, here's an example of a path diagram combining those two, trying to look at the effect of manipulation of control and stressors on perceived control and outcomes. okay so about categorical variables in moderation and mediation well in moderation many moderators are categories so for example does stress affect men and women differently does the treatment work better for younger versus older individuals do treatment effects vary by education level So anytime you're dealing with those categories, you will need dummy variables also to be able to make comparisons. So you'll learn more about that in the future. In mediation, treatment studies often use mediation for things like the category of treatment, looking at the potential mediator of coping skills on the outcome. Another example would be the control versus the intervention. That's effect on attitude and that's effect on ultimate behavior. Program A versus B with knowledge and performance. So anytime we have categorical variables as our predictors, you're going to need dummy variables. So it's just, so for example, with the program A versus B, to dummy code that, we would go through and give everyone who was in program A a zero and give everyone in program B the one. And so it would be all zeros and ones, and that allows us to, and allows the statistical software, rather to do the analysis and tease apart the effect of those different levels on mediators and outcomes as the moderator. Okay, so dummy coding. This is really the perfect time to start learning about this. So, in these types of analyses, you're asking questions about how and when. So, as you've realized, many of these involve groups or categories. Real research is often comparing groups. So, most published studies are using dummy variables. Common applications are things like treatment evaluation for treatment versus control, group differences like for gender and age groups, multiple conditions like different types of programs, and then longitudinal changes like before, after, five months, five years after. So for each number of categories, for whatever your number of categories are, you will need one fewer than that dummy codes. So let me try to walk you through this with an example, and hopefully it starts to make sense. So if you only have a binary choice, like two groups, then as I was saying earlier, you would label one group as a zero and the other group as a one. But if you have multiple groups, you would need multiple dummy codes. You always have one fewer dummy than the number of groups that you have. So here's an example to try to make this make sense. So say we had a treatment study, the control group, I would label them zero and the treatment group, I would label them as one. And running that analysis, I would then be able to interpret that the effect I see is the difference from the control group. So we're holding this constant while testing the effect of the treatment group to see how different it is from the control group. So that's pretty straightforward. But now let's ramp it up to three categories. So say we have three education levels. Your reference is the closest you get to baseline in your group. So we'll make high school the reference category, and that will be zero comma zero. So it's zero on both levels. And then we're going to need to code college. So a bachelor's degree as a one and then a zero. And then for a graduate degree, we would code that as a zero and then one. That way we're able to look at, we can compare all of those groups to each other individually. So we compare, I'm sorry, compare each of those college while holding graduate constant and graduate while holding college constant. We compare all of those to the reference group of high school. I know it's still probably a little overwhelming. It's really not that bad, But tips for analysis with this is that you want to make sure you choose a meaningful reference group to label your groups clearly in your output so you don't get confused on interpretation with your zeros and ones. Remember that the coefficients that you're looking at are differences from the reference group. And you actually must report the reference group in the results so that we know what's actually being compared. Okay. So, when it comes to interpreting results from these types of analyses, we are going to look at effect sizes. So, the direct effects we look at first, that tells us the relationship strength between the variables, the independent and dependent variables that we're interested in. that's the direct effect. The indirect effect is the strength of that mediation pathway. So as with many stats, sample size affects detection of both of these, the direct and indirect effects. And you typically, in order to get strong enough power, you're going to need a much larger sample for a mediation analysis. So how do we test and interpret these? Well, there are traditional versus bootstrapping approaches, looking at direct versus indirect effects. You might have a partial mediation versus a full mediation. When it comes to moderation, you're going to interpret those simple ****** and overall look at your regions of significance. So effect sizes and confidence intervals are very important here. When do you want to use these types of designs? Well, when you want to test theory, if you want to develop a new intervention or do a program evaluation, plan some kind of treatment, or make informed policy decisions. These are great analyses that allow you to, as we've been saying, look at the how or why or the when or for whom. or combine those things um luckily for us there are so many easy easy um software options so in spss you would just download the case process macro it's just a little add-on um In Jamovi, there's a MedMod add-on that you can use, I've done that. You could do structural equation modeling, gets pretty complex. R packages, that's a nice free statistical software online that is syntax-based. There are also other built-in regression commands, like those I mentioned in Jamovi. um when using these types of analyses just um critical things to think about and things to avoid first um as i said there are key causal requirements in these types of analysis so that temporal precedence meaning the independent variable came first that matters x must come before M, the mediator, and the mediator must come before the outcome. So in cross-sectional studies, like dissertation researchers often do, we end up with the limitations. When they answer everything all at once, it can be problematic for mediation analysis because it requires that temporal precedence. Another issue in analyses, sometimes researchers will have a continuous moderator, like using stress, for example, on a 100-point scale, and will try to split that into categories. And this isn't the best way to go about that. It can cause issues. You'd have to really justify that decision based on the literature. You want to check for multi-colonarity, meaning variables are too closely related to one another. Make sure you test all the assumptions associated with those statistical tests. Detail any missing data. And make sure that you've considered alternative models before going to one of these more complex models. So, interpreting these results can sometimes be challenging because non -significant results can still be meaningful, as you all have been learning. Effect size matters more than p-values. We still have to consider the practical significance. Multiple mediators can compete with one another in explaining the effect of the independent variable on the dependent variable, so that can get messy, and the context in which you collect the data, your research design affects how generalizable the results are to the larger population. All right, so best practices are to use theory-driven models to test your hypotheses, use quality measures in your study, so find good measures that are already out there in the literature that have shown to be reliable and validated. Do your power analysis to make sure you have the appropriate sample size. When you create graphs and figures for your audience with your results, make sure those are clear and ultimately that you're interpreting everything properly. Alrighty. So now your week six discussion, you will read the work by Barron and Kinney and McKinnon. And then in your discussion, talk about the properties of mediator and moderator variables. What are the differences? Why is it important to be able to distinguish the difference. And then as part of your original post, I would like you to find one article in your area of interest that used a mediator or moderator model and then provide a brief description of the article. So the results, as much of the results as you can understand. And make sure you are attaching the original article that you described so I can check that. Now, an important point here, you need an original empirical article, so not something, not like a literature review or something like that. So, it should have a method and results section to qualify. And then be sure that you identify the independent and dependent variables and the mediator or moderator in that article. All righty. um up here stop sharing all right how we doing i always imagine you all as like little cartoons with smoke coming out of your ears when i'm coming off the the lecture is that how it feels that's right like will you be discussing the extra credit or do you kind of just want that to be on our own yeah so it's extra credit and so it is absolutely not required take a look at it give it a shot if you have questions for me i am happy to answer your questions okay yeah those the analyses are actually i used a moderated a complicated moderated mediation analysis on my dissertation but it was it it allowed me to really look at different categories of instruction types and other potential mediators that were affecting my ultimate outcome. So it's pretty fun to play around with. Y'all are quiet. So for usual, if you have, if you don't have any questions, comments, concerns about this, you are free to go read those articles, do your discussion posts this week, and then start thinking ahead to next week. And let me know if you have questions. Okay, thank you. Thank you. Have a good one, Latasha. Okay, bye. Thank you. Thank you. You guys have a nice evening. Thanks, you too, Kevin. All right, good night. All right, bye-bye.