# Odds Ratio from Linear Regression?

Can I calculate Odds Ratios from a linear regression model?

Or is it only possible / allowed on a logistic model?

I have a linear mixed-effects model and I use R and the lmer command to run a regression and then the following code calculates odds ratios:

fit <- lmer(formula, data = reg_SwisciRuralUrban_bin)


OR <- exp(fixef(fit))

• What would you be calculating the odds ratio on? Does your $y$ value (response) represent a value between 0 and 1? A better question might even be, what are you trying to do and why? Jan 20 '19 at 18:59
• Y variables is NOT 0 and 1. Its a continious variable with values between 0 and 100. I guess I could then directly interpret the output from the fit. Correct? Jan 20 '19 at 20:23
• It's hard to see how you could interpret anything in your model as an odds ratio when the response is a continuous variable between 0 and 100 and you use linear regression.
– whuber
Jan 20 '19 at 20:55
• You could perform a beta regression. Or it may be easier for you to transform your variable into the range of real numbers between 0 and 1 (by dividing by 100) and using a generalized linear model with the logistic transform as your link variable. There are a few other options too It all depends on what you are trying to do. See here: stats.stackexchange.com/questions/43366/… Jan 20 '19 at 21:22
• Looks like an instance of the XY-problem Jan 21 '19 at 10:58

What you are (almost) doing is calculating some transformation (inverse logit, but it should be $$e^x/(1+e^x)$$) of the regression coefficient that for logistic regression would transform to an odds ratio. For alinear regression I am not aware of any useful interpretation of this quantity.