# Is it fine to get this results in binary logistic regression?

I wanted to check whether the level of satisfaction relates to the level of support to the value of democracy. Dependent variable (support) is binary variable (Good/Bad) and independent variable is ordinary variable (level of satisfaction). After doing binary logistic regression, I got this “strange” figure. Is this result correct? Or how can I fix it?

satisfaction <- data_american$V23c support <- data_american$V130b
dat=as.data.frame(cbind(satisfaction,suport))
library(ggplot2)
ggplot(dat, aes(x=satisfaction, y=support)) + geom_point() +
stat_smooth(method="glm", family="binomial", se=FALSE)


Here is a part of data:

   satisfaction support
1             7       1
2             8       1
3             8       1
4             8       1
5            10       1
6             6       1
7             7       1
8             7       1
9             7       1
10            8       0
11            8       1
12            7       1
13            7       0
14            1       1
15            7       1
16            8       1
17            6       1
18            7       1
19            8       1
20            8       1


> satisfaction_j <- jitter(satisfaction)
> chisq.test(table(satisfaction_j,support))

Pearson's Chi-squared test

data:  table(satisfaction_j, support)
X-squared = 2158, df = 2157, p-value = 0.4899

> t.test(satisfaction_j~support)

Welch Two Sample t-test

data:  satisfaction_j by support
t = -2.7775, df = 459.931, p-value = 0.005703
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-0.57390716 -0.09829989
sample estimates:
mean in group 0 mean in group 1
7.164214        7.500317

• send summary of the data. Seems like there is some issue in your data. i.e it does not follow any pattern – show_stopper Nov 4 '14 at 7:19

Your satisfaction variable is discrete. I very strongly suspect that you have more low satisfaction scores among non-supporters, and more high satisfaction scores among supporters. You don't see this in your graph, since multiple dots (e.g., multiple non-supporters with satisfaction score 2) are plotted on top of each other.

Consider jittering the satisfaction scores for plotting (?jitter) and looking at chi squared tests and/or simple t tests:

chisq.test(table(satisfaction,support))
t.test(satisfaction~support)


EDIT: based on your t test, you can say that non-support is associated with statistically significantly lower satisfaction (supporters have an average satisfaction of 7.50, non-supporters 7.16, $t_{460}=2.78$, $p=.006$). Of course, you can't really deduce causality from your data.

If you have more regressors, you could consider a logistic regression. With just satisfaction as an independent variable, that would look like this:

model <- glm(support~satisfaction,family="binomial")
summary(model)


This will give somewhat different results from your t test. It's a bit more complicated, and I wouldn't consider the added complexity to be warranted unless you do have additional regressors.

• Thank you very much for your comment. I added the results based on your answer, but what are these for??　Could you explain a little bit more? – user51966 Nov 4 '14 at 9:56
• I edited my answer. – Stephan Kolassa Nov 4 '14 at 10:05
• Using geom_hex might give an even more clear picture than adding jitter. – Roland Nov 4 '14 at 10:25

By simply looking at the data, it is visible that there is no clear distinction in support or nonsupport based on satisfaction. It seems like regardless of the satisfaction, every one is supporting and hence is being reflected in graph (all satisfaction levels are above 0.5 support) There could be several explainations. Either your data is biased towards values which are supporting (much more support examples as compared to examples of those non supporting), or satisfaction by itself is not a good predictor of support. Do you have any other variable available which could be used?

• Thanks for your comment. The reason I did this analysis is that I wanted to see how satisfaction (with current government) relates to support (in the democratic value), which means prediction is not my main purpose. Can I say from this data that "even though people are not satisfied with the government, they support democratic value"? Or, should I do another method to say this? – user51966 Nov 4 '14 at 9:51
• True. I think the above statement can be made in light of the above data. You can further show that the pvalue of the coefficient of satisfied in the logistic model is greater than 0.01 or 0.05, and hence there is no significant effect of satisfaction on government support. – show_stopper Nov 6 '14 at 11:06