# Q below was dropped from original draft # Q3: Amorim-Neto and Cox. Interaction effects ## preparation of full dataset #rm(list=ls()) #load("AmorimNetoCox_full.RData") #a #anc <- subset(d,country != "BOLIVIA" & country != "HONDURAS" & country != "URUGUAY") #b #anc$proxXenpres <- anc$proximity*anc$enpres #save.image("AmorimNetoCox.RData") load("AmorimNetoCox.RData") #d reg.orig <- lm(enpv ~ lml + upp + proximity + proxXenpres, data=anc) reg.full <- lm(enpv ~ lml + upp + proximity + enpres + proxXenpres, data=anc) #d #An additional effective pres. candidate increases the eff. number of el. parties # only by .025 when proximity is zero, i.e. if the parl election is at midterm between the pres. elections # e # 0.025+2.15 = 2.175 # f #Predictions with CIs (looks need to be improved) cand <- c(seq(0,7,.1)) pr.min <- predict(reg.full,new=data.frame(lml=mean(anc$lml),upp=mean(anc$upp),proximity=0,enpres=cand,proxXenpres=0),interval="confidence") pr.max <- predict(reg.full,new=data.frame(lml=mean(anc$lml),upp=mean(anc$upp),proximity=1,enpres=cand,proxXenpres=cand),interval="confidence") plot(cand,pr.min[,1],type="l", ylim=c(-5,15)) lines(pr.min[,2]~cand,lty="dashed") lines(pr.min[,3]~cand,lty="dashed") lines(pr.max[,1]~cand) lines(pr.max[,2]~cand,lty="dashed") lines(pr.max[,3]~cand,lty="dashed")