I am running a multivariate binary logistic regression trying to predict political party affiliation using the variables: Age, Sex, Race, Level of Education, Church Attendance

I have ran the regression using glm() in R and have got some pretty decent results. All of them being pretty significant with p-values less than .05.

I know that doesn't really speak to the validity of the regression but I am now trying to graph it and can't figure out if it's possible given how many "values" are within each category.

Although I am only using 5 variables I end up with about 15 values and I know that means a lot of potential graphs.

Is this possible and would anybody know how to set it up using R?

I have attempted to graph just the first few values thus far but it doesn't look correct and I'm thinking it would be impossible to have all the variable values in a single graph.

  • 1
    You just said "trying to graph it" but graph what? I mean what are you trying to tell the readers that a list of odds ratios cannot already be telling? And you said 15 because there are 2 in Sex + k in Race + k' in Education + ... etc.? – Penguin_Knight Jul 12 '16 at 20:54
  • @Penguin_Knight You have a point in the fact that my odds ratios might be a better way of communicating the results. But I just wanted to develop a general visualization on how each variable acts within the model. And yes, I have 2 in Sex + 3 in Race + 5 in Degree + 9 in Church – dylanjm Jul 12 '16 at 21:02
up vote 3 down vote accepted

What you can do is fix some of your variables and plot the predicted probabilities for the remaining variables. For example, you can plot the predicted probabilities against race and church attendance for 40 year old males with high school. Then make another plot of the predicted probability against age and gender for whites who attend service once a month and finished high school, etc. An example of such a graph (created using Stata not R) is below:

enter image description here

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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