Hi,
The source code is available at
http://cran.r-project.org/src/contrib/Descriptions/MatchIt.html
The software is written entirely in R.
Kosuke
-----------------------------------------------------
Kosuke Imai Office: Corwin Hall 041
Assistant Professor Phone: 609-258-6601
Department of Politics eFax: 973-556-1929
Princeton University Email: kimai(a)Princeton.Edu
Princeton, NJ 08544-1012 http://imai.princeton.edu
-----------------------------------------------------
On Thu, 25 May 2006, Julia hua fang wrote:
> Dear Dr. Imai,
> If you don't mind, I am wondering if you could direct to the place where
> you store the source codes. I guess I might find a wrong location. Also, I
> would like to know if you use C/C++ to write the codes. Thanks a lot,
> Respectfully,
>
> Julia Hua Fang
>
> Statistical Consultant
> Graduate Research Associate
> Voinovich Center for Leadership and Public Affairs
> Athens
> Ohio University
> 740-274-0279
>
>
-
MatchIt mailing list served by Harvard-MIT Data Center
List Address: matchit(a)latte.harvard.edu
Subscribe/Unsubscribe: http://lists.hmdc.harvard.edu/?info=matchit
MatchIt Software and Documentation: http://gking.harvard.edu/matchit/
Hi Julia,
I've taken a look at this. There was a typo in the MatchIt
documentation. You should include the treatment variable for "model-based
estimates". However, for the other ones, you should not include the
treatment variable because the model is being fitted only to one group.
The updated example (with typos fixed) is at
http://gking.harvard.edu/matchit/docs/Examples2.html Please let us know if
you find any further problems.
Thanks,
Kosuke
-----------------------------------------------------
Kosuke Imai Office: Corwin Hall 041
Assistant Professor Phone: 609-258-6601
Department of Politics eFax: 973-556-1929
Princeton University Email: kimai(a)Princeton.Edu
Princeton, NJ 08544-1012 http://imai.princeton.edu
-----------------------------------------------------
-
MatchIt mailing list served by Harvard-MIT Data Center
List Address: matchit(a)latte.harvard.edu
Subscribe/Unsubscribe: http://lists.hmdc.harvard.edu/?info=matchit
MatchIt Software and Documentation: http://gking.harvard.edu/matchit/
Hi Julia,
Your "euneg" variable does not appear in the matchit() or zelig(). They
have to belong to those formulae in order for setx() to set the value of
the variable.
Hope this helps,
Kosuke
-----------------------------------------------------
Kosuke Imai Office: Corwin Hall 041
Assistant Professor Phone: 609-258-6601
Department of Politics eFax: 973-556-1929
Princeton University Email: kimai(a)Princeton.Edu
Princeton, NJ 08544-1012 http://imai.princeton.edu
-----------------------------------------------------
On Sun, 7 May 2006, Julia Gray wrote:
> Hi, Kosuke. It was just least squares; I'm attaching the whole bit of
> code below.
>
> library(foreign)
> library(zelig)
> library(MatchIt)
>
> eu<-read.dta("may74.dta")
>
>
> m.out0<- matchit(euneg ~ cpid + xfin + reserves + cacct + forexstd +
> weur + ce + baltics + balkans, method = "nearest", data = eu)
>
> z.out0 <- zelig(ytsp3 ~ cpid + xfin + reserves + cacct + forexstd +
> weur + ce + baltics + balkans, data = match.data(m.out0), model="ls")
>
> x.out0 <- setx(z.out0, euneg=0)
>
> x.out1 <- setx(z.out0, euneg=1)
> s.out0 <- sim(z.out0, x = x.out0)
> summary(s.out0)
>
>
>
>
> z.out2 <- zelig(mkt1 ~ lgdp + linf + cacct + debtsrv + latin + europe +
> africa, data = match.data(m.out0, "treat"), model="ls")
>
> x.out2 <- setx(z.out2, data = match.data(m.out0, "control"), cond = TRUE)
> s.out2 <- sim(z.out2, x = x.out2)
>
> ate.all <- c(s.out0$qi$ate.ev, -s.out2$qi$ate.ev)
>
> mean(ate.all)
> sd(ate.all)
> quantile(ate.all, c(0.025, 0.975))
>
> Quoting Kosuke Imai <kimai(a)Princeton.Edu>:
>
> > Dear Julia,
> > Could you let us know what model you were running with zelig()?
> > Thanks,
> > Kosuke
> >
> > On Sun, 7 May 2006, Julia Gray wrote:
> >
> >> Hi,
> >>
> >> I'm running into trouble with the model-based estimates. After setting
> >> the IVs at their means
> >> > x.out0 <- setx(z.out0, myvar=0)
> >> >
> >> > x.out1 <- setx(z.out0, myvar=1)
> >>
> >>
> >> all goes well up to this point:
> >>
> >> > s.out0 <- sim(z.out1, x = x.out1)
> >>
> >> at which point I get the following error:
> >> > Error in any(class(object) == "MCMCZelig") :
> >> object "z.out1" not found
> >>
> >> Running through the example as it was defined above, it appears as
> >> though z.out1 wasn't actually defined, though z.out0 was. But trying to
> >> modify the code produces another error:
> >>
> >> > sim(z.out0, x = x.out0)
> >> > Error in mvrnorm(num, mu = coef(object), Sigma = vcov.lm(object)) :
> >> incompatible arguments
> >>
> >> Incidentally, I ran matchit a few months ago on a different dataset
> >> with no problems, but now when I try to use the same code, I get the
> >> same error message listed directly above.
> >>
> >> Any help you might offer would be greatly appreciated.
> >>
> >> best, Julia
> >>
> >> -
> >> MatchIt mailing list served by Harvard-MIT Data Center
> >> List Address: matchit(a)latte.harvard.edu
> >> Subscribe/Unsubscribe: http://lists.hmdc.harvard.edu/?info=matchit
> >> MatchIt Software and Documentation: http://gking.harvard.edu/matchit/
> >>
> >
> >
>
>
>
-
MatchIt mailing list served by Harvard-MIT Data Center
List Address: matchit(a)latte.harvard.edu
Subscribe/Unsubscribe: http://lists.hmdc.harvard.edu/?info=matchit
MatchIt Software and Documentation: http://gking.harvard.edu/matchit/
Hi,
I assume that your question is about MatchIt rather than Zelig. If
that's the case, you can select your covariate by an option "whichxs" in
plot(). See http://gking.harvard.edu/matchit/docs/Arguments3.html If you
want them to appear on one page, try mfrow or mfcol arguments in par().
Kosuke
-----------------------------------------------------
Kosuke Imai Office: Corwin Hall 041
Assistant Professor Phone: 609-258-6601
Department of Politics eFax: 973-556-1929
Princeton University Email: kimai(a)Princeton.Edu
Princeton, NJ 08544-1012 http://imai.princeton.edu
-----------------------------------------------------
On Tue, 9 May 2006, Anirudh V. S. Ruhil wrote:
> If matching involve numerous covariates and thus the QQ plots are two or
> more, is there a syntax that will plot all QQ plots in a single window or
> on a page? Or do I need to play with lattice?
>
> Any help would be greatly appreciated.
>
> Ani
>
> Anirudh V. S. Ruhil, Ph.D.
> Sr. Research Associate
> Voinovich Center for Leadership and Public Affairs
> Ohio University
> Building 21, The Ridges
> Athens, OH 45701-2979
> Tel: 740.597.1949 | Fax: 740.597.3057
>
> -
> Zelig Mailing List, served by Harvard-MIT Data Center
> Send messages: zelig(a)latte.harvard.edu
> [un]subscribe Options: http://lists.hmdc.harvard.edu/?info=zelig
> Zelig program information: http://gking.harvard.edu/zelig/
>
-
MatchIt mailing list served by Harvard-MIT Data Center
List Address: matchit(a)latte.harvard.edu
Subscribe/Unsubscribe: http://lists.hmdc.harvard.edu/?info=matchit
MatchIt Software and Documentation: http://gking.harvard.edu/matchit/
Hi,
I'm running into trouble with the model-based estimates. After setting
the IVs at their means
> x.out0 <- setx(z.out0, myvar=0)
>
> x.out1 <- setx(z.out0, myvar=1)
all goes well up to this point:
> s.out0 <- sim(z.out1, x = x.out1)
at which point I get the following error:
> Error in any(class(object) == "MCMCZelig") :
object "z.out1" not found
Running through the example as it was defined above, it appears as
though z.out1 wasn't actually defined, though z.out0 was. But trying to
modify the code produces another error:
> sim(z.out0, x = x.out0)
> Error in mvrnorm(num, mu = coef(object), Sigma = vcov.lm(object)) :
incompatible arguments
Incidentally, I ran matchit a few months ago on a different dataset
with no problems, but now when I try to use the same code, I get the
same error message listed directly above.
Any help you might offer would be greatly appreciated.
best, Julia
-
MatchIt mailing list served by Harvard-MIT Data Center
List Address: matchit(a)latte.harvard.edu
Subscribe/Unsubscribe: http://lists.hmdc.harvard.edu/?info=matchit
MatchIt Software and Documentation: http://gking.harvard.edu/matchit/
Hi,
We just uploaded MatchIt 2.2-8 to CRAN (it will take a couple of days
for it to appear there). This version does not depend on Zelig, which
means that Zelig is no longer required to be installed when running
MatchIt. However, we do recommend that you do further parametric
adjustments after matching, and this is easy to do via Zelig. See our
paper: http://gking.harvard.edu/files/abs/matchp-abs.shtml
Kosuke
-----------------------------------------------------
Kosuke Imai Office: Corwin Hall 041
Assistant Professor Phone: 609-258-6601
Department of Politics eFax: 973-556-1929
Princeton University Email: kimai(a)Princeton.Edu
Princeton, NJ 08544-1012 http://imai.princeton.edu
-----------------------------------------------------
-
MatchIt mailing list served by Harvard-MIT Data Center
List Address: matchit(a)latte.harvard.edu
Subscribe/Unsubscribe: http://lists.hmdc.harvard.edu/?info=matchit
MatchIt Software and Documentation: http://gking.harvard.edu/matchit/