Dear All,
I would like to produce and plot predicted values (probability) from a
generalized additive logit model ("model=logit.gam"), but am not sure
how to. Here is my model:
z.out <- zelig(y ~ s(year), model="logit.gam", data=d)
x.out <- setx(z.out, year=1950:1980)
s.out <- sim(z.out, x=x.out)
I got error message "Error in coef %*% t(x) : non-conformable arguments".
I remember in the "vertci" demo, there is something like this:
z.out <- zelig(vote ~ race + educate + age + I(age^2) + income, model
= "logit", data = turnout)
x.low <- setx(z.out, educate = 12, age = 18:95)
x.high <- setx(z.out, educate = 16, age = 18:95)
s.out <- sim(z.out, x = x.low, x1 = x.high)
So I guess the problem is that Zelig does not allow a range specified
for the variable included in the "s()" term. In that case, what is the
best way to get a predicted values (probability), given a range of
values in the independent variable?
Many thanks.
Best,
Shige
-
Zelig Mailing List, served by Harvard-MIT Data Center
Send messages: zelig(a)lists.gking.harvard.edu
[un]subscribe Options:
http://lists.gking.harvard.edu/?info=zelig
Zelig program information:
http://gking.harvard.edu/zelig/