# SO5032: Lab Materials

## Table of Contents

## 1 Week 12 Lab: Multinomial and Ordinal Regression

### 1.1 Multinomial logistic regression

Load this BHPS excerpt:

use http://teaching.sociology.ul.ie/so5032/bhpsqual.dta

`vote`

has four categories. Examine bivariate
relationships between vote and some of the other variables, and then
search for a multinomial logistic regession that makes sense:
`mlogit vote`

*indvars…*. It is better to have a
base category that is easily interpretable, and the default here will
use the biggest category ("Other/nationalist"). To avoid this, use the
`baseoutcome(1)`

option, which will force category one as the
base. Use the likelihood-ratio
test for each variable, since there are three times as many parameters
as usual.

Use `predict`

to generate predicted values (note you have
to supply one variable name to hold the prediction for each category). How often is
the most probable predicted category the same as the observed one?

Repeat the exercise using `qual`

as the dependent
variable. Select the variables carefully: some do not make sense for
predicting highest qualification.

### 1.2 Ordinal logistic regression

`qual`

is an ordinal variable. In your previous analysis,
did you observe patterns in the parameter estimates? Search for a good
proportional odds ordinal logistic model with syntax such as the
following:

ologit qual i.sex age

Compare the ordinal logistic results with the multinomial results you have already produced. Do they tell the same story?

### 1.3 Additional: Exam performance as ordinal

Using data on exam grades, consider the variable G4.

use http://teaching.sociology.ul.ie/so5032/marksdata, clear

Fit a set of binary logistic regressions, comparing Fail, C and B respectively with A. To do this, create a new variable which is 1 for Fail etc., 0 for A and missing otherwise. Use CAO1 (CAO points divided by 100) and MODSIZE as explanatory variables.

Then fit a mutltinomial logistic regression with G4 as the dependent variable, and the same explanatory variables. Compare your results with the binary regressions.

Finally, noting the ordinal pattern in the parameter estimates in both the binary and multinomial, fit an ordinal logistic regression. Compare your results with the preceeding.

With the results of the ordinal regression, calculate the odds ratio of being higher rather than lower, for a 100-point difference in raw CAO points (a 1-unit difference in CAO1). Do the same for a 100 difference in MODSIZE.