Hi Sean,
Try the command:
attr(s.out$qi, "names")
to get a list of the names of the quantities of interest available from your particular
sim() object. It will, depending on the specific model and setx() call, give you
something like:
attr(s.out$qi,"names")
[1]
"ev1" "ev2" "pv1" "pv2" "fd"
"rr"
Then you can access each quantity of interest, either by name or position. For example,
if you wanted the first differences, you could get them as:
myFirstDifferences<-s.out$qi$ev2
You can also reference them by position, if needed. For example:
myQIs<- s.out$qi[5]
or:
myQIs<-s.out$qi["fd"]
or:
myQIs<- s.out$qi[1:length(s.out$qi)]
is.list(myQIs)
[1] TRUE
James.
--
James Honaker, Senior Research Scientist
//// Institute for Quantitative Social Science, Harvard University
________________________________
From: zelig-bounces(a)lists.gking.harvard.edu [zelig-bounces(a)lists.gking.harvard.edu] on
behalf of Mike Dylan [seancacti101(a)gmail.com]
Sent: Wednesday, October 30, 2013 5:22 PM
To: Zelig(a)lists.gking.harvard.edu
Subject: [zelig] need to extract the qi values
hi,
I need to extract qi values from s.out to bring the results to another app. When I do this
s.out$qi, I get all null values. Any idea what might be wrong?
Regards,
Sean