Hi - This is one part missing feature and one part bug. To display the matrix of a
quantity of interest, Zelig uses a new method, "simulation matrix". Using your
example, to view the Expected Values from "s.out" as a matrix, you could use the
following:
simulation.matrix(s.out, "Expected Values")
There however is a missing feature in that:
simulation.matrix(s.out, "First Differences")
returns nothing essentially. I'll fix this for a nightly release. The ticket in
GitHub is here:
https://github.com/IQSS/Zelig/issues/44
Thanks!
- Matt
On Jan 28, 2013, at 12:49 PM, Michael Donnelly wrote:
library(Zelig)
obs <- 1000
dat <- data.frame(cbind(rnorm(obs), runif(obs)))
names(dat) <- c("myX1", "myX2")
dat$myY <- dat$myX1 + 2*dat$myX2 - dat$myX1*dat$myX2 + rnorm(obs)
m1 <- zelig(myY ~ myX1 + myX2 + myX1:myX2, data = dat, model = "ls")
x.out <- setx(m1, myX1 = 2:3, myX2 = .4)
x.out2 <- setx(m1, myX1 = 2:3, myX2 = .6)
s.out <- sim(m1, x = x.out, x1 = x.out2)
s.out$qi$fd