See below for responses:
On Mon, Feb 8, 2010 at 2:29 PM, nela filimon <nfilimon(a)yahoo.com> wrote:
With apologies for cross posting
Dear Zelig users,
I'm working with the "sim()" function and I would need a hand with the
following issues related to the graphical representation of the output obtained:
1. would it be possible to plot in a same graph, various outputs of the sim function? I
do a graph for each case, but a single one would help a lot with comparisons among
categorical variables and also save space in articles.
Usually, these quantities have drastically different values on the
axes, so the answer is no we would not automate this. For example,
for a logit, the predicted values are 0's and 1's, which would look
like a really heavy point at 0 and 1 on the expected value (predicted
probability) graph. Also, the first differences are usually much
smaller than the expected values for a logit. You can, however,
create any number if plots yourself using the sim output.
2. plot.ci() is graphing the confidence intervals; is
it possible to have the representation of the mean values generated by the sim() instead
of the confidence intervals? or both of them (in the same graph delivered by plot.ci)
Yes. Run example(plot.ci), then type:
## Extract the expected values
ev <- s.out$qi$ev
## Calculate the means for each category
ev.means <- apply(ev, 2, mean)
## Extract the alternative expected values
ev1 <- s.out$qi$ev + s.out$qi$fd
## Calculate the means for each category
ev1.means <- apply(ev1, 2, mean)
## Use lines() to plot a line connecting the mean values of each category:
lines(age.range, ev.means, col = "red")
lines(age.range, ev1.means, col = "blue")
## For points instead of lines, use points() for the mean values of
each category:
points(age.range, ev.means, col = "red", pch = 19)
points(age.range, ev1.means, col = "blue", pch = 19)
## You can also use any other pch value, 19 is for a solid circle.
3. Is it possible to selest for each variable a
different type of line or symbol for the graphical representation? (like with colours;
e.g. at page 52 in Ch. 5 . "Graphing commands" (Zelig documentation), college
and high school education variables are represented with different colours but with the
"same" type of line). I use text() option to put labels on the curves but I was
thinking that maybe who knows, someone has already faced similar issues.
No, but this may be added at a later date. Right now, I suggest that
you use drastically different colors for the lines that you are
plotting. For example col1 = "grey30" and col2 = "grey70" will look
very different in print.
Thanks a lot before hand for your help.
Nela Filimon
Unversitat de Girona, Spain
-
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/