library(arm) # get it from CRAN if you need to

nes <- read.dta("http://www.stat.ucla.edu/~handcock/216/datasets/nes/nes5200_processed_voters_realideo.dta",convert.factors=FALSE)
attach(nes)
yr <- 1992
ok <- year==yr & presvote<3
vote <- presvote[ok] - 1
income <- nes$income[ok]
invlogit <- function (x) {1/(1+exp(-x))}
fit.1 <- glm(vote ~ income, family=binomial(link="logit"))
curve (invlogit(fit.1$coef[1] + fit.1$coef[2]*x), 1, 5, ylim=c(-.01,1.01),
       xlim=c(-2,8), xaxt="n", xaxs="i", mgp=c(2,.5,0),
       ylab="Pr (Republican vote)", xlab="Income", lwd=4)
curve (invlogit(fit.1$coef[1] + fit.1$coef[2]*x), -2, 8, lwd=.5, add=T)
axis (1, 1:5, mgp=c(2,.5,0))
mtext ("(poor)", 1, 1.5, at=1, adj=.5)
mtext ("(rich)", 1, 1.5, at=5, adj=.5)
points (jitter(income, .3), jitter(vote, .04), pch=20, cex=.1)
