# Confidence interval for the increase in P(Y=1) from moving between 2 levels of a factor in logistic regression

I have a logistic regression model fit with one categorical variable $x$ that takes value in $\{1,2,3,4,5\}$.

In R I have obtained the estimate and standard error for $\beta_0$ and $\beta_1$. The question is if it's possible to get a 95% confidence interval on the increase in estimated probability, when $x$ rises from $2$ to $4$. In other words, I want to get CI on $[P(y=1|x=4)-P(y=1|x=2)]$. I know how to construct the CI for estimate when $x$ is at $2$ OR $4$, but don't know how to get the CI when $x$ changes from $2$ to $4$.

• It's a bit unclear what you are asking here. When you say your variable is "categorical" that would suggest you have five categories not measured along a scale (e.g. "blue", "red", "yellow", "green", "purple") which you have just-so-happened to label as numbers. Asking for a 95% CI for the increase in likelihood for a change from "red" to "green" is a question that makes sense - but in that case you would need more than two regression coefficients (you'd need a regression coefficient for each dummy variable). I wonder whether you mean "discrete" instead of "categorical"? – Silverfish Sep 17 '16 at 14:19
• Hi @Silverfish, thanks. Yes I do mean discrete rather than categorical, and would like to know how to construct an CI when x increases from 2 to 4 in that case. – Camuslu Sep 17 '16 at 18:03
• I don't believe that the likelihood is a physical quantity which has much interpretation, and so creating a confidence interval for a difference in likelihoods makes much sense. It is important to realize the likelihood ratio test is based on a difference in the log likelihoods, so on the natural scale a CI based difference would be inefficient. – AdamO Sep 17 '16 at 18:06
• Actually it would also be worth clarifying what you mean by "likelihood" - I suspect you are using it in a non-technical way, to mean "estimated probability", but it has a quite distinct technical meaning also. It's common in logistic regression for the increase in the chances of something happening to be measured by the odds ratio – Silverfish Sep 17 '16 at 18:11
• @Silverfish yes I do mean "estimated probability" by the term "likelihood". So I want to know the CI of the quantity [P(y=1|x=4) - P(y=1|x=2)]. Hope this clarifies! – Camuslu Sep 17 '16 at 22:36