A logit, or the log of the odds, is the coefficient provided by a logistic regression in r. You can use exponentiation to convert logits to odds ratios, as seen above. The function exp(logit)/(1+exp(logit)) can be used to convert logits to probabilities. There are a few things to keep in mind concerning this process.
To begin, I'll utilise some data that can be replicated.
library('MASS')
data("menarche")
m<-glm(cbind(Menarche, Total-Menarche) ~ Age, family=binomial, data=menarche)
summary(m)
The Output is:
Call:
glm(formula = cbind(Menarche, Total - Menarche) ~ Age, family = binomial,
data = menarche)
Deviance Residuals:
Min 1Q Median 3Q Max
-2.0363 -0.9953 -0.4900 0.7780 1.3675
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -21.22639 0.77068 -27.54 <2e-16 ***
Age 1.63197 0.05895 27.68 <2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 3693.884 on 24 degrees of freedom
Residual deviance: 26.703 on 23 degrees of freedom
AIC: 114.76
Number of Fisher Scoring iterations: 4
As in your case, the coefficients displayed are for logits. We can see the sigmoidal function that is characteristic of a logistic model fit to binomial data if we plot this data with this model.
#predict gives the predicted value in terms of logits
plot.dat <- data.frame(prob = menarche$Menarche/menarche$Total,
age = menarche$Age,
fit = predict(m, menarche))
#convert those logit values to probabilities
plot.dat$fit_prob <- exp(plot.dat$fit)/(1+exp(plot.dat$fit))
library(ggplot2)
ggplot(plot.dat, aes(x=age, y=prob)) +
geom_point() +
geom_line(aes(x=age, y=fit_prob))
It's worth noting that the rate of change in probability isn't constant; the curve rises slowly at initially, then accelerates in the middle, before levelling off towards the conclusion. The probability difference between 10 and 12 is much smaller than the probability difference between 12 and 14. This indicates that summarizing the link between age and probability with a single number is difficult without altering probabilities.
To respond to your specific inquiries:
What does it mean to interpret odds ratios?
The probabilities of a "success" (with your data, this is the odds of taking the product) when x = 0 is the odds ratio for the value of the intercept (i.e. zero thoughts). The rise in odds above this value of the intercept when you add one entire x value (i.e. x=1; one thought) is the odds ratio for your coefficient. Using the data from menarche:
exp(coef(m))
(Intercept) Age
6.046358e-10 5.113931e+00
We can deduce that the chances of menarche occurring at age 0 are.00000000006. Or, to put it another way, nearly impossible. The projected increase in the probabilities of menarche for each unit of age is calculated by exponentiating the age coefficient. It's little over a quintupling in this situation. A one-to-one odds ratio shows no change, while a two-to-one odds ratio indicates a doubling, and so on.
Your odds ratio of 2.07 means that increasing 'Thoughts' by one unit raises the chances of taking the product by a factor of 2.07.
How do you translate thinking odds ratios to a decision probability estimate?
Because the change is not consistent over the range of x values, as shown in the plot above, you must do this for selected values of thinking. Get the following response if you want to know the probability of some value for thoughts:
exp(intercept + coef*THOUGHT_Value)/(1+(exp(intercept+coef*THOUGHT_Value))
hope this helps.
Read the Artificial Intelligence tutorial to learn more about Artificial Intelligence and Machine Learning. Also, enrol in Machine Learning Course to become proficient.