# What type of regression to use when outcome is integers from 0 to 5

Say I have a questionnaire with 5 questions about anxiety. For each question, their response is rated a 1 or 0. Their total anxiety score is the sum, so an integer between 0 and 5.

Now I would like to run a regression model for explanatory purposes to see the effects of predictors on anxiety level. This data isn't continuous and is bounded, so linear regression doesn't seem like a good fit.

What alternative would you suggest? I want to use the right model, but also do not want to over=complicate the interpretation of the findings (this is for psych research). The way the outcome is calculated appears to fit with binomial (trials are the questions, 1s are successes), but I have never seen this binomial regression used for something like this.

• A few initial comments: ordinal regression would be a good candidate. Practically, it works at lot like common OLS multiple regression, and is easy enough to do with some software packages. ... I think your instinct is correct to shy away from common linear regression in this case. Mar 16, 2023 at 18:05
• My first thought was to go ordinal, but I wasn't sure because the outcome doesn't seem ordinal in nature (I can quantify the space between levels).
– Matt
Mar 16, 2023 at 18:13
• An alternate approach would be to do hierarchical binomial regressions. Mar 16, 2023 at 18:17
• since the atomic variable is a binary yes/no variable and you sum across five of them, a Binomial(5,$\theta$) seems a good start. Mar 16, 2023 at 19:30
• In some implementations of ordinal regression --- like the ordinal package in R ---, you can specify that the ordered categories are equally spaced. ... That being said, I'd prefer the logistic (binominal) regression approach. With this, you could include Question on the right hand side of the model. This allows you to get the effect of your predictors on "yes" overall, but also compare among the questions. You would need to account for the repeated measures nature of the same respondent answer all five questions. Mar 17, 2023 at 11:45

@Doctor Milt's response is on the right track, but I think this is much more naturally handled using a multilevel logistic (or probit) regression, each person's response to each item (0 or 1) as the outcome variable.

You would definitely want to allow the average probability of a 1 vary across participants and across questions (random intercept). You would probably also allow the influence of your predictors to vary across questions (random slopes), although depending on your data set this model might be too complicated to estimate. This is a class of item response theory model.

With a data frame containing one row per response, the random intercepts and slope model would be coded in R as

glmer(response ~ predictor1 + predictor2 +
(1 | participant_id) +
(1 + predictor1 + predictor2 | question_id),
data = your_data, family = binomial)


You might also consider using brms to fit this model. brms has excellent support for item response theory models (see https://arxiv.org/pdf/1905.09501.pdf).

I like the idea of a Bernoulli model, as you could start with some strong assumptions and gradually relax them.

Let $$Y_{ij} \sim \mathrm{Bernoulli}(p_{ij})$$, $$i=1,\ldots,n$$, $$j=1,\ldots,5$$, be the response given by the $$i$$th person to the $$j$$th question. The probability $$p_{ij}$$ is a function of the explanatory variables, $$\mathrm{logit}(p_{ij}) = \beta^{(0)}_{j} + \sum_{k=1}^K \beta^{(k)}_{j} x_{ik}$$.

You could try:

1. $$p_{ij}=p_i$$, i.e. a person is equally likely to respond yes to any of the 5 questions. Their final score is then $$S_i=\sum_{j=1}^5 Y_{ij} \sim \mathrm{Bin}(5, p_i)$$, as in @utobi's comment. You can drop the $$j$$ subscripts from the regression coefficients.

2. A person is more likely to respond yes to some questions than others, but the relationship between predictors and outcome is the same for every question. This means that the slope coefficients ($$\beta^{(k)}_{j}$$) are the same for all $$j$$, but the intercepts ($$\beta^{(0)}_{j}$$) are different for different $$j$$.

3. The relationship between predictors and outcome varies by question, so you have different intercepts and slopes for each $$j$$. At this point, you could think about whether a prior distribution on the regression coefficients makes sense.

• Like this! A good mid-level complexity model would also be Beta-Binomial regression (supported by same packages) - that is you still clump all the answers together and have just a single predictor, but you allow a bit more flexibility than the pure binomial model which can have trouble fitting more dispersed data. Conceptually it is assuming the probability for each question is the same per person, but may vary somewhat even between persons that share all predictor values. Mar 17, 2023 at 10:58