You have to extract the simulation draws from the zelig sim() output: it's
called "pr" for predicted values. Take the expectation of that, then
calculate summary statistics.
Kosuke
--
Department of Politics
Princeton University
http://imai.princeton.edu
On Fri, 18 Mar 2011, Gregory Saxton wrote:
Hi all,
I am using the Zelig package in R with a log-log regression model similar to the
following:
z.out <- zelig(lnDONATIONS ~ lnPRICE + lnFUNDRAISING + lnAGE, model =
"ls",
data = mydata)
x.out <- setx(z.out)
s.out <- sim(z.out, x = x.out)
summary(s.out)
plot(s.out)
This works fine, but I am trying to implement something that is allowed in the
Stata-based precursor to Zelig (_clarify_); specifically, in the _clarify_
package, after the 'setx' command, you can type in **simqi, tfunc(exp)** in
order to get the expected values based on the exponential transformation of the
dependent variable (the _simqi_ command in Stata is analogous to the _sim_
comamnd in R/Zelig). My question is, can this post-_setx_ exponential
transformation be done in R with the Zelig package, and if so, how? The very
extensive Zelig documentation does not seem to have an analogue to the 'tfunc'
command in the _clarify_ package.
Thanks in advance for any insights.
Best,
Greg
-
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/
-
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/