Skip to main content
26 votes
Accepted

Does it make sense to use Logistic regression with binary outcome and predictor?

In this case you can collapse your data to $$ \begin{array}{c|cc} X \backslash Y & 0 & 1 \\ \hline 0 & S_{00} & S_{01} \\ 1 & S_{10} & S_{11} \end{array} $$ where $S_{ij}$ is ...
jld's user avatar
  • 20.4k
26 votes
Accepted

logit - interpreting coefficients as probabilities

These odds ratios are the exponential of the corresponding regression coefficient: $$\text{odds ratio} = e^{\hat\beta}$$ For example, if the logistic regression coefficient is $\hat\beta=0.25$ the ...
user1607's user avatar
  • 909
23 votes
Accepted

How do I calculate the standard deviation of the log-odds?

Essentially, the Delta Method is a way of "linearizing" a non-linear function using a Taylor Series expansion so that you can find the variance and hence the standard error. For example, ...
StatsStudent's user avatar
  • 11.5k
18 votes
Accepted

Odds Ratios paradox? Pooled OR inconsistent with subgroup ORs

You have discovered the property of non-collapsibility of the odds ratio. Very briefly, this means (among other things) that the pooled odds ratio is not a weighted average of the group-specific odds ...
COOLSerdash's user avatar
  • 30.8k
17 votes
Accepted

What a negative odd ratio means here

That’s the logarithm of the odds ratio, not the odds ratio itself. An odds ratio less than zero is nonsense. Looking at the behavior of a logarithm function (the base could be 2, could be 10, could be ...
Dave's user avatar
  • 64.3k
15 votes

Why do odds ratios from formula and R's fisher.test differ? Which one should one choose?

From the help page for fisher.test(): Note that the conditional Maximum Likelihood Estimate (MLE) rather than the unconditional MLE (the sample odds ratio) is ...
14 votes

Does confidence interval for odds ratio assume log-normal distribution?

Given the comments, I have included the proof of the floating equation at the bottom of the response. Given a two-by-two contingency table where the OR is $\frac{a/b}{c/d}$, if you take the log of ...
Heteroskedastic Jim's user avatar
14 votes
Accepted

Is meta-analysis of odds ratios essentially hopeless?

There are a number of alternative effects one can derive from the logistic regression model that do not suffer this same problem. One of the easiest is the average marginal effect of the variable. ...
Heteroskedastic Jim's user avatar
13 votes
Accepted

How to calculate Odds ratio and 95% confidence interval for logistic regression for the following data?

$\exp(1.4345) \approx 4.20$ $\exp(1.4345+1.96 \times 0.5346) \approx 11.97$ $\exp(1.4345-1.96 \times 0.5346) \approx 1.472$ In R ...
Henry's user avatar
  • 40.2k
12 votes
Accepted

Calculating risk ratio using odds ratio from logistic regression coefficient

Zhang 1998 originally presented a method for calculating CIs for risk ratios suggesting you could use the lower and upper bounds of the CI for the odds ratio. This method does not work, it is biased ...
AdamO's user avatar
  • 63.4k
12 votes

How to calculate Odds ratio and 95% confidence interval for logistic regression for the following data?

You can also use the confint.default function which is based on asymptotic normality. ...
nghauran's user avatar
  • 452
12 votes

logit - interpreting coefficients as probabilities

Part of the problem is that you're taking a sentence from Gelman and Hill out of context. Here's a Google books screenshot: Note that the heading says "Interpreting Poisson regression coefficients" (...
Ben Bolker's user avatar
  • 44.1k
11 votes

Poisson regression to estimate relative risk for binary outcomes

I too speculate at the prevalence of logistic models in the literature when a relative risk model would be more appropriate. We as statisticians are all too familiar with adherence to convention or ...
AdamO's user avatar
  • 63.4k
11 votes

How do I calculate the standard deviation of the log-odds?

I discovered a slightly easier way of coming to the same conclusion: \begin{align}\text{OR} &= \frac{ad}{bc}\\ \log(\text{OR}) &= \log(a) + \log(d) – \log(b) – \log(c) \\ & =\log(a) – \...
Parseltongue's user avatar
  • 1,010
11 votes
Accepted

Does the "divide by 4 rule" give the upper bound marginal effect?

I think it's a typo. The derivative of the logistic curve with respect to $x$ is: $$ \frac{\beta\mathrm{e}^{\alpha + \beta x}}{\left(1 + \mathrm{e}^{\alpha + \beta x}\right)^{2}} $$ So for their ...
COOLSerdash's user avatar
  • 30.8k
11 votes

The odds ratio calculated in my regression model seems to be too high

Is it okay that the direction of the fixed effects is opposite to the intercept in my model? Yes. The interpretation of the intercept is that it is the log-odds of the event (...
Robert Long's user avatar
  • 62.6k
10 votes
Accepted

Interpretation of the Fisher-exact test

The fisher's exact test in R by default tests whether the odds ratio associated with the first cell being 1 or not. That said, you can interpret the odds ratio 0.53 as: the odds of being male for a ...
SixSigma's user avatar
  • 2,322
10 votes

logit - interpreting coefficients as probabilities

If you want to interpret in terms of the percentages, then you need the y-intercept ($\beta_0$). Taking the exponential of the intercept gives the odds when all the covariates are 0, then you can ...
Greg Snow's user avatar
  • 52.3k
10 votes
Accepted

Interpreting zero odds ratio from Fisher's exact test

If in a 2-by-2 table, we let $n_{11}$ be the counts in (1,1) cell, $n_{12}$ the counts in the (1,2) cell, $n_{21}$ those of cell (2,1) cell and $n_{22}$ those of cell (2,2), then the sample odds ratio ...
utobi's user avatar
  • 11.9k
9 votes
Accepted

Fisher's Exact test implementation in R

You have chosen to do a one-sided test and, obviously, order is important in a one-sided test. Your first call to fisher.test is testing the null hypothesis Pct1 = ...
Gordon Smyth's user avatar
  • 13.1k
9 votes

Converting odds ratio to percentage increase / reduction

As other answers have clearly articulated, you can't represent an odds ratio as a simple percent increase or decrease of an event happening, as this value depends on the baserate. However, if you have ...
dbwilson's user avatar
  • 1,788
9 votes
Accepted

Odds ratio from logistic regression isn't negative when it should be

It may help to read more about how odds work. A place to start might be: Interpretation of simple predictions to odds ratios in logistic regression. To answer your specific question, $0.99$ is a ...
gung - Reinstate Monica's user avatar
9 votes
Accepted

Logistic regression: restrict the prediction range

Logistic regression is actually quite inflexible, since it is linear in the logit, a fact that is somewhat obscured by the fact that the plot on the original scale is nonlinear. In the present case, ...
Stephan Kolassa's user avatar
8 votes
Accepted

Explaining Odds Ratio and Relative Risk to the statistically challenged

You are of course right and it is a common mistake to describe an odds ratio like a relative risk ratio. I would suggest that it would be helpful to propose a more appropriate phrasing to them such as ...
Björn's user avatar
  • 33.2k
8 votes

Manually calculating logistic regression coefficient

You are right that although you should be able to calculate the OLS coefficient estimate in logit space, you can't do it directly because the logit, $g(y) = \log \frac{p}{1-p}$, goes either to $-\...
einar's user avatar
  • 4,272
8 votes

Log odds ratio - what happens if linearity fails?

You get biased and inconsistent coefficient estimates, and biased standard errors. Bias in standard errors can be in both directions and the probability of types I and II errors could increase. You ...
Kenji's user avatar
  • 858
8 votes

Odds "ratio" in logistic regression?

By "simple logistic regression," do you mean a logistic regression with one explanatory variable? $$\log(odds(x_i))=\log\left(\frac{p(x_i)}{1-p(x_i)}\right) = \beta_0 + \beta_1 x_i$$ We may ...
civilstat's user avatar
  • 4,393
8 votes

Odds Ratios paradox? Pooled OR inconsistent with subgroup ORs

The solution to the dilemma is to quit failing to condition on things you should condition on. If there is a factor affecting the outcome, it should be conditioned on. Simpson's "paradox" ...
Frank Harrell's user avatar
7 votes

Logistic Regression in R (Odds Ratio)

The epiDisplay package does this very easily. ...
Edward's user avatar
  • 71
7 votes
Accepted

Normalizing logistic regression coefficients?

The short answer is that normalizing the coefficients will not affect the predictions, but it will mess up the estimated class probabilities. Don't do it. The coefficients don't represent the odds ...
MiniQuark's user avatar
  • 2,210

Only top scored, non community-wiki answers of a minimum length are eligible