Moderation and Categorical Predictors (Regression Part III)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
and the the radio Mike's got missing I don't I don't know why probably someone's forgotten to take it off after the lecture so you know you hear the sound of someone urinating in the middle of a lecture that's that's that's probably them still wearing the radio Mike it's not me I promise um today's lecture is it's kind of a linking lecture which is why there's kind of no practical class attached to it and it's a linking lecture between the regression stuff that we've been the linear model stuff that we've been doing for most of the most of the term and a bunch of stuff on kind of an overall of analyzing experiments essentially that we're moving on to next week so this is kind of linking the two together to hopefully make that transition a bit easier so oh yeah the music was there's an example about video games and that was an ac/dc song that has video games loosely mentioned in it it gets more tenuous as the term goes on and so what our learning outcomes for today well I'm mainly going to talk a bit about so we've looked at the linear model and we've looked at having one predictor we've looked having lots of predictors but so far all the predictors that we've had have been continuous variable so they've been things like advertising budgets on a nice or continuous scale from spending no money at all on advertising to spending lots of money and we haven't really well we haven't at all looked at what happens if you want to put categorical predictors into a linear model so the first bit of today is really going to be looking at category lictors and he just came to the ac/dc song and so looking at categorical predictors and that essentially is the link to to all the stuff we're moving on to next week so looking at how you can use categorical predictors in a linear model the other thing we're going to look at is something called moderation which are obviously I'll explain later but the the reason for going into this kind of now is again it's a bit of a precursor to some of the stuff we're going to cover later in the module so as we in a couple of weeks time we're going to move on to sort of quite complicated experimental designs and we're going to look at lots of what are known as interactions and so again this lecture is just the concept of moderation is really tied in with interaction so it is this is also setting at like I say it's just linking the two halves of the course if you like so to begin with and I'm sorry to regret this example a little bit because I spent last night going and watching my favorite soccer team get hammered at home very late night and you don't mind a late night when you come back or victorious but when you get tonked and you know you're getting a train back to Brighton that 11 o'clock you kind of feel a bit miffed um so you know if I look depressed in this example it's not I don't like elephants it's just that I don't like football at layman with football aids example the cheery song this particular elephant he has paid like 200,000 pounds a week now I'm sure in reality elephant football is probably hideously cruel and they and what I dread to think what goes on behind the scenes but it is quite keep watching elephants kicking a ball around and now elephant football is quite a big deal in some as you saw you know there were crowds of plenty watching the elephants there's also massive rivalry between Asian and African elephants as you may know you know African Asian elephants are quite different to each other they are different sized ears slightly different parents I thought I seem to remember reading something that their mouths were a bit different or something and you know obviously from different continents as well so just like in in this or human World Cup of football but there's great rivalries amongst different countries and different continents the same is true at elephant football and it all kicked off about two or three years ago when you know how likely the presidents of these big organizations always put their foot in it and the that the head of the Asian elephant Football Association because it's an elephant I had a particularly big foot that he could put into it and he in a press conference he made this claim that Asian elephants were better than African elephants at football so you know I don't have the video clip of it but you know he's in the conference for this prompt anyway I lose it over that's a burn Africa once our elephants do I'm not really sure and of course you can imagine the African elephants were really miffed about this you know because they like no no we're better so that the head of the African elephant Football Association it's also called the AEF he taught in over eight corner press conference the next day and he turned up and basically he said to the world's press I don't take seriously any comment by someone who looks like an enormous scrotum the head of the Asian Football Association was incensed said I don't do it like a scrotum African elephants look like scrotums I know what the plural of scrotum is screw sir maybe and it's not something I stood well on I suspect and in that you know then the head of the African elephant air Football Association yeah he came it all kicked off they were practical to have a fight so what they decided to do in the end is to call me in to settle the debate this happens a lot you know when there's world problems they got on the phone to me they say Andy collected some data sort it all out so that's what I did over the course of a season of elephant football I am I collected data about how many goals different elephants scored and from which continent they were from so I had 60 60 Asian elephants that I tracked throughout the season and 60 African elephants that I tracked throughout the season so I've got some data a bit like this so I've obviously only put it all off because it's long it but essentially we've got a group of Asian elephants and we've got a group of African elephants and they win sixty sixty of each but like I say have any little little song drops give you the gist of it and what I did was across the whole season I measured how many goals they scored so this Asian elephant here you scored one goal over the whole season he was probably a defender maybe um so you know anyway so I've got lots of lots of scores of how many gold zones they scored and these are the means within the two groups so the asian elephants across the whole season the average amount of gold that an Asian elephant scored over season of elephant football was three point five goals so the African elephant you're slightly higher is four point six goals now this is these these means are going to become relevant later on the thing I want you to notice is if we want to if you want to put a categorical variable into a linear model so let's say we wanted to create a linear model and we wanted to predict the number of goals scored based on something categorical for example whether the elephant was from Asia or from Africa so we've got a very very simple model we're predicting goals and we're predicting it from two two categories whether an elephant is an Asian elephant or African the way to do that is we need to assign some kind of codes to the groups so we need to say you know because we can't put letters into a linear model we have to put numbers into it so we need to assign numbers to the two groups and one way of doing this and if you're doing regression it's it's quite important way to do it is to use zeros and one so you use a binary coding so the only values you're allowed are 0 & 1 it doesn't particularly matter which way around we do this but for for the sake of argument I have assigned to the Asian elephants a code of zero and the African elephants a code of 1 so what I'm putting into my linear model I'm not putting in the words Asian and African I'm doing the sort of numerical equivalent which is putting putting zeros of ones in so when there's a zero means Asian elephant when there's a 1 means African elephant the other thing I want to draw your attention to at the moment is what the difference between these two means ours if we took the mean in African elephants which is four point six and Vic and subtracted from it I mean at the Asian elephants to three point five three we end up with this value 1.08 and that's important value to remember for some of the slides that are coming so things remember at this point we've got some Asian elephants we got some African elephants we've kept to date about how many goals each one of them scores over the season we know that the average amount of goals scored for an Asian elephant is 3.5 we know that the average amount of goals scored for an African elephant is 4.6 we also know that the difference between those two values is about 1.08 so like I said these values are important so I'm overriding the pudding here we've got a difference between the average amount of goal was scored by asian-african other elephants the 1.08 that's just kind of help you visualize that difference so if we want to use a linear model in this context that's fine we can do it we can put in categorical variables as predictors in linear models and that's absolutely fine when we do as I said we have to code the scores so we have to coach the group memberships of the things that we're putting into the linear model so in this case we need to code whether it's an African or Asian elephant using using numbers now in a couple weeks of time we're going to look at other ways of coding groups but for the time being we're going to use a system known as dummy coding and dummy coding is just this this use of zeros and ones like I said there are other ways that you can do it and we're going to look at them later in the course for the time being just imagine we can only use zeros and ones so this is what our model looks like so we've got a very very familiar linear model we've been dealing with this all term so far so hopefully it's ingrained in your mind so we're predicting an outcome in this case that's the number of goals scored and the little subscript eyes mean we're just predicting it for a particular you know elephant in this case we're predicting it from a variable X from a predictor variable and in this case our predictor variable we could replace that X with something that makes more sense to us like elephant type so whether it was an age elephant so this variable here as I've already said can can be two values it can be a zero or a one zero would mean Asian elephant one will mean African now the question is what happens to the the intercept and what happens to the the gradient for one a better order or the parameter for elephant type what happens when we use categorical variables what are these values what do they represent so that's what we're going to look at now but the basic system is there is the same as everything we've covered before we got linear model we've got a predictor just so happens that predictors categorical that's no problem providing that we use uh sort of a system of coat and numerical coding that you know kind of makes sense if you like so dummy coding if we use this dummy coding this zero one coding what happens to the the intercept or the constant in the model well remember our dummy coding at the moment we've coded it this way around like I say that was an arbitrary decision there's nothing magical about assigning zero to Asian elephants and wanted to Africa and it's just why I decided to do and it's no particularly big deal and the question is what's our outcome going to be if if we if we if we take a particular category now the outcomes are going to be because basically we've got sort group membership the thing that the model is going to predict is basically the mean of the group so in terms of what why the expected value of y is going to be it's going to be the mean of each group so if it's if we if we were to set elephant type as being Asian the models going to predict the mean of the Asian elephant group so let's look what happens so when when elephant is Asian let's assume we were going to put you know Asian into the model so when elephant type is Asian we know that the variable that we've called elephant type this is the X in our model that will be zero we know that because that's the that's the way around we chose to code things what's the predicted number of goals going to be if you're an Asian elephant well basically it's going to be the meat of that of that Asian brie so if we look at our equation we're predicting the number of goals we're predicting it from the type of elephant we have and the question I asked a little while ago was what happens here what was the deal with these data values well let's try plugging some of the numbers in so first of all if we're looking at Asian elephants then elephant type becomes zero so this value here of elephants life we can replace with zero and that has the convenient effect of canceling this whole bit of the model out I also said well what we're going to predict if we know that an elephant is Asian what's house or what's the best prediction we're going to have because we're dealing with grouped the best prediction we can have is the Greek mean essentially so this outcome will be the mean of the group that we're dealing with and remember we're just looking at Asian elephants now so our outcome is the mean of the Asian elephant group so that means by putting a by putting elephant type a zero which is represent Asian elephants we get rid of that you can scrub that out of the equation and that leaves us with just the intercept so the intercept is going to be equal to the mean of the Asian elephant group now more generally than that when we use this system of coding the the intercept the the the value of the outcome when the predictor is zero is going to be the mean of whichever group we coded as zero so because we coded Asian elephant to zero the intercept or the the constant in the model will be the mean of that group to the coders zero so basically b20 is the mean of the Asian elephant group so how do we find out what beta 1 is going to represent so the you know the gradient if you like we can talk about gradients but you've only got one predictor well we can do the opposite now and look at African elephants so we say what's the model going to give us if we make a prediction about African elephants so what happens to the variables in the model well we know African elephants we coded as 1 not 0 so our variable elephant type will be the value 1 rather than the bound 0 also what are we going to predict if we know that an elephant is an African elephant what what's our best prediction that we can have about the number of goals they scored again because we're dealing with groups our best prediction will be the mean of that group so I'll predict it outcome the predictive number of goals you should get from the model will be the mean of the African elephant group so we can look at our linear model again so you know as before we're predicting the number of goals we're predicting it from a single categorical predictor which is the type of elephant we've got these beta values in and now we're dealing with African elephants our outcome so we can replace goals with our predicted value our predictive value will be the mean of the African group elephant type because we're dealing with African elephants now and we code in African elephants with a one that elephant type variable will be on one so once we plugged those sort of values in what do we end up with but we end up with our predicted outcome is the mean the African elephant group and we got B to 1 and B to 0 sitting around now the thing is we already know what B to 0 represents we just did that on the previous slide and it represented the mean of the Asian elephant group so what we can do is replace this piece of zero with the mean of the Asian elephant group so then our linear models become well our outcome is is the mean the African elephant group we've got this kind of gradient or coefficient and we don't really know what it represents yet and we've got our beta 0 which is the mean of the Asian elephant group now all we have to do is work out what B to 1 represents is to jiggle that equation around a bit so essentially what we do is we bring this over to the other side of the equal sign so we want to get B to 1 on its own and to do that we bring this over and when we bring it over it becomes negative because we're switching the side of it so essentially we bring this over here so we'll get the media the African elephant group minus the mean of the Asian elephant group and that's what's written down the bottom so b21 the gradient if you like it's going to represent the difference between the two group means so when you have a categorical predictor with two categories and and you use this kind of zero one dummy coding to two specifying your groups you end up with a linear model just like every other linear model that we've been dealing with but the b20 and the b21 have kind of a 1 it's not really a special meaning but they have a specific a specific interpretation so the b20 is going to be the mean of the base what we call the baseline group so that's the group you coded with a 0 essentially and the beater 1 the gradient is going to represent the difference between those two means so let's have a look at this graphically which might hopefully make a bit more sense so these dots represent all the scores for our Asian elephants and these dots represent all the data points for the African elephant so we've got enough I'm not sure the drawee things working today will give a go then there you go so remember Asian elephants are coded with zero and African elephants are coded with a 1 so this is our model this is the model that we're fitting to the data so these dots are the raw scores from both groups respectively now if you think about when we've talked about linear models we've talked about you know what the what the Interceptor what b20 represents what the constant represents and it represents the value of the outcome when the predictor is 0 so if you locate when the predictor is 0 when we're dealing with Asian elephants what's the predicted value well it's the mean of the Asian elephant group so that's what that in red dotted line is so when I predicted zero we get a value of goals scored which is equal to the mean of that group so that's the square there so our intercept our constant is going to be three point five three three which remember is the mean of the elephant the Asian elephant group when we're looking at African elephants our predicted value is the mean of that group that's the black square there and that's just to remind you is in line with that dotted lines four point six one seven so these black dots are the two means of the green so we end up our linear model when we use this zero one coding we end up with an intercept that represents the the baseline of the mean of the baseline group and if we've joined the two means together the gradient of that line it's still a linear model it's still a straight line the gradient of that line will be the difference between those two means there will be one point zero eight so this is essentially what we're fitting so even though we're dealing with categories and it might seem counterintuitive that you can have a linear model sort of between categories you act you can there's nothing inconsistent with this at all so that you know that you get a linear model by connecting to me essentially you get a straight line so you can put you know categorical predictors in if you put categorical predictors with two categories in SPSS will happily code them as zero and one for you you don't even you can put any code you want into SPSS and it will recode it as zero and one so if you wanted to put say gender in as a predictor no problem at all SPSS will just deal with it for you and convert it into zeros and ones if you wanted to put you know any any other category with two categories in it's no problem at all so we can fit linear models using categorical predictors that's no problem at all they're the linear model generally is a very flexible system in this example we can fit a linear model predicting the goals scored as the outcome and the type of elephant as a categorical predictor the things to note is when we use this kind of dummy coding when we use zeros and ones to code the groups the intercept will be the mean of the group that we gave a zero code to and the beta for the it's what's known as a dummy variable but the beta for the zero one variable will be the difference between the two group means and we can prove this so this is a this is a regression that I did on these data so we had elephants kotor i had two elephants coded 0 and 1 and i had the number of goals scored as my outcome variable and this was just a like a simple linear regression done in spss predicting goals from this categorical variable elephants and lo and behold in our coefficients table so when we look at the beaters the constant so that's B to 0 is in fact 3 point 5 3 3 which is what I said it would be it's the mean of the group I coded as zero is the mean of the Asian elephant group and if we look at the beta value for the predictor so the PISA value associated with the variable type of elephant again lo and behold it's 1.08 is the difference between the two means now the important thing is here if you think about it when we've dealt with other linear models we test this beta against zero so when we this t-test up here what that's testing is whether whether the the beta value associated with a predictor is zero remember a piece from zero is flat basically it's a flat line no difference at all so what these teachers tests is whether the difference between means or whether this beta is zero you may remember in first year that there was another way of testing whether two means were different from each other or were actually zero and what was that what test did you use to compare means t-tests is very quiet and subdued but absolutely correct fantastic you use the t-test and what are we using regression to test whether this beta is different from zero Baga me it's the t-test so what's going on is exactly the same we're using a t statistic to test whether this beta is zero or not but this when we use a categorical predictor that beta represents the difference between means so this is absolutely no different whatsoever to you know going through the menus and doing a t-test so you may be familiar what last year if you did research skills you would have been taught about doing T tests to compare the difference between two meats the t-test in the in the context in which you learnt it last year is a special case of this linear model that we have been trying to teach you about the last however many weeks it is it's a special case of it the linear model is a much is a much more general flexible system and essentially you know you can do lots of lots of different things with it but I just want to demonstrate that regardless of I mean it's easier if you wanted to test the difference between two means it's much easier to operationalize in SPSS by going through the t-test menu well there's no reason why you can't run it as a regression you know with a sort of a dummy coded predictor and the results you get will be the same and this really it goes back to I don't know if you remember I think it was the first lecture of the module where I gave you some example about zombies eating brains in a canteen and was showing you that you could do lots and lots and lots of different types of tests and basically get the same result that's because all those tests were part of this linear model that I've been teaching you about but although you tend to think about regression in a very specific way and you think about it as you know testing whether you Baraboo's predict other variables and whatever there's no reason why you can't use it to test differences between means so here's the t-test of the same data so this is the elephant data again but this time I run it through a t-test in SPSS and so you get the difference between the means again it's 1.08 and we get a t statistic value of 3.17 etc etc etc significance point oh two point zero zero two and let's have a look again at the regression output this is the same as what was on the previous slide so we've got mean difference at one point zero eight that corresponds to the beta value for the for the predictor when we ran it as regression the T statistic the tests whether this beater is different from zero is three point one seven lo and behold us exactly the same makers see the bird I'll draw this could go wrong so the T statistics we get exactly the same in the to output so even though we've sort of you know we've operationalized it differently exactly the same stuff's going on the significance value of whether that that beta is significantly different from zero is exactly the same as the significance value for if we you know do it do a t-test of the difference between the means and what is it the thing we've already looked at so that the difference between means is the same as the beta so oh and the other thing probably worth mentioning if you look at the conference interval surprise surprise that's exactly the same T so the point I want to want you to take away from this is not it's basically the linear model is a very flexible system so we can put categorical predictors in when we do put categorical predictors in and we use this kind of dumb encoding using zeros and ones which is kind of the standard thing that you do it's basically it's no different to doing a TSS in fact it's exactly the same as doing T cell yeah you know if you want to be literal about it the math behind that the two things are slightly different in a way but you end up with exactly the same result so the the tiem regression this that's testing this where this parameter is different from zero is the exact same T you would get from running a t-test to compare the differences between means so categorical predictors are not a problem for the linear model and this is the other the other reason why you may have thought it's kind of odd that I tend to try not to talk about regression I always refer to the linear model and that's because regression has a very specific connotation people tend to think about regression in a very specific way and that you know you you you use it to look for predictors of outcome variables and things like that and they tend to then think well you can't use regression to test differences between means because you know that's just wrong and that that's quite ingrained idea so that's why I tend not solve our regression I'll talk about the linear model because I'm trying to kind of get you out of thinking about thinking about things and that's always the linear model basically is very very flexible you can put categorical predictors in there's no problem at all but when you do effectively what you end up doing is looking at differences between means but it's the same system it's the same you know everything that we've learned up till now you can still carry that forward and when you're when you're thinking about looking at differences between means now I'm not going to get into this too much because this is what we're going into in next week's lecture but I just want to flag the fact that to try and keep things simple I've used an example of a categorical variable with only two categories but there's absolutely no reason why you can't extend this idea to categorical variables that have several categories how you operationalize it if you were actually going to do it kind of through the regression menus is more complicated so you don't end up doing it through the regression menus but what SPSS is doing behind the scenes is is the same as if you were to do this as a regression so if you have more than three sorry mom two categories so let's imagine we wanted to look across species so rather than having a debate about whether Asian elephants were better than African elephants at football maybe we looked at an example of Webber say elephants were better than life include lions ie Airlines and lyft it's about the Lions and whether they're better than humans so I'm frankly after the display I witnessed last night I'd probably rather see a pack of lions on the field at the stadium that I was at which I don't want to mention play so many Tottenham supporters here because they'll kill me and anyway so maybe we want to look at sort of across across species so our elephants better than lions are Lions better than humans so then we've got three categories now so it gets more complicated but you can still like I said I'm going to get into this next week in more detail so don't want to dwell on it particularly but we can still code multiple categories and put them into a regression but if we use this dummy coding system what happens is we basically end up with more than one predictor so what we can't do is put elephant lion and human into a regression model as a single predictor we can't do that at all what we have to do what goes on behind the scenes is that gets broken down into two predictors and these two predictors will represent differences between these categories and again it depends how we code it so you'd have to decide on some kind of baseline category so we might decide our baseline as humans let's say you know we just want to compare some of nonhumans to humans so we'd end up with one variable that basically represents the difference between humans and elephants so humans are our baseline so they get coded as zero for everything they're just they're 0 humans and zeros the board and what changes is which category gets assigned a 1 so our first variable maybe we assign the elephants of 1 so this this will literally be like a column in SPSS if you were going to do it this way which you'd be wouldn't in you just need to go through a different menu but if you're going to do it's a regression you'd have a column of ones and zeros where you put a line every time there's an elephant and you put a zero every time it's a human then you have another column which specified humans versus lions and there the Lions get a one and everything else gets a zero now the effect of using this coding so if you put both of these variables in at the same time so you have to kind of force them into the regression at the same point in time and what these two variables are doing are clothing these three categories but coding it across two variables so you end up with one variable that represented basically humans versus elephants so the human category has zero for everything so the one verse is zero here represents humans versus elephants and the other one will represent humans humans versus lions because the Lions have got a one so this is known as a dummy coding scheme so the reason it's called dummy coding is because you're creating so you want to use this as a sort categorical predictor but you're having to create these sort of dummy variables all these you know sort of ache variables if you like that that codes these different groups from each other so like I said more on this next week I just I just want to talk flag the idea that this linear model you can you can put in predictors that have multiple categories as no problem at all but you end up having to specify them across sort of more than one predictor essentially like I said more on that later so assuming you believe me that categorical predictors can go into linear models and that's all fine and like I said well we'll expand on that next week the other thing I want to talk about is moderation a moderation is quite an important concept in psychology generally we a lot of the research that we do essentially relies on hypotheses that are testing moderation we don't always know actually that we're testing moderation even when we are so all moderation means is that when you imagine you have a relationship between two variables so for example we had a relationship between whipped continent and the elephant came from and how many goals they scored a blood racing variable would be a variable that changes that relationship in some way so um you know in so you've got this relationship between what type of elephant you are and how the goals you score imagine if that relationship was different if they were playing in a kind of warm climate compared to if they were playing you know in the rain for example so may be the case that the the relationship between what type of elephant you are and how the goals you score is affected by the weather conditions that are playing in that's essentially what moderation is so moderator variable is a variable that changes the size or main even the direction of the relationship between two other variables so we'll we'll look at an example to try and sort make this make this clearer I thought I really thought you'd be getting bored me rambling on now so I've got another video so the example is then based around the idea of whether video games are bad for you so if this works it's not going to oh that's all right sorry this is bloody smart campaign these small pens ruin everything you're gonna love this video when it um hey what do you say that laughing about it see computers yeah yeah managed to find the only bit south part that didn't have any swearing so our video games bad view and there's that basically if you look off comm statistics about two-thirds of kind of like eight to fifteen year olds in this country own a video game console so quite widespread that proportions are even higher in boys about and there's about 88% of boys aged between sort of seven and fifteen home the video console so they're you know they used a lot and there's been a fair bit of research done on whether playing violent video games actually makes you aggressive and while you I was reading up on this when I I use this example in their book chapter and I was quite horrified because I was trying to hello there is a lot of the research focuses on specific game so there's a game called manhunt or something I'm gonna show my age now because this all means nothing to me it's getting called manhunt and local mad world or something so I was kind of looking around what these games were cause I kept reading about in theory why they like then I I don't have a games console and starts looking on the internet and they're rific really are so lifelike and you bludgeoned people to death and anyway so some of this research is kind of suggested that playing violent video games actually makes you violent so you could have a look at this now the interesting thing is whether there's some kind of moderating variables so is it a straightforward relationship that the more you use video games the more aggressive you become or is there something that moderates that relationship is there something that affects it and one of the things that may affect it is because you are in it externalizing disorders I like conduct problems and you you tend to get aggressive behavior so conduct problems are kind of a predictor of aggressive behavior anyway so video games you know kind of feed into that maybe it's the case that if you're if you kind of have a conduct disorder or something that is a risk factor for a conduct disorder the effect of the video game will be more powerful so one of the things you can measure its callous unemotional traits which is a risk factor for externalizing problems and conduct problems and it's basically callous unemotional traits are things like a lack of empathy or so using people for your own personal gain and that sort of thing so it's kind of like it's like a it's a bit like psychopathy in a way but kind of you know scaled back because it's only risk factor for stuff it's you're not you're not that bad but you're just solved like I say lacking emotion and empathy and things like that so how would we look at this as a moderator whether the sort of theoretical model the best way to just sort of describe what moderation actually means is through a diagram like this now is let's say you've got a relationship between two variables so we'd be predicting the video game use has an impact on your aggressive behavior so there's a relationship that you know a correlation or regression the beats are significant what moderators doing is having an impact on that relationship so it's feeding into this relationship somehow so we'd be arguing that callous unemotional traits are somehow influencing the strength or direction of that relationship so that the simplest way to think about this is imagine that we could split callous unemotional traits into two groups so this just makes it a bit easier to think about so you've got a group of people who are callous and a group of people who are not callous what moderation implies is that you get a sort of a different relationship in the two groups so for those who do not have callous unemotional traits we might for example get no relationship at all we get a completely flat line so there's no relationship doesn't matter how many hours you play video games your aggressive tendencies never change but if you have cows unemotional traits if you are kind of in this other group then there's a positive relationship the more ours use play video games the higher your aggression levels get so this diagram represents a very simple case of moderation so no effective one group a strong effect in the other group but it doesn't have to be quite moderation doesn't have to be as pronounced as this but essentially this is this is what it this is what it is now if we don't look at callous unemotional traces that's our categorical variable if we look at it measured continuously we get the same principle it just it's a you get a bit more of a complicated job so this side represents no moderation at all so basically this is videogames so how long you play video games for this is how much aggression you have so you can see there's kind of like a slightly positive relationship here so as the amount of video game playing goes up so does the predicted level of aggression but we've also got our callous emotional traits variable along here and you can think of this this is low low levels of callous unemotional traits and this is high level of callous unemotional traits so I'll put some labels here so what we see is that this relationship so this kind of slightly upward trend for playing more video games to get more aggressive doesn't change as you become higher in your callous unemotional trades so even though we're measuring this continuously it's a similar principle it's just saying this relationship is pretty static no matter what your level of callous unemotional traits are this however would be a case of moderation so this illustrates moderation and I'm you know I've kind of hand it up I've made it a bit extreme here but essentially at low levels of callous unemotional traits there's a negative relationship so the more video games you play the less aggressive you get and that's completely counterintuitive but like a sailor's trying to make it an extreme example so we get a negative relationship for low levels of callous unemotional traits but as callous unemotional traits get higher that relationship becomes less negative it's soft so that arrows flattened out a bit compared to that one and there are high levels of callous unemotional traits the relationship sort of flips on its head it actually becomes positive so a high levels of callous unemotional traits are when were up here on the continuum the relationship to video games and an aggression is actually going upwards so again just look at the arrows reflect the direction of the relationship between playing video games and being aggressive starts off negative goes sort of slightly less negative and then ends up positive so this would be an example of moderation the relationship between video gaming and aggression is changing as a function of how callous you are essentially this is non moderation because you're however callous you are is not basically changing the relationship between video gaming and aggression so how do we test this statistically well basically and you won't be surprised to know you can use a linear model again so you have some kind of outcome you have your two predictors and also the in what's known as the interaction between the two so in this case our outcome will be aggression and we'd be predicting it from the predictor variable which is how much how long's been playing video games the moderator variable which is how callous you are on a continuous scale and also those two variables multiplied together which is known as an interaction term so it's one variable times the other in terms of what the linear model looks like you just end up you know we've seen we could just add in predictors and we give them beta values you end up with this this is this model but as an equation aggression you still going to intercept predicted from get how much gaming you have that will have a b2 associated with it how callous you are that will have a beater associated with it and again an interaction term which like I said is just it's these two variables multiplied together and obviously they'll be some error so moderation is represented by an interaction in a linear model and an interaction term is literally the two variables multiplied together it's the best known as the product of the two variables so if you wanted to do this manually you could literally just go into the you know when we were transforming data we use the complete function you could use the the compute function in the transform menu to just literally times that create a new variable timesing the two predictors together and if that interaction term is significant then you have a significant moderation effect so in a way it's really quite straightforward and again the reason I'm flagging all of this here is because when we start talking about experimental designs we're going to talk about interactions a lot and I'm just sort of using this as a as a way into that really so that you understand that when you see an interaction term you're you're basically testing this this idea of moderation so here's some output from this particular example so we've got predict I know it looks a bit different to use your SPSS output but that's because I did it in a special way so we've got our outcomes agression and our predictors are the constant so that's the b20 we've got our moderator variable the callous unemotional traits we've got metal types for video gaming and then this is this interaction term you can see down here tells you that the interaction is literally video gaming times callous unemotional change so the question is is this significant and because this p value is less than 0.05 it is so this is an example in this data set of where you would say there's significant moderation so although video gaming predicts aggression callous unemotional traits predicts aggression callous unemotional traits also it moderates the relationship between video gaming and aggression so how do we pick apart what this interaction means well you can use something called a simple slopes analysis which basically breaks down the relationship between video gaming and predicted aggression based on whether it's or breaks into groups a bit so sort of whether callous unemotional traits a low medium or high to these three lines I mean top lines not very clear at all these three lines representing in order low color some emotion traits medium levels and high levels and you can see this is very similar to the other kind of graph I put up so the relationship between a gret aggression video-gaming is slightly negative to begin with if you're if you're low on color straight if you're sort of in the middle range of Palace traits it's fairly flat and there's only actually a positive relationship between video-gaming and aggression when you're high on callous unemotional traits as well so this will be very important because if you were trying to make general claims that video-gaming being bad for you I should say these data remained up so don't think this is actually what's going on in the real world I don't know whether it is or not I just made it up and so if you were you know if you were so trying to get some policy about or some advice about video gaming being bad in terms of aggression well what this is basically telling you is it's only bad if you happen to you know have a child who's already sort of callous and unemotional if you are if you're low on callous unemotional traits video gaming won't do you any harm so it's like it's a really important concept actually so what we learn today well I hope that you've learned that the linear model is a very flexible system you can include categorical predictors and hopefully if you get that that will help you next week when we start looking at experimental designs you can include them and use this dummy coding thing so coding variables with zeros and ones if you're using categorical predictors the beaters in your model end up representing the differences between means so when we come to look at experimental designs it just shows you that this is a framework that we could use for comparing the means of groups and you know that it will it all fits in nicely and finally how to look at this this idea or an interaction or a moderating variable so this is a variable that affects the relationship between two other variables and we test it by looking for these interactions between variable sense of the one variable multiplied by the other okay so next week we're going to move on to sort more experimental designs and obviously good luck all of you in your exercises this week hope it hope it goes well
Info
Channel: Andy Field
Views: 36,804
Rating: 4.9375 out of 5
Keywords: Regression, Statistics, Moderation, Elephant Football, Interactions, Dummy Coding
Id: 2LsGmWOKi1c
Channel Id: undefined
Length: 51min 34sec (3094 seconds)
Published: Thu Jan 31 2013
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.