Ordinal logistic regression using SPSS (July, 2019)
Hello in this video. I provide a demonstration of how to carry out and interpret an ordinal logistic regression using SPSS. A link for the data. That's used as well as this. PowerPoint will be made available for download underneath the video description. Additionally a running document containing links to other videos on logistic regression and using other programs will be made available as well so if you find the video and materials useful please take time to like the video and share the link with others and also please consider subscribing to my youtube channel so let's start off with an overview binary logistic regression is utilized in those cases when researcher is modeling a predictive relationship between one or more independent variables and a binary deep in a variable. Although this is probably the most common form of logistic regression that's utilized in research. There are other logistic regression models that can be useful when your dependent variable is not binary and or the categories are unordered or ordered multinomial logistic regression are. MLR is generally used when you have more than two categories on the dependent variable that are unordered ordinal logistic regression rol. R is generally used when you have categories for the dependent variable that are ordered although it is permissible to utilize. MLR to analyze data involving an ordered categorical dependent variable olr is generally preferable unlike ml R which produces multiple sets of regression coefficients and associated test olr yields only a single set of regression coefficients to estimate relationships between independent and dependent variables as such ol. R will provide a more parsimonious representation of the data than MLR when the dependent variable is ordered nevertheless when the proportional odds assumption is violated then MLR provides a viable alternative to olr so the scenario for our examples involve student level data. And what we're going to be doing is trying to predict student interest for the next topic in class as a function of several variables first pass basically as an indicator of whether a student passed or failed a previous subject matter test passed as a binary variable this coded 0 for failed one for passed gender identification which is coded 0 for male identified and one for identified as female then we have measures of mastery goals and fear of failure and both of those two variables are treated as continuous and the interest variable.
Which is our ordered categorical variable basically our dependent variable in our models is coded one for low interest to 4 medium interest and 3 for high interest so in. SPSS there are a couple of routes that you can take to perform an ordinal logistic regression. The first route basically involves going through analyze and using the regression module. And then going down to ordinal. When you when you click on ordinal as you do right here. This box on the right will open up. You'll move the dependent variable to the dependent box and your independent variables to the covariance box. If you happen to have a factor variable or you're treating a variable as a factor you're going to move it to the factor box right here now pass and gender identification. Those two variables are both binary variables. Obviously they're categorical variables but it is permissible to include binary variables in regression model as a covariant and note too that both of them have already been dummy coded we can click on the output button. And right here you'll get a set of defaults and then I've also clicked right here for tests of parallel lines. So let's walk through the steps in real time so here we have our data opened up in SPSS again we're regressing the interest level variable onto the remaining variables. And so you you can see we have gender identification failure mastery goals and pass so what we're gonna do is go to analyze go to regression. Then go down to ordinal click on it. I'm gonna go and reset.
This will move our dependent variable to this box. Our independent variables will go down under covariance under output. We'll click on test the parallel lines continue. And then okay and so now we have all of our output okay so now. Let's look at some our output in a little bit more detail. So the model fitting information that you see on the right contains the negative 2 log likelihoods from an intercept only model and the full model which contains a full set of predictors or independent variables. We also have a likelihood ratio chi-square test to test whether there's a significant improvement in fit the final model relative to the intercept only or null model so in this case we see a significant improvement in fit between the two models so in the long and short of it is is that if this test is indicating statistical significance then that would be an indicator that our full model containing the full set of independent variables represents a significant improvement and fit over the null the goodness of fit table contains the deviance in Pearson chi-square test which are also useful for evaluating overall model fit to the data so non significant test results are indicators that the model fits the data well so just as a recap if our likelihood ratio test under the model fitting information if that's statistically significant then that's an indicator of good model fit relative to the null or intercept only model these tests right here are additional tests of fit and if they are non significant then that's an indicator that the model is a good fit to the data and let me just note too that it's not always the case that they will agree but most of the time they probably will so between these test results we have evidence that our model is fitting the data well next we have pseudo R square values that are treated as rough analogues to R square values in OLS aggression in general there's no strong guidance and literature on how these should be used or interpreted so I would say interpret these with caution here we have the regression coefficients and significance tests for each of the independent variables in the model the regression coefficients are literally interpreted as the predicted change in log odds of being in a higher as opposed to lower category on the dependent variable per unit increase on the independent variable so as such we interpret a positive estimate in the following way for every one unit increase on an independent variable.
There's a predicted increase of a certain amount in the log odds of falling at a higher level on the dependent variable so more generally this indicates that a scores increase on an independent variable. There's an increased probability of falling at a higher level on the dependent variable we interpret a negative estimate in the following way for every one unit increase on an independent variable. There's a predicted decrease of a certain amount in the log odds of falling at a higher level of the independent variable. So again more. Generally this indicates that scores increase on an independent variable. There's a decreased probability of falling at a higher level on the dependent variable so without going too far into the weeds and note again that you can download this. PowerPoint and you can get a lot more details we can see that both mastery goals and pass both of these coefficients are positive and statistically significant so basically students who pass the previous subject matter test were more likely to fall into the higher interest category than those who did not pass as soon as who had higher mastery goals were more likely to fall into a higher interest category than those with lower levels of mastery goals. Here we have the test of proportional odds and if this is non significant then that would be an indicator that the assumption is met and so that actually happens to be the case with our analysis so now let's look at route 2 through SPSS so one downside of using the previous set of options is that we cannot get odds ratios that would reflect the changing odds of a case falling at a next higher level on the dependent variable moreover the test results of associate the test results associated with the independent variables are based solely on the wall' test and these results can be less powerful than test results based on the use of likelihood ratio chi-square tests so we can use the generalized linear models option in SPSS to obtain this additional information.
So let's go ahead and walk through the steps to do this so we're gonna go to analyze go to generalized linear models. Click on this button right here and I'm actually going to go and reset things. Click on type of model that tab. We're gonna click on ordinal logistic so this button right here may be a little hard to see. But it's under ordinal response will click on response. We're gonna move the interest level variable over to the dependent variable box will click on predictors. And again we're just going to move all of our predictors over to the covariance box again if we had factor variables or variables that we're treating as factors. We'd be moving it to the factors box will click the model tab and move all of our independent variables over to the model box right here. Well go ahead and leave estimation alone but under statistics we're going to go ahead and click on likelihood ratio which you can see. I've just clicked right here and then we're also going to click on include X financial parameter estimate. So let me. Just go ahead and do that. And we'll click on OK and so now we get our results so first off we have a table of various goodness-of-fit measures you'll notice that although the Pearson chi-square and deviants appear in this table test results are not provided as we saw in the goodness of fit table via route 1 nevertheless both values and degrees of freedom are provided which could be used to test for model fit using the chi-square distribution.
But of course it's probably less work just to go ahead and and obtain the test results via route. 1 this is the likelihood ratio chi-square test that we saw via route 1 and again. We see that our full model was a significant improvement in fit over the null model looking at our test results. Here you can see up here. We have our likelihood ratio chi-square test associated with each of our predictor variables. And then down below. Again we have our wold chi-square test of the regression coefficients for each of our predictors. So these are the p-values for the wall test and up here we have the p-values from the likelihood ratio tests. Ok so you also see. In the parameter estimates table we've got the column of odds ratios so basically. That's you know that's the main difference that we saw. Between the two routes now the odds ratios reflect the multiplicative change and the odds of being in a higher category on the dependent variable for every one unit increase on the independent variable an odds ratio. That's greater than one suggests an increasing probability of being in a higher level on the dependent variable as values on an independent variable increases whereas a ratio lesson1 suggests a decreasing probability with increasing values on an independent variable an odds ratio equal to 1 suggests no predicted change and the likelihood of being in a higher category as values on an independent variable increase so without going too far into every single one of these odds ratios. I'll leave it to you to go through the PowerPoint where I describe what these values are representing now finally as I stated before it is possible to analyze the same data using MLR or basically multinomial logistic regression so. I thought I would just do a quick walk through that and show you what the results look like so we'll go back to our our. SPSS file will go under analyze regression. Go down to multinomial logistic so you can see right here. I've moved the dependent variable interest level over to this box reference category.
I've actually set it at first and then I move my independent variables to the covariance box right here under statistics. I've asked for a few things. Such as classification table and goodness of fit and then also likelihood ratio test is selected as well so anyway what we'll do is we'll go ahead and click on continue and then on ok and so now you'll notice some we look at our output. We still have our model fitting information. This is a likelihood ratio test comparing our full model with the full set of independent variables against an OLE model. So you can see. It's statistically significant suggesting that our full model represents a significant improvement in fit relative to the null model. The goodness of fit measures are both non. Singh tests are non significant with respect to pearson's chi-squared and deviance of chi-square so that's also indicating good model fit we also see pseudo. R square values and then scrolling down we've got likelihood ratio test and the parameter estimates table and then finally scrolling down you also have classification results so again had the proportional odds assumption been violated then this would have been a viable route to take to analyze our data so that concludes this video. Demonstration be sure to check out the reece references and resources at the back of the powerpoint and it will provide guidance. As to other places you might go to learn more about ordinal logistic regression again if you like the video and the materials please take time to like the video and share it with others and I appreciate you watching.
Which is our ordered categorical variable basically our dependent variable in our models is coded one for low interest to 4 medium interest and 3 for high interest so in. SPSS there are a couple of routes that you can take to perform an ordinal logistic regression. The first route basically involves going through analyze and using the regression module. And then going down to ordinal. When you when you click on ordinal as you do right here. This box on the right will open up. You'll move the dependent variable to the dependent box and your independent variables to the covariance box. If you happen to have a factor variable or you're treating a variable as a factor you're going to move it to the factor box right here now pass and gender identification. Those two variables are both binary variables. Obviously they're categorical variables but it is permissible to include binary variables in regression model as a covariant and note too that both of them have already been dummy coded we can click on the output button. And right here you'll get a set of defaults and then I've also clicked right here for tests of parallel lines. So let's walk through the steps in real time so here we have our data opened up in SPSS again we're regressing the interest level variable onto the remaining variables. And so you you can see we have gender identification failure mastery goals and pass so what we're gonna do is go to analyze go to regression. Then go down to ordinal click on it. I'm gonna go and reset.
This will move our dependent variable to this box. Our independent variables will go down under covariance under output. We'll click on test the parallel lines continue. And then okay and so now we have all of our output okay so now. Let's look at some our output in a little bit more detail. So the model fitting information that you see on the right contains the negative 2 log likelihoods from an intercept only model and the full model which contains a full set of predictors or independent variables. We also have a likelihood ratio chi-square test to test whether there's a significant improvement in fit the final model relative to the intercept only or null model so in this case we see a significant improvement in fit between the two models so in the long and short of it is is that if this test is indicating statistical significance then that would be an indicator that our full model containing the full set of independent variables represents a significant improvement and fit over the null the goodness of fit table contains the deviance in Pearson chi-square test which are also useful for evaluating overall model fit to the data so non significant test results are indicators that the model fits the data well so just as a recap if our likelihood ratio test under the model fitting information if that's statistically significant then that's an indicator of good model fit relative to the null or intercept only model these tests right here are additional tests of fit and if they are non significant then that's an indicator that the model is a good fit to the data and let me just note too that it's not always the case that they will agree but most of the time they probably will so between these test results we have evidence that our model is fitting the data well next we have pseudo R square values that are treated as rough analogues to R square values in OLS aggression in general there's no strong guidance and literature on how these should be used or interpreted so I would say interpret these with caution here we have the regression coefficients and significance tests for each of the independent variables in the model the regression coefficients are literally interpreted as the predicted change in log odds of being in a higher as opposed to lower category on the dependent variable per unit increase on the independent variable so as such we interpret a positive estimate in the following way for every one unit increase on an independent variable.
There's a predicted increase of a certain amount in the log odds of falling at a higher level on the dependent variable so more generally this indicates that a scores increase on an independent variable. There's an increased probability of falling at a higher level on the dependent variable we interpret a negative estimate in the following way for every one unit increase on an independent variable. There's a predicted decrease of a certain amount in the log odds of falling at a higher level of the independent variable. So again more. Generally this indicates that scores increase on an independent variable. There's a decreased probability of falling at a higher level on the dependent variable so without going too far into the weeds and note again that you can download this. PowerPoint and you can get a lot more details we can see that both mastery goals and pass both of these coefficients are positive and statistically significant so basically students who pass the previous subject matter test were more likely to fall into the higher interest category than those who did not pass as soon as who had higher mastery goals were more likely to fall into a higher interest category than those with lower levels of mastery goals. Here we have the test of proportional odds and if this is non significant then that would be an indicator that the assumption is met and so that actually happens to be the case with our analysis so now let's look at route 2 through SPSS so one downside of using the previous set of options is that we cannot get odds ratios that would reflect the changing odds of a case falling at a next higher level on the dependent variable moreover the test results of associate the test results associated with the independent variables are based solely on the wall' test and these results can be less powerful than test results based on the use of likelihood ratio chi-square tests so we can use the generalized linear models option in SPSS to obtain this additional information.
So let's go ahead and walk through the steps to do this so we're gonna go to analyze go to generalized linear models. Click on this button right here and I'm actually going to go and reset things. Click on type of model that tab. We're gonna click on ordinal logistic so this button right here may be a little hard to see. But it's under ordinal response will click on response. We're gonna move the interest level variable over to the dependent variable box will click on predictors. And again we're just going to move all of our predictors over to the covariance box again if we had factor variables or variables that we're treating as factors. We'd be moving it to the factors box will click the model tab and move all of our independent variables over to the model box right here. Well go ahead and leave estimation alone but under statistics we're going to go ahead and click on likelihood ratio which you can see. I've just clicked right here and then we're also going to click on include X financial parameter estimate. So let me. Just go ahead and do that. And we'll click on OK and so now we get our results so first off we have a table of various goodness-of-fit measures you'll notice that although the Pearson chi-square and deviants appear in this table test results are not provided as we saw in the goodness of fit table via route 1 nevertheless both values and degrees of freedom are provided which could be used to test for model fit using the chi-square distribution.
But of course it's probably less work just to go ahead and and obtain the test results via route. 1 this is the likelihood ratio chi-square test that we saw via route 1 and again. We see that our full model was a significant improvement in fit over the null model looking at our test results. Here you can see up here. We have our likelihood ratio chi-square test associated with each of our predictor variables. And then down below. Again we have our wold chi-square test of the regression coefficients for each of our predictors. So these are the p-values for the wall test and up here we have the p-values from the likelihood ratio tests. Ok so you also see. In the parameter estimates table we've got the column of odds ratios so basically. That's you know that's the main difference that we saw. Between the two routes now the odds ratios reflect the multiplicative change and the odds of being in a higher category on the dependent variable for every one unit increase on the independent variable an odds ratio. That's greater than one suggests an increasing probability of being in a higher level on the dependent variable as values on an independent variable increases whereas a ratio lesson1 suggests a decreasing probability with increasing values on an independent variable an odds ratio equal to 1 suggests no predicted change and the likelihood of being in a higher category as values on an independent variable increase so without going too far into every single one of these odds ratios. I'll leave it to you to go through the PowerPoint where I describe what these values are representing now finally as I stated before it is possible to analyze the same data using MLR or basically multinomial logistic regression so. I thought I would just do a quick walk through that and show you what the results look like so we'll go back to our our. SPSS file will go under analyze regression. Go down to multinomial logistic so you can see right here. I've moved the dependent variable interest level over to this box reference category.
I've actually set it at first and then I move my independent variables to the covariance box right here under statistics. I've asked for a few things. Such as classification table and goodness of fit and then also likelihood ratio test is selected as well so anyway what we'll do is we'll go ahead and click on continue and then on ok and so now you'll notice some we look at our output. We still have our model fitting information. This is a likelihood ratio test comparing our full model with the full set of independent variables against an OLE model. So you can see. It's statistically significant suggesting that our full model represents a significant improvement in fit relative to the null model. The goodness of fit measures are both non. Singh tests are non significant with respect to pearson's chi-squared and deviance of chi-square so that's also indicating good model fit we also see pseudo. R square values and then scrolling down we've got likelihood ratio test and the parameter estimates table and then finally scrolling down you also have classification results so again had the proportional odds assumption been violated then this would have been a viable route to take to analyze our data so that concludes this video. Demonstration be sure to check out the reece references and resources at the back of the powerpoint and it will provide guidance. As to other places you might go to learn more about ordinal logistic regression again if you like the video and the materials please take time to like the video and share it with others and I appreciate you watching.