Hello, I think I figured it out…
thanks.
##############################
# match.data <- matchit(...)
# model.1 <- zelig(...match.data...)
treat.r <- c(0, 1)
model.treat <- setx(model.1, treat = treat.r)
model.treat.s <- sim(model.1, x = Model.treat)
model.treat.e <- data.frame(simulation.matrix(model.treat.s, "Expected Values:
Y|X"))
X1 <- model.treat.e$X1
X2 <- model.treat.e$X2
density.plot <- ggplot() + geom_density(aes(x=X1), data= model.treat.e,
fill="grey", alpha = .5)
+ geom_density(aes(x=X2), data=model.treat.e, fill="dark grey",
alpha = .5)
##############################
On 18Jul, 2014, at 12:00 PM, zelig-request(a)lists.gking.harvard.edu wrote:
Send Zelig mailing list submissions to
zelig(a)lists.gking.harvard.edu
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.gking.harvard.edu/mailman/listinfo/zelig
or, via email, send a message with subject or body 'help' to
zelig-request(a)lists.gking.harvard.edu
You can reach the person managing the list at
zelig-owner(a)lists.gking.harvard.edu
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Zelig digest..."
Today's Topics:
1. Question regarding "plot(z.out)" (Hector Bahamonde)
----------------------------------------------------------------------
Message: 1
Date: Tue, 8 Jul 2014 10:17:52 -0400
From: Hector Bahamonde <hib6(a)scarletmail.rutgers.edu>
To: zelig(a)lists.gking.harvard.edu
Subject: [zelig] Question regarding "plot(z.out)"
Message-ID:
<CAOXA_80sDPRCr31j+FNBno_QBqXnP0E33t0gw7v3Oq+PGW_QBA(a)mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Dear all,
I am very new to R and I am trying to plot the simulations Zelig performs.
I know about the "plot(z.out)" syntax, but I am only interested in plotting
the ?Comparison of E(Y|X) and E(Y|X1)? plot. Is that possible? My final
goal is to plot it using the ggplot2 library.
Thanks,
Hector
--
*H?ctor Bahamonde N.*
PhD Student
Political Science Department - Rutgers University
Hickman Hall, 89 George street, room 602.