2

I am working on a paper, attempting to explain the effects of certain influences on terrorist organizations with regards to politicizing. Using VISREG I am able to create visualizations to depict each regression when I have 1 DV and 1 IV. When I attempt to visualize the script below, I get an error. Any suggestions? Also, I am very new to R and R studio. I have only been working with this program for 3 months. Any assistance would be greatly appreciated.

#Ended Through Politics model
m5 <- glm(Politics ~ Peak.Size + 
            Lifespan..0.recoded.to.1 + Any.Negotiation.with.Government+
            govmil + Economy + FreeScale + Right.Wing +
            Left.Wing + Nationalist + Religious + Regime.Change +
            Territorial.Change + Policy.Change + Empire + Social.Revolution +
            Status.Quo, data=main, family="binomial")
Andy
  • 18,070
  • 20
  • 77
  • 100
  • I'm not trying to be pedantic, but by VISREG, do you actually mean `visreg`? If yes, `visreg(m5)` should work, at least according to [this description](http://myweb.uiowa.edu/pbreheny/publications/visreg.pdf) of the package (link opens PDF). – smillig Jun 08 '15 at 09:06
  • Possible duplicate of http://stats.stackexchange.com/questions/73320 – smillig Jun 08 '15 at 09:34

1 Answers1

2

A partial residual plot (also known as component+residual plot) is usually the way to go. It shows the relationship between each predictor variable and the response variable given that other predictor variables are also in the model. In R you can do it with the crPlots function in the car package or the prplot function in the faraway package.

Using your example and the crPlots function, you could try:

library(car)
crPlots(m5)

You might want to narrow it down using crPlots(m5, terms = [...]).

smillig
  • 2,336
  • 28
  • 31