4
$\begingroup$

This figure:

odds ratios

shows my odds ratios. I believe they have to be linear for logistic regression to work and am wondering how to pre-process these data. Thanks.

$\endgroup$
5
  • $\begingroup$ Just for clarification, do the points at the 0.0 line really mean no observations within that category (from -30 to -15) or a very small odds ratio (same for the NA category at the rightmost of the plot)? $\endgroup$
    – Andy W
    Nov 30, 2011 at 14:10
  • $\begingroup$ The observed values are in this range [-13.77 ... 36.56]. Sorry the -30...30 stems from the binning in R, which I tried for several predictors some of which go down to -30. $\endgroup$
    – cs0815
    Nov 30, 2011 at 14:18
  • $\begingroup$ What do you intend to do with these data? They look great for exploration, but for formal hypothesis testing your options will be limited. $\endgroup$
    – whuber
    Nov 30, 2011 at 15:45
  • $\begingroup$ Thanks for the comment. Ultimately I would like to apply Bayesian Logistic Regression adjusted for presence-only data. See paper: Data Augmentation Approach in Bayesian Modelling of Presence-only Data. I am currently trying to get the naive Bayesian Logistic Regression to work whilst pre-processing the data correctly. $\endgroup$
    – cs0815
    Nov 30, 2011 at 15:58
  • 1
    $\begingroup$ The non-monotonic behavior of log-odds - can it be explained by the sparse amount of data in the corresponding bins? In other words, what is the order of magnitude of data case counts contributing in the positive bins? The jump in the 24-27 bin looks like an indication of sparse data to me.. $\endgroup$
    – Yevgeny
    Dec 20, 2011 at 19:11

1 Answer 1

1
$\begingroup$

The data looks fine. Another reasonable way to show it on a plot (that connects to logistic regression) is to plot each binary outcome Y against its corresponding X. Then add a smoother (e.g. loess in R, with iter=0) to see how the proportion with Y=1 varies with X.

Logistic regression does not require that the odds (or log odds) be linear in X; depending on what you want to do with the data, fitting a simple logistic regression of Y on X can tell you about an overall trend. Other options would be to regress Y on a spline representation of X. Or, yes, taking a Bayesian approach to a model in which the expectation of binary Y is logistic-linear in X, or some function of X - a.k.a. Bayesian logistic regression.

$\endgroup$
3
  • $\begingroup$ Thanks. I thought it has to be linear. I did lots of google searches and did not find anything really on data pre-processing for LR )-:. Can you apply LR to situations like this: ]-10 ... -5] the response variable is very likely to be zero, ]-5...5] the response variable is very likely to be one and ]5...10] the response variable is very likely to be zero? $\endgroup$
    – cs0815
    Dec 1, 2011 at 9:15
  • $\begingroup$ Yes, you can use logistic regression in this situation. Using a spline might be a good idea here. $\endgroup$
    – guest
    Dec 2, 2011 at 6:42
  • $\begingroup$ How? If I use a logit link function I cannot have low probabilities for low values (]-10 ... -5] ) and high values (]5...10]) but high probabilities for medium values (]-5...5])?! $\endgroup$
    – cs0815
    Dec 2, 2011 at 10:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.