I am trying to run the example from the plot.ci documentation here --
http://rss.acs.unt.edu/Rdoc/library/Zelig/html/plot.ci.html.
Unfortunately, even changing the plot.ci() call to include the var
statement as Matt Owen explained back in January still won't work.
I tried this:
data(turnout)
z.out <- zelig(vote ~ race + educate + age + I(age^2) + income,
model = "logit", data = turnout)
age.range <- 18:95
x.low <- setx(z.out, educate = 12, age = age.range)
x.high <- setx(z.out, educate = 16, age = age.range)
s.out <- sim(z.out, x = x.low, x1 = x.high)
plot.ci(s.out, *var=turnout$age*, xlab = "Age in Years",
ylab = "Predicted Probability of Voting",
main = "Effect of Education and Age on Voting Behavior")
legend(45, 0.52, legend = c("College Education (16 years)",
"High School Education (12 years)"), col =
c("blue","red"),
lty = c("solid"))
I got this:
Error in xmatrix[, position] : subscript out of bounds
In addition, demo(vertci) seems to be disabled as well.
Thank you,
Gabi Huiber