Dear colleagues, the code below generated the two effects plots that I
have attached. I hope they are not stripped.
The original two models are as follows:
green_shift_mod=glm(green_shift ~ educ+party_id+educ:party_id,
family=binomial, data=x)
carbon_tax_mod=glm(carbon_tax ~ educ+party_id+educ:party_id,
family=binomial, data=x)
Then, I try to plot the effects of party_id by education for both models
It works well for carbon_tax_mod; but for green_shift_mod, effects
plots the effects of party ID by education in a straight, horizontal
line, with the values completely compressed.
I've looked through; all the variables included in the two models are
identical save for the DV. And the DV's in both models are ordered
factors.
Is any one familiar with this problem in effects plots?
Yours, Simon Kiss
quartz()
jpeg(filename="test.jpeg", type=c("quartz"))
plot(effect("educ:party_id", green_shift_mod, rug=TRUE),
ylab="Probability of Disagreeing", xlab="Party ID", main="Probability
of Disagreeing That The Green Shift Would Hurt The Economy")
dev.off()
quartz()
jpeg(filename="test2.jpeg", type=c("quartz"))
plot(effect("educ:party_id", carbon_tax_mod, rug=TRUE),
ylab="Probability of Disagreeing", xlab="Party ID", main="Probability
of Disagreeing That The Carbon Tax Would Hurt The Economy")
dev.off()
*********************************
Simon J. Kiss, PhD
SSHRC and DAAD Post-Doctoral Fellow
John F. Kennedy Institute of North America Studies
Free University of Berlin
Lansstraße 7-9
14195 Berlin, Germany
Cell: +49 (0)1525-300-2812,
Web: http://www.jfki.fu-berlin.de/index.html
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.