Linear (equality) restrictions on parameters in a logistic regression


To illustrate, consider a consumer choosing to watch (or not) a movie. Suppose we want to model:
Pr(watch|genre_1, genre_2) = logit(\beta_0 + \beta * genre_1 + \beta_2 * genre_2)
where watch is a binary variable, logit is the logistic cdf, genre_1 and genre_2 are categorical (factor) genre descriptors.

I know how to estimate the logit model if \beta_1 and \beta_2 are unrestricted. However, genre_1 and genre_2 have the same levels and describe the same movie (the coding happens to be alphabetical by level). For e.g., in an action - adventure movie, action is genre_1 and adventure is genre_2, and in an adventure - comedy movie, adventure is genre_1 and comedy is genre_2. Therefore, suppose we want to force \beta_1 = \beta_2 so that the fixed effect of the adventure genre is the same regardless of whether the movie is adventure-comedy (in which case adventure is genre_1) or action-adventure (in which case adventure is genre_2).

Is there a way to estimate a logit model using brms where we force \beta_1 to be equal to \beta_2?


PS: The above example illustrates the modelling issue I am facing but is not the actual problem.

1 Like

This sound like a multiple membership model which can be built using mm (, discussed e.g. at Cross-classified multiple membership models with brms

Would that solve your problem?

Best of luck with your model!

1 Like

Thank you, that is exactly what I was looking for!