Theoretical examples
| Example 1 We want to investigate the association between educational attainment (x) and building type (y). Educational attainment has the values: 1=Compulsory, 2=Upper secondary, and 3=University. Building type has the values 1=Apartment, 2=Town house, and 3=Villa. We choose Compulsory as our reference category and Apartment as our base outcome. The RRR for Upper secondary in combination with Town house is 2.01, meaning that those with upper secondary education are more likely to live in a town house than an apartment, compared to those with compulsory education. The RRR for Upper secondary in combination with Villa is 1.32, meaning that those with upper secondary education are more likely to live in a villa than an apartment, compared to those with compulsory education. For University in combination with Town house, the RRR is 0.95, suggesting that those who have university education are less likely to live in a town house than an apartment compared to those with compulsory education. Finally, the RRR for University in combination with Villa is 3.44, meaning that those with university education are more likely to live in a villa than an apartment, compared to those with compulsory education. |
| Example 2 Suppose we are interested in the association between family type (x) and adolescent health behaviour (y). Family type has three categories: 1=Two-parent household, 2=Joint custody, and 3=Single-parent household. Adolescent health behaviour has the values 1=No smoking or alcohol consumption, 2=Smoking, 3=Alcohol consumption, and 4=Both smoking and alcohol consumption. We choose Two-parent household as our reference category, and No smoking or alcohol consumption as our base outcome. The RRR for Joint custody and Smoking is 1.20, meaning that adolescents living in joint custody are more likely to smoke than not to smoke or drink alcohol compared to those living in a two-parent household. The RRR for the Single-parent household and Smoking is 1.49, meaning that adolescents living in single-parent household are more likely to smoke than not to smoke or drink alcohol compared to those living in a two-parent household. The RRR for the Joint custody and Alcohol consumption is 1.00, meaning that adolescents living in joint custody are as likely to drink alcohol as not to smoke or drink alcohol compared to those living in a two-parent household. The RRR for the Single-parent household and Alcohol consumption is 2.02, meaning that adolescents living in single-parent household are more likely to drink alcohol than not to smoke or drink alcohol compared to those living in a two-parent household. The RRR for Joint custody and Both smoking and alcohol consumption is 1.55, meaning that adolescents living in joint custody are more likely to both smoke and drink alcohol than not to smoke or drink alcohol compared to those living in a two-parent household. The RRR for the Single-parent household and Both smoking and alcohol consumption is 4.45, meaning that adolescents living in single-parent household are more likely to both smoke and drink alcohol than not to smoke or drink alcohol compared to those living in a two-parent household. |
Practical example
| Dataset |
| StataData1.dta |
| Variable name | marstat40 |
| Variable label | Marital status (Age 40, Year 2010) |
| Value labels | 1=Married 2=Unmarried 3=Divorced 4=Widowed |
| Variable name | educ |
| Variable label | Educational level (Age 40, Year 2010) |
| Value labels | 1=Compulsory 2=Upper secondary 3=University |
sum marstat40 educ if pop_multinom==1 |

mlogit marstat40 ib1.educ if pop_multinom==1, rrr b(1) |

When we look at the results for the dummies of educ, we see that the relative risk ratios (RRR) are 0.70 (Upper secondary) and 0.46 (University) for Unmarried, 0.76 (Upper secondary) and 0.42 (University) for Divorced, and 0.76 (Upper secondary) and 0.64 (University) for Widowed. In other words, individuals with higher levels of educational attainment are less likely to be unmarried, divorced, and widowed, as compared to being married.
All estimates are statistically significant except the ones for Widowed.
Test the overall effect
The output presented and interpreted above, is based on the relative risk ratios for the dummy variables of educ. But what about the overall statistical effect of educ on marstat40? We could assess it through contrast, which is a postestimation command. However, since the outcome has four categories, it quickly gets quite messy. We will therefore skip this here.
More informationhelp contrast |
We will nonetheless produce a graph of the trend. First, however, we need to apply the post-estimation command margins.
| Note This command can also be used for variables that are continuous or binary, but is particularly useful for categorical, non-binary (i.e. ordinal) variables. |
margins educ |

marginsplot |

| Note The y-axis shows predicted probabilities (i.e. not relative log odds or relative risk ratios). The different colours reflect the different categories of the y-variable. |
More informationhelp marginsplot |
| Summary Individuals with higher levels of educational attainment are less likely to be unmarried, divorced, and widowed, as compared to being married. Except for the educational differences in the risk of being widowed, the associations are statistically significant. |