-
-
Notifications
You must be signed in to change notification settings - Fork 25
Suppose I have a logistic regression (or ordinal regression) log odds ratio for a continuous predictor (standardized to have mean 0 and variance 1). Would the "log-odds ratio to Cohen's d" conversion formula still be valid? Or is it only designed for a binary predictor?
https://easystats.github.io/effectsize/reference/d_to_r.html
image
EDIT: I also asked a similar question on CrossValidated.
All reactions
Replies: 2 comments 3 replies
You can do this, and it wouldn't be incorrect, but it probably wouldn't be very meaningful.
One way to think about Cohen's d is as a slope of a binary variable standardized by the residual variance estimated by the model.
mod <- lm(mpg ~ am, mtcars) coef(mod)[2] / sigma(mod) #> am #> 1.477947 effectsize::cohens_d(mpg ~ am, data = mtcars) #> Cohen's d | 95% CI #> -------------------------- #> -1.48 | [-2.27, -0.67] #> #> - Estimated using pooled SD.
We can get a similiar approx with a logistic regression of the dichotomized outcome:
mod2 <- glm(I(mpg > mean(mpg)) ~ am, family = binomial("logit"), data = mtcars) effectsize::logoddsratio_to_d(coef(mod2)[2]) #> am #> 1.392507
Very close!
All of this is to say that your question is really asking if it's meaningful to standardized by the residual variance in a multiple linear regression? With a continuous predictor? Maybe @bwiernik has something smart to say to this... I don't find this particularly useful.
Besides that, the approximation probably doesn't hold because the linear relationship on the continuous scales is not the same as the sigmoidal relationship on the binary scale...
All reactions
@mattansb thanks a lot for your reply!
It sounds like this approach might work but is kind of controversial and perhaps not well studied yet.
I'm starting to rethink my approach and I've been looking into the RESI effect size for a continuous predictor in an ordinal regression model. RESI is a general effect size for GLMs and can also be used for power analysis. I've posted an example here in case you are interested.
Longterm it might be cool to add RESI to effectsize R package!
All reactions
As far as I can tell RESI doesn't have any interpretation other than comparatively small/large? (Unlike eta-sq, which is a (partial) squared correlation, Cohen's d that is a SMD, etc...).
Since F_to_epsilon2(), z_to_d(), chisq_to_phi(adjust = TRUE) etc are also unaffected by sample size, this means these are all just transformations of each other.
Maybe I'm missing something with RESI?
All reactions
As far as I can tell RESI doesn't have any interpretation other than comparatively small/large?
Yes, that's my understanding. It's a standardized unitless signed measure, indicating the strength (and direction) of the association between a predictor and outcome, with larger absolute values meaning a larger association.
The major benefit is it is pretty model agnostic, my understanding is it can work with most GLMs. There are pseudo-R2 like methods for GLMs, but RESI seems like a nice alternative that probably avoids some of the downsides of pseudo-R2s, although I'm not certain about this.
All reactions
A few considerations here:
- For an odds ratio for a continuous predictor, the OR reflects the change in odds for a 1-unit increase in the predictor. For example, if I have age measured in years and have an OR of 1.01, that means that the odds of success increase by 1% for each year the person is older.
You can arbitrarily scale the size of the OR by rescaling the predictor. For example, if I scale age to be in terms of 10 years increments, the OR will be 1.04 corresponding to a 4% increase in odds per 10 years older.
You should scale your continuous predictors so that the "1 unit" change in the predictor corresponds to a meaningful change in the predictor value (eg, 1 year might be appropriate for school age children, but 10 years more appropriate for adults).
- The pi/sqrt(3) transformation is an approximation and a difficult one to interpret. It attempts to scale the OR to a d-like metric by dividing the difference in log odds between predictor groups by the standard deviation of the latent logistic distribution underlying the logistic regression model.
There are 2 big issues with this transformation. First, the appropriate scaling factor depends on the latent odds. pi/sqrt(3) is a good approximate value that is close across the range of the distribution, but for more extreme odds values, it's less accurate.
Conceptually, I don't think this transformation makes much sense. A d value for a continuous outcome is a mean difference scaled in terms of the SD of the outcome variable. It can be interpreted in terms of the observed variable.
The OR-to-d conversion is a mean difference in log odds scaled by a latent logistic distribution. It doesn't really have a meaningful direct interpretation in terms of the observed variable. I think the conversion can be useful to give a rough sizing reference for readers who are more used to interpreting d values vs OR, but the values aren't really meaningful inherently and it is better to work and interpret in the OR metric.
You certainly shouldn't use this conversion to convert OR to d for combining with real d values in a meta-analysis (one possible exception would be if the outcome variable was artificially dichotomized to compute the OR, but there are often better computations there as well).