apply() basically takes a matrix of simulated predictions and compute the
averages of across simulations for each point of x. "fd" is the first
differences and so if you add it to "ev", then you get the predicted
values for x.high.
Kosuke
--
Department of Politics
Princeton University
http://imai.princeton.edu
On Tue, 15 Dec 2009, Yiannis Spanos wrote:
Dear Kosuke,
One more question, if I may: Can you briefly explain to me the "meaning" of
the two "lines" commands. I see that they provide what I want, I just
don't
understand why they perform what I need!
Many thanks for your attention,
Yiannis
-----Original Message-----
From: Kosuke Imai [mailto:kimai@Princeton.Edu]
Sent: Tuesday, December 15, 2009 3:57 PM
To: Yiannis E. Spanos
Cc: zelig(a)lists.gking.harvard.edu
Subject: Re: [zelig] Vertical Confidence Inttervals Plot
oops. there is a typo:
lines(age.range, apply(s.out$qi$ev, 2, mean))
lines(age.range, apply(s.out$qi$fd+s.out$qi$ev, 2, mean))
-
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/