# Continuous variable has very large odds ratio in binary logistic regression

Any help would be very much appreciated. I have run a binary logistic regression model. My dependent variable is impaired or not-impaired (following stroke), I have two predictors one is age the other is an EEG variable called theta power. Both predictors are continuous variables. I have checked the assumptions and there is no indication for multicolinearity (both variables VIF=1.154, tolerance =0.866).In addition there is no indication that the model violates the assumption of linearity (I ran a check using linear regression).

My results show that the model is significant (Chi-square=13.779, df=2, sig=0.001). The sample is not large, only 31, however I only included two predictors with this in mind.

One of my predictors has an enormous Exp(B) value and confidence intervals to go along with it.

Age: B=0.084, S.E.=0.046, Wald=3.364, df=1, sig=0.067, Exp(B)=1.087, 95%C.I. for Exp(B)=0.994-1.189

ThetaPower: B=16.259, S.E.=8.019, Wald=4.112, df=1, sig=0.043, Exp(B)=11516574.29, 95%C.I. for Exp(B)=1.721-7.705+E13

There is only a very small variance in theta values (0.012) compared to age (202.034), could this be the reason for the extremely large odds ratio and confidence intervals? Is there anyway I can 'fix' this to keep this variable in my model and report the statistics in a more meaningful way?

My data are included now

• I think you may need to check you data to see whether they are reasonable. Since there are only 31 samples with two predictors, you may show your data here with some modifications. Then people can see what happened to your model. – Deep North Aug 7 '15 at 0:16
• Thanks, I have added my data with assumptions testing as well. The columns to look at are predictors=Age and theta, dependent=MoCA dich – Emma Aug 7 '15 at 0:54
• I have also checked each value for each participant and none are incorrect or unrealistic values – Emma Aug 7 '15 at 0:55
• google "complete separation" and "Hauck-Donner effect" ? – Ben Bolker Aug 7 '15 at 2:38
• See How to deal with perfect separation in logistic regression?. A huge coefficient estimate together with huge standard errors is a symptom & you should see some predicted values are either 0 or 1 - to check definitively for separation & to identify the predictors with which it occurs see Konis (2007). "Linear programming algorithms for detecting separated data in binary logistic regression models", DPhil, U. Oxf., implemented in the R package safeBinaryRegression. – Scortchi - Reinstate Monica Aug 7 '15 at 9:21

After reading Scortchi and Ben's comments, I think I may have found a solution for you.

I think the problem is your scale of predictor. You know a regression coefficient represents the change in Y (outcome variable) relative to a one unit change in the respective independent variable. For your logistic regression your Y is probability of impaired.

For age, it is 1 years change to affect your probability to be impaired.

For your Theta, it is also 1 units change, but attention, your values are 0.1, 0.2,..., so the value "1" might not in a reasonable rage of your measurement. The same as a human can not live for 1000 years, if your unit is 1000 years, then the coefficient will be huge.

I think you may either divide yoru coefficient by 10 directly or may

change your theta power's unit, I don't know what it is.

Such as multiple your theta values by 10 then the results seem more reasonable.

age<-c(77,84,45,47,72,61,78,49,79,77,74,54,65,52,80)
theta<-10*c(0.117,0.443,0.136,0.285,0.107,0.113,0.263,0.146,0.182,0.299,0.148,0.097,0.091,0.151,0.302)
impaired<-c(0,1,1,1,1,NA,1,0,1,1,1,0,0,0,NA)
mydata<-data.frame(cbind(age,theta,impaired))

logistic <- glm(impaired ~ age+theta, data = mydata, family = "binomial")
summary(logistic)


The results seem much better, but need to be understood according to your new unit. • (+1) I'd just like to try & avert a potential misreading: the "problem" is only apparent, & arises from forgetting that a unit change in theta is very large in relation to the range of the data; the "better" model hasn't changed in any substantive respect. – Scortchi - Reinstate Monica Aug 7 '15 at 15:24
• Thank you all for taking the time to review and think about my question here, it is very much appreciated. From your feedback and suggestions seems as though there is no 'right' answer however by standardising my predictors or as as suggested multiplying them by 10 the results are more easily interpreted and to readers of my research will make more sense. – Emma Aug 9 '15 at 23:51

Your problem is a lack of information. An explanation follows, but your options are to

1. Collect more data
2. Use a bayesian method where you provide information about the variable's beta via a prior
3. Use a penalized objective function, like those provided in the glmnet package

Explanation

Without typing in the data manually, what I believe is happening is that you have a dichotomous predictor where the sample proportion is 1.0 within one of its levels. Note that when the true proportion is exactly 1, the linear link function $\log p / (1 - p)$ must be infinity. In reality however, when the likelihood is being maximized on your computer, that variable's value of beta just keeps getting larger as the optimization routine continues, until it terminates due to some stopping condition. It's not infinity, but it's pretty close ;)

Edit: From comments below, I learned that the situation was not the dichotomous predictor situation described above. So I took a closer look at the data and noticed what I believe is the culprit: whenever ZRE_1 is positive, MOCHA2DICH is 1, and whenever ZRE_1 is negative, MOCHADICH is 0. The same basic reasoning from my earlier explanation would apply to the coefficient of ZRE_1, if MOCA2DICH is indeed the response.

• I am towards the end of my studies now and cannot collect more data due to time restraints. Thanks for your suggestions, very much appreciated. Could you elaborate anymore on what this means? 'Use a bayesian method where you provide information about the variable's beta via a prior', specifically the term 'prior' – Emma Aug 7 '15 at 1:45
• If you've got time constraints, then following up on 2) is probably not your best bet. Maybe worth your time afterwards, because it's interesting. In the meantime, to try 3), check out the "Ridge Regression" section of this link: machinelearningmastery.com/penalized-regression-in-r. It's a very short example that is provided and you can say in your work, "I estimated the coefficients using the popular logistic ridge regression penalty." – Ben Ogorek Aug 7 '15 at 2:43
• Thanks Ben, unfortunately I am using SPSS and am very ignorant to how to use coding. I can see they have an option to run a categorical regression analysis which has the option of running a ridge regression. I am a bit confused at this stage about the point of this. Am I running this to get a regression analysis I can use instead of the the binary logistic regression OR am I running it to get some type of recoded predictor (theta power) values I can then re-run in a binary logistic regression analysis? – Emma Aug 7 '15 at 3:11
• I found a very useful website that outlines the value in standardising predictors (using the z scores) when use binary logistic regression. When I do this I get a normal odds ratio (Exp(B)) and confidence intervals are much more reasonable. The document that outlines this method is from this website core.ecu.edu/psyc/wuenschk/MV/multReg/Logistic-SPSS.pdf – Emma Aug 7 '15 at 7:25
• (+1) But it turns out there isn't separation in this case. @Emma: Standardizing the predictors may be more convenient for description, that's all - there's nothing wrong with having a large odds ratio (as you've noted, the range of theta in the data is numerically small) - predictions from & inference about the model will be the same. – Scortchi - Reinstate Monica Aug 7 '15 at 13:01

I used the first 15 observation to check your calculations. I think I did not find very very strange results. The followings are my R code.

age<-c(77,84,45,47,72,61,78,49,79,77,74,54,65,52,80)
theta<-c(0.117,0.443,0.136,0.285,0.107,0.113,0.263,0.146,0.182,0.299,0.148,0.097,0.091,0.151,0.302)
impaired<-c(0,1,1,1,1,NA,1,0,1,1,1,0,0,0,NA)
mydata<-data.frame(cbind(age,theta,impaired))

logistic <- glm(impaired ~ age+theta, data = mydata, family = "binomial")
summary(logistic)


I did not see big age coefficient but theta's coefficient might be too big. • Thank-you for your help. Could you explain your findings a bit more please. Are you indicating that the results I outlined for the binary logistic regression could be false/incorrect? – Emma Aug 7 '15 at 1:43
• I think you may check your statistical program or procedures. – Deep North Aug 7 '15 at 1:46
• I have re-run with the missing values removed and it makes no difference. I am using SPSS program so there are no options to mess up the input. I have also followed the procedure outlined in Andy Field's text book so I think that I have done all the test and input correctly. I think I will look into the suggestion below given by Ben and try out the solutions he thinks may work. – Emma Aug 7 '15 at 1:51
• (+1) Note the standard error is not especially large compared to the point estimate of the coefficient. To be sure I copied your code & checked - there is no separation. (Including the further 16 observations could not introduce separation.) – Scortchi - Reinstate Monica Aug 7 '15 at 12:49