Hi Shane,
You should at least be able to pull off individual vectors. I have done that myself using
code like:
summary1.opt11 <- summary(opt11, standardize=TRUE)
summary1.opt21 <- summary(opt21, standardize=TRUE)
summary1.subcl <- summary(subcl, standardize=TRUE)
summary1.fullcon <- summary(full.con, standardize=TRUE)
# Now combine those vectors and make the figure
allbiases.f <- abs(c(summary1.full$sum.all[,3],
summary1.opt11$sum.matched[,4],
summary1.opt21$sum.matched[,4],
summary1.subcl$sum.subclass[,3],
summary1.full$sum.matched[,3],
summary1.fullcon$sum.matched[,3]))
You should also be able to pull off a whole matrix-you just need to call the right element
of the output. As an example:
m.out <- matchit(treat ~ re74+re75, data=lalonde)
s.out <- summary(m.out)
names(s.out)
[1] "call" "nn"
"sum.all" "sum.matched" "reduction"
s.out$sum.all
Means Treated Means
Control SD Control Mean Diff eQQ Med eQQ Mean eQQ Max
distance 0.3519473 0.2794633 0.1227024 0.072484 5.021812e-02 7.322741e-02
0.2053619
re74 2095.5736886 5619.2365064 6788.7507965 -3523.662818 2.425572e+03 3.620924e+03
9216.5000000
re75 1532.0553138 2466.4844431 3291.9961833 -934.429129 9.810968e+02 1.060658e+03
6795.0100000
as.data.frame(s.out$sum.all)
Means
Treated Means Control SD Control Mean Diff eQQ Med eQQ Mean eQQ Max
distance 0.3519473 0.2794633 0.1227024 0.072484 5.021812e-02 7.322741e-02
0.2053619
re74 2095.5736886 5619.2365064 6788.7507965 -3523.662818 2.425572e+03 3.620924e+03
9216.5000000
re75 1532.0553138 2466.4844431 3291.9961833 -934.429129 9.810968e+02 1.060658e+03
6795.0100000
I hope this helps.
Liz
On 8/26/11 8:07 PM, "Shane Phillips" <phillips.shane(a)gmail.com> wrote:
Hi, MatchIt Gurus...
I am running a simulation using MatchIt as part of my dissertation. I am trying to
compile a dataset of some of the summary data from the MatchIt procedure (e.g. summary(df,
standardized=TRUE)), but I seem to be unable to do that. I keep getting the message that
that object cannot be coerced into a dataframe. Is there anyway that I can export these
statistics so that I can compile the results over many repetitions?
Thanks!
Shane