Addiction data
Section of Categorical responses, part of Generalised linear models · Also in Paired comparisons, and how far a fit is from the data
Addiction data
| Type | Section |
| Taught in | Categorical responses · Paired comparisons, and how far a fit is from the data |
| Part | Generalised linear models |
In Categorical responses
A German survey interviewed 712 people about addiction and classified the answers in three categories that we will not put in an order: 0 weak-willed, 1 addiction by disease, 2 both.1 The covariates are sex (female =1), age in years, and an indicator for being a university academic. The first rows look like this: illness 1, female, age 61, not academic; then illness 0, female, 43, not academic; then illness 2, male, 44, not academic.
multinomial(refLevel = 1) takes the lowest level of ill, which is 0, as the reference, even though that level is stored as the number 0. The numbering in the coefficient names is the predictor number, not the illness code.
need <- function(pkg) {
if (!requireNamespace(pkg, quietly = TRUE)) {
install.packages(pkg, repos = "https://cloud.r-project.org")
}
suppressPackageStartupMessages(library(pkg, character.only = TRUE))
}
need("catdata")
need("VGAM")
data(addiction, package = "catdata")
addiction$ill <- factor(addiction$ill)
summary(vglm(ill ~ gender + age + university,
family = multinomial(refLevel = 1),
data = addiction)) Estimate Std. Error z value
(Intercept):1 -1.1607 0.2654 -4.37
(Intercept):2 -2.0156 0.3076 -6.55
gender:1 0.4366 0.1938 2.25
gender:2 0.2879 0.2208 1.30
age:1 0.0299 0.0062 4.80
age:2 0.0421 0.0068 6.17
university:1 1.6220 0.2535 6.40
university:2 1.0673 0.2891 3.69
Predictor 1 is \log(\hat p_1/\hat p_0), disease versus weak-willed. Predictor 2 is \log(\hat p_2/\hat p_0), both versus weak-willed. Written out, \begin{align*} \log\frac{\hat p_1}{\hat p_0} &=-1.161+0.437\,\mathrm{female}+0.0299\,\mathrm{age}+1.622\,\mathrm{university},\\ \log\frac{\hat p_2}{\hat p_0} &=-2.016+0.288\,\mathrm{female}+0.0421\,\mathrm{age}+1.067\,\mathrm{university}. \end{align*} Reading those coefficients as odds ratios, and the comparison of category 2 against category 1, is the next chapter. The fit itself is the multinomial likelihood with these two linear predictors, dispersion fixed at 1: one independent choice of a single category per person. If a questionnaire let you tick several categories, that 1 would be the wrong dispersion, and this would be the wrong model.
From the proportional-odds intercepts, check that \widehat{\mathrm{P}}(Y\ge 2)>\widehat{\mathrm{P}}(Y\ge 3) at x=0, and say why a reversal would have meant the fit was impossible rather than merely a bad fit.
Show that collapsing mild and severe into one category recovers a single logistic regression from the proportional-odds model, with the same slope \beta.
For the three-category nominal model, derive \log(p_2/p_1) from \log(p_2/p_0) and \log(p_1/p_0), and confirm that the result is still a linear predictor.
In Paired comparisons, and how far a fit is from the data
Category 0 is weak-willed, category 1 is addiction by disease, category 2 is both. From the fitted predictors, \begin{align*} \log\frac{\hat p_1}{\hat p_0} &=-1.161+0.437\,\mathrm{female}+0.0299\,\mathrm{age}+1.622\,\mathrm{university},\\ \log\frac{\hat p_2}{\hat p_0} &=-2.016+0.288\,\mathrm{female}+0.0421\,\mathrm{age}+1.067\,\mathrm{university}. \end{align*} A female, relative to a male with the same age and the same university status, has odds of disease-versus-weak-willed multiplied by \exp(0.437)=1.55. The z statistic is 2.25, so that contrast is past the usual 5% line. The same comparison for both-versus-weak-willed is \exp(0.288)=1.33, with z=1.30, which we would not call a detected sex difference.
Age is a per-year coefficient. \exp(0.0299)=1.03 looks small until you remember that the unit is one year. Ten years is 10\times 0.0299=0.299 on the log-odds scale, and \exp(0.299)\approx 1.35, not 1.03. Both age slopes are clearly away from zero (z=4.80 and 6.17). The per-year sentence and the per-decade sentence are the same fit.
Being a university academic multiplies the odds of disease-versus-weak-willed by \exp(1.622)=5.06, and the odds of both-versus-weak-willed by \exp(1.067)=2.91. Those are the largest contrasts in the table (z=6.40 and 3.69).
Any other pair is the difference of two rows. The log-odds of both versus disease alone use \log\frac{p_2}{p_1} =(-2.016+1.161)+(0.288-0.437)\,\mathrm{female}+(0.0421-0.0299)\,\mathrm{age}+(1.067-1.622)\,\mathrm{university}. You do not refit. The multinomial dispersion stays 1 as long as each person makes one independent choice of one category.
Used in
See also
Proportional-odds model · Baseline-category logit model · Ordinal responses · Nominal responses · Proportional-hazards model
Footnotes
The substance itself is named in German in the source paper. What that drug is, and why it would show up among academics, is not part of the model.↩︎