Skip to main content

Ordinal Logistic Regression: What Makes People Satisfied With Their Job?

Ordinal logistic regression (the proportional odds model) in R with MASS::polr(), on the 2022 General Social Survey: how autonomy, respect, job security, stress and working from home go with the job satisfaction of about 2,200 US workers, with odds ratios, thresholds, predicted probabilities, the proportional odds assumption and APA reporting.

The question: four answers in order

Since 1972 the General Social Survey (GSS) has asked Americans: “On the whole, how satisfied are you with the work you do — would you say you are very satisfied, moderately satisfied, a little dissatisfied, or very dissatisfied?” In 2022 it also asked them about the job itself: are they free to decide how to do their work, are they treated with respect, is the job secure, how often is it stressful, how often do they work from home?

This page asks: which of these go with being more satisfied with one’s job? Does working from home make people happier with their work, or is it something else?

The answer has four values in order: very dissatisfied, a little dissatisfied, moderately satisfied, very satisfied. But nobody knows how far apart they are: the step from “a little dissatisfied” to “moderately satisfied” may be bigger than the step from “moderately” to “very”. The type of outcome decides the type of regression:

Outcome Regression Example
Two categories logistic hired or not
Ordered categories ordinal logistic job satisfaction: very dissatisfied … very satisfied
Unordered categories multinomial logistic how someone left a job: quit, retired, laid off…

Three other ways to analyze the answers, and what each gets wrong:

  • A linear regression on the scores 1 to 4 assumes the four answers are equally far apart, and predicts answers such as 3.4 that nobody can give.
  • A logistic regression of satisfied against dissatisfied throws away the difference between “moderately” and “very” satisfied, where most people are.
  • A multinomial logistic regression ignores the order, and needs a whole set of coefficients for every answer: 27 parameters here instead of 11.

The ordinal logistic regression uses the order and needs one coefficient per predictor.

Code
library(MASS)      # polr(): ordinal logistic regression (comes with R)
library(ordinal)   # clm(), nominal_test(): checks the proportional odds assumption
library(haven)     # read_dta(): reads the Stata files of the GSS
library(ggplot2)

# one color per answer, from red (dissatisfied) to blue (satisfied), the same in every chart
satisfaction <- c("Very dissatisfied", "A little dissatisfied", "Moderately satisfied", "Very satisfied")
colours <- setNames(c("#c23b3a", "#ec8a85", "#6da7ec", "#1c5cab"), satisfaction)
ink     <- setNames(c("white", "#0b0b0b", "#0b0b0b", "white"), satisfaction)  # labels on the bars

# number formats for the text
f2   <- function(x) formatC(x, format = "f", digits = 2)
nz   <- function(x, d = 2) sub("^0", "", formatC(x, format = "f", digits = d))   # no leading zero
pval <- function(p) if (p < .001) "< .001" else paste("=", nz(p, 3))
pct  <- function(x, d = 0) paste0(formatC(100 * x, format = "f", digits = d), "%")
num  <- function(x) trimws(format(x, big.mark = ","))

1. The data

The GSS is run by NORC at the University of Chicago. Its data are free and need no login: one file per survey year. 2022 is the latest year with the Quality of Working Life module, a set of questions about work designed by the National Institute for Occupational Safety and Health (NIOSH) and asked of everyone who had a job. The Stata file comes in a zip of 6 MB.

Code
options(timeout = max(300, getOption("timeout")))   # allow slow downloads
zip <- tempfile(fileext = ".zip")
download.file("https://gss.norc.org/content/dam/gss/get-the-data/documents/stata/2022_stata.zip",
              zip, mode = "wb", quiet = TRUE)
dta <- unzip(zip, files = "2022/GSS2022.dta", exdir = tempdir())

# the questions we need, out of the 1,297 columns in the file
columns <- c("satjob", "wkfreedm", "respect", "jobsecok", "stress", "wrkhome", "wrkslf", "age", "mode")
raw <- read_dta(dta, col_select = tidyselect::all_of(columns))
nrow(raw)
[1] 4149

Each answer is stored as a number with a label. “Don’t know”, “no answer”, “skipped on the web” and “not asked” (people without a job are not asked about their job) are special missing codes, which read_dta() turns into NA:

Code
attr(raw$satjob, "labels")[1:4]       # the four answers and their codes
       very satisfied  moderately satisfied a little dissatisfied     very dissatisfied 
                    1                     2                     3                     4 
Code
table(raw$satjob, useNA = "ifany")    # NA: not asked or not answered

   1    2    3    4 <NA> 
1268 1237  316  132 1196 

The codes run from very satisfied (1) to very dissatisfied (4). We turn them round, so that a higher number always means more of something: more satisfied, more freedom, more often stressed. The predictors:

Predictor Question Answers, coded
autonomy I am given a lot of freedom to decide how to do my own work 1 not at all true, 2 not too true, 3 somewhat true, 4 very true
respect At the place where I work, I am treated with respect 1 strongly disagree, 2 disagree, 3 agree, 4 strongly agree
security The job security is good 1 not at all true … 4 very true
stress How often do you find your work stressful? 1 never, 2 hardly ever, 3 sometimes, 4 often, 5 always
home How often do you work at home as part of your job? never; some days (from a few times a year to more than once a week); mainly at home
self_employed Are you self-employed or do you work for someone else? no, yes
age10 Age in decades: 4.1 = 41 years
Code
n <- function(x) as.numeric(x)   # drops the labels, keeps the NAs
d <- data.frame(
  satisfaction  = factor(5 - n(raw$satjob), levels = 1:4, labels = satisfaction, ordered = TRUE),
  autonomy      = 5 - n(raw$wkfreedm),
  respect       = 5 - n(raw$respect),
  security      = 5 - n(raw$jobsecok),
  stress        = 6 - n(raw$stress),
  home          = cut(n(raw$wrkhome), c(0, 1, 5, 6), labels = c("Never", "Some days", "Mainly")),
  self_employed = factor(ifelse(n(raw$wrkslf) == 1, "Yes", "No"), levels = c("No", "Yes")),
  age10         = n(raw$age) / 10,
  web           = factor(ifelse(n(raw$mode) == 4, "Yes", "No"), levels = c("No", "Yes")))  # answered on the web

vars <- c("satisfaction", "autonomy", "respect", "security", "stress", "home", "self_employed", "age10")
d <- d[complete.cases(d[vars]), ]
nrow(d)
[1] 2167

factor(..., ordered = TRUE) makes an ordered factor: R now knows that “very satisfied” is above “moderately satisfied”. polr() needs it. That leaves 2,167 people who answered all the questions.

The four questions with agree or true answers are treated as numbers: one coefficient for each step up the scale. This assumes every step has the same effect; section 7 checks it.


2. Look at the data

Code
overall <- prop.table(table(d$satisfaction))
round(100 * overall, 1)

    Very dissatisfied A little dissatisfied  Moderately satisfied        Very satisfied 
                  3.5                   9.8                  42.2                  44.5 

Most people are satisfied with their work: 45% very and 42% moderately. Only 3.5% are very dissatisfied, a typical skew for job satisfaction. How does satisfaction change with each predictor?

Code
# the answers to each question, in words
answers <- list(autonomy = c("Not at all true", "Not too true", "Somewhat true", "Very true"),
                respect  = c("Strongly disagree", "Disagree", "Agree", "Strongly agree"),
                security = c("Not at all true", "Not too true", "Somewhat true", "Very true"),
                stress   = c("Never", "Hardly ever", "Sometimes", "Often", "Always"),
                home     = c("Never", "Some days", "Mainly"))
questions <- c(autonomy = "Autonomy", respect = "Respect", security = "Security",
               stress = "Stress", home = "From home")

# stacked bars of shares (each bar adds up to 100%), one panel per question, larger shares labeled
stacked <- function(m, x_label) {
  ggplot(m, aes(share, answer, fill = satisfaction)) +
    geom_col(width = 0.8, colour = "white", linewidth = 0.3, position = position_stack(reverse = TRUE)) +
    geom_text(aes(label = ifelse(share >= 0.07, pct(share), ""), colour = satisfaction),
              position = position_stack(vjust = 0.5, reverse = TRUE), size = 3, show.legend = FALSE) +
    facet_grid(question ~ ., scales = "free_y", space = "free_y") +
    scale_fill_manual(values = colours) +
    scale_colour_manual(values = ink, guide = "none") +
    scale_x_continuous(labels = scales::percent, expand = c(0, 0)) +
    scale_y_discrete(labels = function(x) sub("^[^:]*: ", "", x)) +   # drop the question from the label
    labs(x = x_label, y = NULL, fill = NULL) +
    theme_bw() +
    theme(legend.position = "bottom", plot.margin = margin(5.5, 18, 5.5, 5.5)) +  # room for "100%"
    guides(fill = guide_legend(nrow = 2))
}

# how satisfied the people who gave each answer are, with the number of people
observed <- do.call(rbind, lapply(names(answers), function(v) {
  answer <- factor(answers[[v]][as.integer(d[[v]])], levels = answers[[v]])
  shares <- as.data.frame(prop.table(table(answer, satisfaction = d$satisfaction), 1), responseName = "share")
  size   <- table(answer)
  # "Autonomy: Very true (1,065)"; the question keeps the labels of different panels apart
  labels <- paste0(questions[[v]], ": ", names(size), " (", num(as.vector(size)), ")")
  shares$answer   <- factor(labels[as.integer(shares$answer)], levels = rev(labels))
  shares$question <- factor(questions[[v]], levels = questions)
  shares
}))
stacked(observed, "share of the people who gave this answer (number of people)")

Plot: 2. Look at the data

Code
share <- function(v) prop.table(table(d[[v]], d$satisfaction), 1)
by_respect  <- share("respect")
by_autonomy <- share("autonomy")
by_stress   <- share("stress")
by_home     <- share("home")
dissatisfied <- c("Very dissatisfied", "A little dissatisfied")
  • Respect: 63% of the people who strongly agree that they are treated with respect are very satisfied, against 13% of those who disagree. 41% of those who disagree are dissatisfied. The 48 people who strongly disagree do not follow the pattern; the group is small, and its shares are uncertain.
  • Autonomy and job security go the same way: the more of them, the more people are very satisfied.
  • Stress: 72% of the people whose work is never stressful are very satisfied, and 24% of those whose work is always stressful.
  • Working from home: 48% of the people who work from home on some days are very satisfied, against 42% of those who never do. A small difference, in favor of working from home.

But the predictors go together. People who can work from home also tend to be freer to decide how to do their work:

Code
round(100 * prop.table(table(home = d$home, autonomy = d$autonomy), 1))   # % of each row
           autonomy
home         1  2  3  4
  Never      5 13 39 44
  Some days  2  9 35 55
  Mainly     3  5 35 57
Code
free <- prop.table(table(d$home, d$autonomy), 1)[, "4"]

55% of the people who work from home on some days say “very true” to the freedom question, against 44% of those who never do. So is it working from home that goes with satisfaction, or the freedom? The model can tell: it estimates the effect of each predictor holding the others constant.


3. The model step by step, with formulas

Step 1: cut the scale in three places

Four ordered answers can be split into “this answer or lower” against “higher” in three places:

Split \(j\) Lower: \(Y \le j\) Higher: \(Y > j\)
1 very dissatisfied a little dissatisfied or more
2 dissatisfied (very or a little) satisfied (moderately or very)
3 moderately satisfied or less very satisfied

\(P(Y_i \le j)\) is a cumulative probability: the probability that person \(i\) gives answer \(j\) or a lower one.

Step 2: one logistic regression per split, with the same slopes

\[\text{logit}\,P(Y_i \le j) = \ln\frac{P(Y_i \le j)}{P(Y_i > j)} = \theta_j - (\beta_1 x_{1i} + \dots + \beta_p x_{pi}), \qquad j = 1, 2, 3\]

Each split has its own intercept, \(\theta_j\), called a threshold or cut-point. The slopes \(\beta\) are the same at all three splits: a predictor changes the odds of a higher answer by the same factor wherever the scale is cut. This is the proportional odds assumption, and the model is also called the proportional odds model.

The thresholds increase, \(\theta_1 < \theta_2 < \theta_3\), because \(P(Y \le j)\) can only grow with \(j\). The minus sign makes a positive \(\beta\) mean higher answers: here, more satisfied. R’s polr() and clm() and SPSS’s PLUM write the model this way; some programs, for example SAS, write it with a plus sign, and their coefficients have the opposite sign.

Step 3: from the splits to the four answers

Write \(\eta_i = \beta_1 x_{1i} + \dots + \beta_p x_{pi}\). Then

\[P(Y_i \le j) = \frac{1}{1 + e^{-(\theta_j - \eta_i)}}\]

and the probability of each answer is the difference between two cumulative probabilities:

\[P(Y_i = 1) = P(Y_i \le 1) \qquad P(Y_i = j) = P(Y_i \le j) - P(Y_i \le j - 1) \qquad P(Y_i = 4) = 1 - P(Y_i \le 3)\]

The four probabilities are between 0 and 1 and add up to 1.

Step 4: what a coefficient means

\(e^{\beta}\) is a cumulative odds ratio: the number by which the odds of a higher answer rather than a lower one are multiplied for each step up the predictor, with the other predictors held constant. With proportional odds the same number holds at every split. An odds ratio of 2 for respect means that one step up the respect scale doubles the odds of being very satisfied rather than less satisfied, and doubles the odds of being satisfied rather than dissatisfied, and doubles the odds of being anything but very dissatisfied.

Step 5: the picture behind the model, a hidden satisfaction scale

Imagine that each person has a hidden, continuous satisfaction, \(Y^*\), which depends on the predictors plus a random part:

\[Y^*_i = \eta_i + \varepsilon_i, \qquad \varepsilon_i \sim \text{logistic}(0, 1)\]

The person answers by where \(Y^*\) falls among the thresholds: “very dissatisfied” below \(\theta_1\), “a little dissatisfied” between \(\theta_1\) and \(\theta_2\), “moderately satisfied” between \(\theta_2\) and \(\theta_3\), “very satisfied” above \(\theta_3\). The predictors move the whole distribution of \(Y^*\) to the right or to the left; the thresholds stay where they are. This gives exactly the formulas of steps 2 and 3. With a normal \(\varepsilon\) instead of a logistic one, it is the ordinal probit model (polr(..., method = "probit")). Section 5 draws the picture with the fitted numbers.

Step 6: how R finds the numbers

By maximum likelihood: R looks for the thresholds and the \(\beta\)’s that make the answers people actually gave as probable as possible,

\[\ln L = \sum_i \ln P(Y_i = \text{the answer that person } i \text{ gave})\]

Step 7: count the parameters

Three thresholds, plus one slope for each of autonomy, respect, security, stress, self-employment and age, plus two for working from home (three groups): 11 parameters. A multinomial model with the same predictors needs 9 coefficients for each of the three answers other than the reference: 27.


4. Fitting the model

Code
fit <- polr(satisfaction ~ autonomy + respect + security + stress + home + self_employed + age10,
            data = d, Hess = TRUE)
summary(fit)
Call:
polr(formula = satisfaction ~ autonomy + respect + security + 
    stress + home + self_employed + age10, data = d, Hess = TRUE)

Coefficients:
                    Value Std. Error t value
autonomy          0.39481    0.06005   6.574
respect           0.72743    0.07253  10.030
security          0.38234    0.05863   6.521
stress           -0.37740    0.04807  -7.852
homeSome days     0.15549    0.10266   1.515
homeMainly       -0.07595    0.12017  -0.632
self_employedYes  0.45185    0.14198   3.182
age10             0.15250    0.03194   4.775

Intercepts:
                                           Value   Std. Error t value
Very dissatisfied|A little dissatisfied     0.6519  0.3782     1.7239
A little dissatisfied|Moderately satisfied  2.3162  0.3722     6.2236
Moderately satisfied|Very satisfied         4.8746  0.3856    12.6427

Residual Deviance: 4065.195 
AIC: 4087.195 

Hess = TRUE keeps the matrix that summary() needs for the standard errors; without it, summary() fits the model again.

How to read the output

Code
b     <- coef(fit)                          # the slopes
theta <- fit$zeta                           # the thresholds
se    <- sqrt(diag(vcov(fit)))[names(b)]
z     <- b / se
p     <- 2 * pnorm(-abs(z))                 # summary() prints no p values: compute them
or    <- exp(b)                             # odds ratios
ci    <- exp(confint(fit))                  # their 95% confidence intervals (profile likelihood)
Part Meaning Here
Coefficients One slope \(\beta\) per predictor term, with its standard error and \(t = \beta / SE\). Positive: more satisfied respect: \(\beta\) = 0.73, SE = 0.07
Intercepts The thresholds \(\theta_j\), named after the two answers they separate Moderately satisfied|Very satisfied: 4.87
Residual Deviance \(-2 \ln L\): how badly the model fits; smaller is better. Used for the tests in section 6 4,065
AIC The deviance plus 2 for every parameter, for comparing models fitted to the same data 4,087
  • There are no p values. The t value is really a \(z\): compare it with the normal distribution. For respect, z = 10.03, p < .001.
  • The thresholds are the cut-points on the hidden scale for someone with every predictor at 0. Here that person does not exist (autonomy and respect start at 1, age at 18), so the thresholds mean little on their own; they are needed for the predicted probabilities.
  • One coefficient per predictor, not one per answer: that is the gain over the multinomial model.

The odds ratios:

Code
terms <- c(autonomy = "Autonomy (per step)", respect = "Respect (per step)",
           security = "Job security (per step)", stress = "Stress (per step)",
           "homeSome days" = "Works from home some days (vs never)",
           homeMainly = "Works mainly from home (vs never)",
           self_employedYes = "Self-employed (vs employee)", age10 = "Age (per 10 years)")
or_table <- data.frame(Predictor    = terms,
                       `Odds ratio` = f2(or[names(terms)]),
                       `95% CI`     = paste0("[", f2(ci[names(terms), 1]), ", ", f2(ci[names(terms), 2]), "]"),
                       p            = sapply(p[names(terms)], function(x) sub("= ", "", pval(x))),
                       check.names = FALSE, row.names = NULL)
knitr::kable(or_table, align = "lrrr")
Predictor Odds ratio 95% CI p
Autonomy (per step) 1.48 [1.32, 1.67] < .001
Respect (per step) 2.07 [1.80, 2.39] < .001
Job security (per step) 1.47 [1.31, 1.64] < .001
Stress (per step) 0.69 [0.62, 0.75] < .001
Works from home some days (vs never) 1.17 [0.96, 1.43] .130
Works mainly from home (vs never) 0.93 [0.73, 1.17] .527
Self-employed (vs employee) 1.57 [1.19, 2.08] .001
Age (per 10 years) 1.16 [1.09, 1.24] < .001

All at the same values of the other predictors:

  • Respect matters most: each step up the scale, for example from “agree” to “strongly agree”, multiplies the odds of a higher satisfaction answer by 2.07.
  • Autonomy (1.48 per step) and job security (1.47) also go with more satisfaction.
  • Stress goes the other way: each step more often stressful cuts the odds of a higher answer by 31% (odds ratio 0.69).
  • The self-employed have 1.57 times the odds of employees of a higher answer, and the odds rise by 16% with every 10 years of age.
  • Working from home: the confidence intervals include 1. Once autonomy, respect, security and stress are held constant, there is no clear difference between those who work from home and those who never do.

Working from home alone does go with more satisfaction, as section 2 showed:

Code
home_alone <- polr(satisfaction ~ home, data = d)
round(exp(coef(home_alone)), 2)
homeSome days    homeMainly 
         1.38          1.25 

On its own, working from home some days has an odds ratio of 1.38; with the other predictors, 1.17. The jobs that can be done from home also give more freedom and security, and these, not the place of work, carry the difference.

The same numbers by hand

Steps 2 and 3 for a typical worker: the median answer to each question, the median age, never works from home, an employee.

Code
sapply(d[c("autonomy", "respect", "security", "stress", "age10")], median)   # the medians
autonomy  respect security   stress    age10 
     3.0      3.0      4.0      3.0      4.1 
Code
x    <- c(autonomy = 3, respect = 3, security = 4, stress = 3,
          "homeSome days" = 0, homeMainly = 0, self_employedYes = 0, age10 = 4.1)
eta  <- sum(b * x[names(b)])                      # the place on the hidden scale
cum  <- plogis(theta - eta)                       # step 3: P(Y <= j), j = 1, 2, 3
prob <- setNames(diff(c(0, cum, 1)), satisfaction)  # P(Y = j)
round(prob, 3)
    Very dissatisfied A little dissatisfied  Moderately satisfied        Very satisfied 
                0.023                 0.088                 0.507                 0.381 
Code
# new people for predict(), with the factor levels of the model
people <- function(...) {
  x <- data.frame(...)
  for (v in intersect(names(x), c("home", "self_employed"))) x[[v]] <- factor(x[[v]], levels = levels(d[[v]]))
  x
}
typical <- people(autonomy = 3, respect = 3, security = 4, stress = 3, home = "Never",
                  self_employed = "No", age10 = 4.1)
round(predict(fit, newdata = typical, type = "probs"), 3)   # the same, from R
    Very dissatisfied A little dissatisfied  Moderately satisfied        Very satisfied 
                0.023                 0.088                 0.507                 0.381 

The typical worker is moderately satisfied with probability 51% and very satisfied with probability 38%.


5. Predicted probabilities: the easiest way to read the model

The hidden scale

Step 5 of section 3, with the fitted numbers: the hidden satisfaction of the typical worker if they disagree, and if they strongly agree, that they are treated with respect. Everything else stays the same.

Code
two <- people(autonomy = 3, respect = c(2, 4), security = 4, stress = 3, home = "Never",
              self_employed = "No", age10 = 4.1)
person <- c("Disagrees that they are treated with respect", "Strongly agrees that they are treated with respect")
centre <- eta + b[["respect"]] * (c(2, 4) - 3)        # eta of each: the typical worker has respect = 3
probs2 <- predict(fit, newdata = two, type = "probs")

grid   <- seq(-2.5, 11, by = 0.01)
curves <- do.call(rbind, lapply(1:2, function(k)
  data.frame(person = person[k], y = grid, density = dlogis(grid, centre[k]),
             answer = cut(grid, c(-Inf, theta, Inf), labels = satisfaction))))
curves$person <- factor(curves$person, levels = person)

# the probability of each answer, printed above its part of the scale
middle <- c(theta[1] - 0.9, (theta[1] + theta[2]) / 2, (theta[2] + theta[3]) / 2, theta[3] + 1.6)
labels <- data.frame(person = factor(rep(person, each = 4), levels = person),
                     y = rep(middle, 2), share = as.vector(t(probs2)))

ggplot(curves, aes(y, density)) +
  geom_area(aes(fill = answer, group = answer), position = "identity") +
  geom_line(linewidth = 0.4, colour = "grey20") +
  # the thresholds stop below their names, the center at the top of the curve
  geom_segment(data = data.frame(x = theta), aes(x = x, xend = x, y = 0, yend = 0.31),
               inherit.aes = FALSE, linetype = "dashed", colour = "grey40") +
  geom_segment(data = data.frame(person = factor(person, levels = person), x = centre),
               aes(x = x, xend = x, y = 0, yend = dlogis(0)), inherit.aes = FALSE, colour = "grey20") +
  geom_text(data = labels, aes(y, 0.29, label = pct(share)), size = 3.2, colour = "grey15") +
  geom_text(data = data.frame(person = factor(rep(person, each = 3), levels = person), y = rep(theta, 2),
                              label = rep(paste0("theta[", 1:3, "]"), 2)),
            aes(y, 0.33, label = label), parse = TRUE, size = 3.4, colour = "grey30") +
  facet_wrap(~ person, ncol = 1) +
  scale_fill_manual(values = colours) +
  scale_y_continuous(limits = c(0, 0.345), expand = c(0, 0)) +
  labs(title = "Where the hidden satisfaction of the typical worker falls",
       subtitle = "Dashed lines: the thresholds. Solid line: the centre of the distribution, eta.\nThe percentages are the areas: the probability of each answer.",
       x = "hidden satisfaction (Y*)", y = "density", fill = NULL) +
  theme_bw() +
  theme(legend.position = "bottom") +
  guides(fill = guide_legend(nrow = 2))

Latent – The hidden scale

Strongly agreeing instead of disagreeing moves the center of the distribution by \(2\beta\) = 1.45 to the right. The thresholds stay where they are, so more of the area falls above \(\theta_3\): the probability of “very satisfied” goes from 23% to 56%.

Predicted probabilities, one predictor at a time

The typical worker again, changing one predictor at a time:

Code
vary <- function(v, values) {
  x <- typical[rep(1, length(values)), ]
  x[[v]] <- values
  pr <- predict(fit, newdata = x, type = "probs")
  labels <- paste0(questions[[v]], ": ", answers[[v]][values])
  data.frame(question = factor(questions[[v]], levels = questions),
             answer = factor(rep(labels, 4), levels = rev(labels)),
             satisfaction = factor(rep(satisfaction, each = length(values)), levels = satisfaction),
             share = as.vector(pr))
}
predicted <- rbind(vary("respect", 1:4), vary("autonomy", 1:4), vary("stress", 1:5))
predicted$question <- droplevels(predicted$question)
stacked(predicted, "predicted probability of each answer, for the typical worker")

Profiles – Predicted probabilities, one predictor at a time

Code
p_resp   <- predict(fit, newdata = transform(typical[rep(1, 4), ], respect = 1:4), type = "probs")
p_stress <- predict(fit, newdata = transform(typical[rep(1, 5), ], stress = 1:5), type = "probs")
  • From “strongly disagree” to “strongly agree” that they are treated with respect, the probability that the typical worker is very satisfied rises from 13% to 56%, and the probability of being dissatisfied (very or a little) falls from 35% to 6%.
  • From work that is never stressful to work that is always stressful, “very satisfied” falls from 57% to 22%.
  • The odds ratio is the same at every step, the change in probability is not. Each step up the respect scale multiplies the odds by 2.07, but moves the probability of “very satisfied” by 10, 15, 18 percentage points: the effect on a probability depends on where a person starts.

Unlike the observed shares of section 2, these predictions follow the pattern of the model: every step up the respect scale helps, including the step from “strongly disagree” to “disagree”, which the few people who strongly disagree did not show.


6. Testing the predictors and the model

The likelihood-ratio test compares the deviances of two nested models. First the whole model against a model with thresholds only, then each predictor: drop it and see how much worse the model gets.

Code
null <- polr(satisfaction ~ 1, data = d)
model_test <- anova(null, fit)
model_test
Likelihood ratio tests of ordinal regression models

Response: satisfaction
                                                                  Model Resid. df Resid. Dev   Test    Df LR stat. Pr(Chi)
1                                                                     1      2164   4632.148                              
2 autonomy + respect + security + stress + home + self_employed + age10      2156   4065.195 1 vs 2     8 566.9527       0
Code
tests <- drop1(fit, test = "Chisq")
tests
Single term deletions

Model:
satisfaction ~ autonomy + respect + security + stress + home + 
    self_employed + age10
              Df    AIC     LRT  Pr(>Chi)    
<none>           4087.2                      
autonomy       1 4128.6  43.387 4.491e-11 ***
respect        1 4188.0 102.836 < 2.2e-16 ***
security       1 4127.8  42.591 6.748e-11 ***
stress         1 4148.2  62.972 2.096e-15 ***
home           2 4086.9   3.657  0.160641    
self_employed  1 4095.6  10.395  0.001264 ** 
age10          1 4108.2  23.048 1.580e-06 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
mcfadden <- 1 - deviance(fit) / deviance(null)   # McFadden's pseudo-R squared
mcfadden
[1] 0.1223952
  • Every predictor except working from home is significant. The \(\chi^2\) values rank them: respect (102.84), stress (62.97), autonomy (43.39) and job security (42.59), then age and self-employment. Working from home: \(\chi^2\)(2) = 3.66, p = .161.
  • McFadden’s pseudo-\(R^2\) = 0.12: one minus the deviance of the model divided by the deviance of the model with thresholds only. It runs much lower than the \(R^2\) of a linear regression; use it to compare models fitted to the same data.

Is the order worth using? The same predictors in a multinomial model, which ignores the order:

Code
multi <- nnet::multinom(formula(fit), data = d, trace = FALSE)
data.frame(model      = c("ordinal (polr)", "multinomial (multinom)"),
           parameters = c(length(b) + length(theta), length(coef(multi))),
           AIC        = round(c(AIC(fit), AIC(multi)), 1))
                   model parameters    AIC
1         ordinal (polr)         11 4087.2
2 multinomial (multinom)         27 4115.9

The ordinal model fits better by AIC, with 11 parameters instead of 27: the multinomial model spends 16 more parameters and gains less than they cost.

How often does the model pick the right answer, if it picks the most likely one for each person?

Code
guess <- predict(fit, type = "class")
table(observed = d$satisfaction, predicted = guess)
                       predicted
observed                Very dissatisfied A little dissatisfied Moderately satisfied Very satisfied
  Very dissatisfied                     6                    12                   48              9
  A little dissatisfied                 4                    10                  165             34
  Moderately satisfied                  1                    16                  574            323
  Very satisfied                        1                     8                  289            667
Code
accuracy  <- mean(as.character(guess) == as.character(d$satisfaction))
base_rate <- max(overall)   # always guessing the most common answer
c(model = accuracy, most_common_answer = base_rate)
             model most_common_answer 
         0.5800646          0.4453161 

58% right, against 45% for always guessing the most common answer. The model almost never predicts the two dissatisfied answers: they are rare, so for almost nobody are they the most likely answer. As in the multinomial example, the predicted probabilities carry the information, not the single best guess.


7. The proportional odds assumption

The model gives each predictor one slope for all three splits. Does it need three? A visual check first: fit a separate logistic regression at each split and compare the slopes.

Code
splits <- do.call(rbind, lapply(1:3, function(j) {
  dj <- transform(d, higher = as.integer(satisfaction) > j)   # TRUE above split j
  m  <- glm(update(formula(fit), higher ~ .), family = binomial, data = dj)
  data.frame(split = j, term = names(coef(m))[-1], b = coef(m)[-1], se = sqrt(diag(vcov(m)))[-1])
}))
short <- c(autonomy = "Autonomy", respect = "Respect", security = "Job security", stress = "Stress",
           "homeSome days" = "Home: some days", homeMainly = "Home: mainly",
           self_employedYes = "Self-employed", age10 = "Age (10 years)")
splits$term <- factor(short[splits$term], levels = short)
common      <- data.frame(term = factor(short, levels = short), b = b[names(short)])

ggplot(splits, aes(split, b)) +
  geom_hline(yintercept = 0, colour = "grey75") +
  geom_hline(data = common, aes(yintercept = b), colour = "#1c5cab", linetype = "dashed") +
  geom_errorbar(aes(ymin = b - 1.96 * se, ymax = b + 1.96 * se), width = 0.15, colour = "grey30") +
  geom_point(size = 2.2, colour = "grey15") +
  facet_wrap(~ term, ncol = 4, scales = "free_y") +
  scale_x_continuous(breaks = 1:3, limits = c(0.6, 3.4)) +
  labs(title = "The slope of each predictor at each split",
       subtitle = "Points: the slope from a separate logistic regression, with its 95% CI.\nDashed line: the one slope of the ordinal model.\nSplits: 1 very dissatisfied | the rest, 2 dissatisfied | satisfied, 3 very satisfied | the rest",
       x = "split", y = "slope (log odds of a higher answer)") +
  theme_bw()

Splits – 7. The proportional odds assumption

Code
security_splits <- splits$b[splits$term == short[["security"]]]

If the proportional odds assumption holds, the three points of each panel scatter around the dashed line, within their error bars. Most do. The clearest exception is job security: its slope grows from 0.07 at the first split to 0.45 at the third. Good job security seems to separate the very satisfied from the moderately satisfied more than it protects against being very dissatisfied. The confidence intervals are wide at the first split, though: only 75 people are very dissatisfied.

The formal test: fit the same model with clm() from the package ordinal, which can relax the assumption one predictor at a time. nominal_test() does that for each predictor and compares the two models with a likelihood-ratio test:

Code
# the same model as polr(), with the same estimates
clm_fit <- clm(satisfaction ~ autonomy + respect + security + stress + home + self_employed + age10, data = d)
nominal <- nominal_test(clm_fit)
nominal
Tests of nominal effects

formula: satisfaction ~ autonomy + respect + security + stress + home + self_employed + age10
              Df  logLik    AIC    LRT Pr(>Chi)
<none>           -2032.6 4087.2                
autonomy       2 -2032.5 4091.0 0.1898   0.9095
respect        2 -2031.5 4088.9 2.2979   0.3170
security       2 -2030.8 4087.6 3.5963   0.1656
stress         2 -2032.3 4090.7 0.4917   0.7821
home           4 -2031.4 4092.9 2.3305   0.6752
self_employed  2 -2032.5 4090.9 0.2827   0.8682
age10          2 -2032.2 4090.4 0.7607   0.6836

No predictor needs its own slopes: the smallest p is .166, for job security. The differences that the chart shows could be chance. The Brant test (Brant, 1990), in the package brant, is a common alternative that answers the same question.

If the assumption fails: a partial proportional odds model

If a predictor did fail the test, it could get one slope per split while the others keep one slope: a partial proportional odds model (Peterson & Harrell, 1990). In clm(), the predictors in nominal get their own slopes:

Code
partial <- clm(satisfaction ~ autonomy + respect + stress + home + self_employed + age10,
               nominal = ~ security, data = d)
coef(partial)[grep("security", names(coef(partial)))]
   Very dissatisfied|A little dissatisfied.security A little dissatisfied|Moderately satisfied.security        Moderately satisfied|Very satisfied.security 
                                         -0.1968220                                          -0.3232832                                          -0.4471662 
Code
anova(clm_fit, partial)
Likelihood ratio tests of cumulative link models:
 
        formula:                                                                             nominal:  link: threshold:
clm_fit satisfaction ~ autonomy + respect + security + stress + home + self_employed + age10 ~1        logit flexible  
partial satisfaction ~ autonomy + respect + stress + home + self_employed + age10            ~security logit flexible  

        no.par    AIC  logLik LR.stat df Pr(>Chisq)
clm_fit     11 4087.2 -2032.6                      
partial     13 4087.6 -2030.8  3.5963  2     0.1656

clm() writes these slopes as shifts of the thresholds, so the effect of security on a higher answer is the number shown with its sign changed: 0.20, 0.32, 0.45 at the three splits. The likelihood-ratio test is the same as the security row of nominal_test(), and the AIC is a little worse: two more parameters that do not pay for themselves. We keep the simple model. If several predictors failed, the alternatives are a model with every slope free (nominal = ~ ., the generalized ordered logit) or the multinomial model.

Four more things to keep in mind

Code
# answers given as categories instead of numbers: one coefficient per answer
fit_steps <- update(fit, . ~ . - autonomy - respect - security - stress +
                      factor(autonomy) + factor(respect) + factor(security) + factor(stress))
steps_test <- anova(fit, fit_steps)
stress_steps <- coef(fit_steps)[paste0("factor(stress)", 2:5)]   # hardly ever ... always, against never

# the people who answered on the web against those interviewed in person or by phone
very_by_mode <- prop.table(table(d$web, d$satisfaction), 1)[, "Very satisfied"]
fit_mode <- update(fit, . ~ . + web)
round(cbind(without_mode = coef(fit), with_mode = coef(fit_mode)[names(coef(fit))]), 2)
                 without_mode with_mode
autonomy                 0.39      0.39
respect                  0.73      0.73
security                 0.38      0.37
stress                  -0.38     -0.37
homeSome days            0.16      0.17
homeMainly              -0.08     -0.06
self_employedYes         0.45      0.44
age10                    0.15      0.15
  • Equal steps. The four scored questions count each step up the scale the same. Treating the answers as categories instead, with a coefficient for each answer, fits somewhat better, \(\chi^2\)(9) = 21.73, p = .010: the steps are not all equal. For stress, for example, the coefficients of “hardly ever”, “sometimes”, “often” and “always” against “never” are -0.64, -0.83, -1.41, -1.59, not evenly spaced. The scored model is easier to read and tells the same story.
  • Web or interview. In 2022 most people answered the GSS on the web. 41% of them said “very satisfied”, against 49% of those interviewed in person or by phone, as people often give more positive answers when an interviewer is listening. Adding the mode to the model leaves the other coefficients almost unchanged (above).
  • The sample, not the population. These are unweighted estimates for the people in the survey. To describe all US workers, use the GSS weights (wtssps) and the design of the survey, for example with svyolr() in the package survey (Lumley, 2010).
  • Association, not cause. People who like their work may also see their workplace in a better light, and judge it more respectful and more secure. One survey at one point in time cannot tell which comes first.

8. Reporting the results in APA style

A report (APA 7th edition) needs the outcome and its order, the predictors and how they were scored, the model test, the check of the proportional odds assumption and the odds ratios with their uncertainty. The numbers come from the R objects, so the text below always matches the results:

Code
n_model <- nrow(d)
lr      <- model_test$"LR stat."[2]
lr_df   <- model_test$"   Df"[2]
lr_p    <- model_test$"Pr(Chi)"[2]
ci_text <- function(t) paste0("95% CI [", f2(ci[t, 1]), ", ", f2(ci[t, 2]), "]")

Method (data analysis):

We analyzed the 2,167 employed respondents to the 2022 General Social Survey (Davern et al., 2024) who answered the job satisfaction question and the Quality of Working Life questions used here. Job satisfaction (very dissatisfied, a little dissatisfied, moderately satisfied, very satisfied) was analyzed with an ordinal logistic regression (proportional odds model). The predictors were autonomy, respect at work and job security (each scored 1–4) and work stress (scored 1–5), with higher scores meaning more; how often the respondent worked from home (never, some days, mainly); self-employment; and age. The proportional odds assumption was checked with likelihood-ratio tests of nominal effects. Analyses were conducted in R (Version 4.6.2; R Core Team, 2026) with the MASS (Venables & Ripley, 2002) and ordinal (Christensen, 2026) packages.

Results:

The predictors improved the fit over a thresholds-only model, χ²(8) = 566.95, p < .001, McFadden’s R² = .12, and no predictor departed from the proportional odds assumption (smallest p = .166). Holding the other predictors constant, respondents who felt more respected at work were more satisfied with their job, OR = 2.07, 95% CI [1.80, 2.39], as were those with more autonomy, OR = 1.48, 95% CI [1.32, 1.67], and better job security, OR = 1.47, 95% CI [1.31, 1.64]. More frequent stress went with lower satisfaction, OR = 0.69, 95% CI [0.62, 0.75]. Self-employed and older respondents were more satisfied (Table 1). How often respondents worked from home was not related to job satisfaction once the other predictors were held constant, χ²(2) = 3.66, p = .161.

Table 1

Odds Ratios From an Ordinal Logistic Regression of Job Satisfaction, General Social Survey 2022

Predictor Odds ratio 95% CI p
Autonomy (per step) 1.48 [1.32, 1.67] < .001
Respect (per step) 2.07 [1.80, 2.39] < .001
Job security (per step) 1.47 [1.31, 1.64] < .001
Stress (per step) 0.69 [0.62, 0.75] < .001
Works from home some days (vs never) 1.17 [0.96, 1.43] .130
Works mainly from home (vs never) 0.93 [0.73, 1.17] .527
Self-employed (vs employee) 1.57 [1.19, 2.08] .001
Age (per 10 years) 1.16 [1.09, 1.24] < .001

Note. N = 2,167. Odds ratios above 1 mean higher job satisfaction. Autonomy, respect and job security were scored 1–4 and stress 1–5, higher scores meaning more; age is in decades. Confidence intervals are profile-likelihood intervals.

Points to remember:

  • Say which way the outcome runs, and whether an odds ratio above 1 means a higher or a lower answer: programs differ.
  • Report odds ratios with 95% confidence intervals, and say that they hold the other predictors constant.
  • Give the model test (\(\chi^2\) with its degrees of freedom) and a pseudo-\(R^2\), and say which one.
  • Report the check of the proportional odds assumption, and what you did if it failed.
  • Predicted probabilities for typical people are easier to understand than odds ratios; show them where they help.
  • Cite R and the packages; citation("MASS") and citation("ordinal") give the references.

9. Summary

When The outcome is a category with three or more values in a natural order
Why not linear regression It assumes equal steps between the answers and predicts values nobody can give
Why not multinomial logistic regression It ignores the order and needs a set of coefficients for every answer
How (R) MASS::polr(y ~ x, data, Hess = TRUE), with y an ordered factor; or ordinal::clm()
Output Thresholds (one per split) and one slope per predictor; exp() of a slope is a cumulative odds ratio
Easiest to read Predicted probabilities: predict(fit, newdata, type = "probs")
Tests Likelihood-ratio tests with anova() and drop1(); McFadden’s pseudo-\(R^2\)
Assumptions Independent observations; proportional odds (the same slopes at every split)
If proportional odds fails A partial proportional odds model, clm(..., nominal = ~ x); or a multinomial model

References

Agresti, A. (2010). Analysis of ordinal categorical data (2nd ed.). Wiley.

Brant, R. (1990). Assessing proportionality in the proportional odds model for ordinal logistic regression. Biometrics, 46(4), 1171–1178. https://doi.org/10.2307/2532457

Christensen, R. H. B. (2026). ordinal: Regression models for ordinal data (R package version 2026.7-26). https://CRAN.R-project.org/package=ordinal

Davern, M., Bautista, R., Freese, J., Herd, P., & Morgan, S. L. (2024). General Social Survey 1972–2022 (Release 4) [Data set]. NORC at the University of Chicago. https://gss.norc.org/

Lumley, T. (2010). Complex surveys: A guide to analysis using R. Wiley.

McCullagh, P. (1980). Regression models for ordinal data. Journal of the Royal Statistical Society: Series B (Methodological), 42(2), 109–142.

Peterson, B., & Harrell, F. E., Jr. (1990). Partial proportional odds models for ordinal response variables. Journal of the Royal Statistical Society: Series C (Applied Statistics), 39(2), 205–217.

Venables, W. N., & Ripley, B. D. (2002). Modern applied statistics with S (4th ed.). Springer.

Wickham, H., Miller, E., & Smith, D. (2025). haven: Import and export ‘SPSS’, ‘Stata’ and ‘SAS’ files (R package version 2.5.5). https://doi.org/10.32614/CRAN.package.haven