2
$\begingroup$

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")
$\endgroup$
2
  • $\begingroup$ 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 of the package (link opens PDF). $\endgroup$
    – smillig
    Jun 8 '15 at 9:06
  • $\begingroup$ Possible duplicate of stats.stackexchange.com/questions/73320 $\endgroup$
    – smillig
    Jun 8 '15 at 9:34
2
$\begingroup$

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 = [...]).

$\endgroup$

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