Hi, Ken.
Thanks for taking the time to report the bug. I took a look at the
plot.ci function and it wasn't handling interaction terms properly.
I'm attaching a revised plot.ci function that will run your code
without error. To use it, simply launch R, load Zelig, then
source("plot.ci.R") or copy and paste the attached function into R.
It should be released in the next version of Zelig.
Yours,
Olivia Lau
p.s. -- For everyoen: In the future, put the () after traceback. If
you just type "traceback", you get the traceback function itself. If
you type "traceback()", you get the log of error messages. (More
useful!) Thanks.
-----------------
On 10 Mar 2009, at 01:26, Kosuke Imai wrote:
Hmmm.. It's hard to tell from this. Can you send
us traceback()? Also, please make sure you update both R and Zelig to their latest
version.
Best,
Kosuke
--
Department of Politics
Princeton University
http://imai.princeton.edu
On Mon, 9 Mar 2009, Kenneth Benoit wrote:
> Hi - I am having the following problem with the plot.ci method:
>
> [note that pspend_total is the total spending,
> incumb is 0 or 1 depending on incumbent or challenger]
>
>> z.out <- zelig(wonseat ~ pspend_total*incumb+m, model="probit",
data=dail)
>
> How to cite this model in Zelig:
> Kosuke Imai, Gary King, and Oliva Lau. 2007. "probit: Probit Regression for
Dichotomous Dependent Variables" in Kosuke Imai, Gary King, and Olivia Lau,
"Zelig: Everyone's Statistical Software,"
http://gking.harvard.edu/zelig
>>
>> x.incumb <- setx(z.out, pspend_total=1:30, incumb=1, m=4)
>> x.chall <- setx(z.out, pspend_total=1:30, incumb=0, m=4)
>> s.out <- sim(z.out, x=x.incumb, x1=x.chall)
>> plot.ci(s.out, xlab="% Candidate Spending in Constituency",
>
> + ylab="Probability of Winning a Seat")
> Error in plot.ci(s.out, xlab = "% Candidate Spending in Constituency", :
> x and x1 in vary on different dimensions.
>
>
> Any ideas before I have to dig in and compute this from the return values of sim()??
Help much appreciated!
>
> Ken
>
>
> Kenneth Benoit
> Professor of Quantitative Social Sciences
> Head, Department of Political Science
> Trinity College
> Dublin 2, Ireland
>
http://kenbenoit.net
> Tel: 353-1-896-2491