Hi Francois,
It worked!
Thank you, thank you, thank you!
Kenji
On Sat, Jan 21, 2012 at 5:04 PM, Francois Maurice <
maurice.francois(a)ymail.com> wrote:
Hi Kenji,
There is a problem with the followint option in MatchIt :
discard = "hull.control"
If you run MatchIt without this option, there is no more problem. Maybe
it's a bug or maybe you have to specify something ! I don't know. I think
that a developer can be more helpful.
François Maurice, B. Sc., A. Stat.
Candidat à la maîtrise
Département de sociologie
Université de Montréal
*De :* Kenji Adachi <kenji.adachi.2010(a)gmail.com>
*À :* Francois Maurice <maurice.francois(a)ymail.com>
*Cc :* "zelig(a)lists.gking.harvard.edu" <zelig(a)lists.gking.harvard.edu>
*Envoyé le :* Mercredi 18 Janvier 2012 10h11
*Objet :* Re: Re : [zelig] sim() command error with MatchIt
Hi Francois and all,
Thanks for your prompt reply.
I tried "hisp" instead of "hispan", then I got another error:
"Error in
eval(expr, envir, enclos) : object 'hisp' not found."
So, I think "hispan" should be okay because I copied everything from the
manual.
I still need your and other Zelig users' help. Please help!
Thanks.
Kenji
On Wed, Jan 18, 2012 at 8:39 AM, Francois Maurice <
maurice.francois(a)ymail.com> wrote:
Hi,
Look at the lalonde dataset. I think that a variable in the zelig()
formula is not written correctly. If I remembered well "hispan" is written
"hisp" in the dataset.
À bientôt,
François Maurice, B. Sc., A. Stat.
Candidat à la maîtrise
Département de sociologie
Université de Montréal
*De :* Kenji Adachi <kenji.adachi.2010(a)gmail.com>
*À :* zelig(a)lists.gking.harvard.edu
*Envoyé le :* Mercredi 18 Janvier 2012 1h20
*Objet :* [zelig] sim() command error with MatchIt
Dear all,
I am interested in using MatchIt for my research. (I am relatively new to
R, too.) To make myself familiar with the command, I've tried some samples
provided in the manual. I believe I followed the steps as explained, but I
always get the same error message. What I did was as follows:
library(MatchIt)
data(lalonde)
m.out <- matchit(treat ~ age + educ + black + hispan + nodegree +
married + re74 + re75, method = "nearest", discard
= "hull.control", data = lalonde)
library(Zelig)
z.out <- zelig(re78 ~ treat + age + educ +
black + hispan + nodegree +
married + re74 + re75, data = match.data(m.out),
model = "ls")
x.out <- setx(z.out, treat=0)
x1.out <- setx(z.out, treat=1)
s.out <- sim(z.out, x = x.out, x1 = x1.out)
Error in mvrnorm(num, mu = coef(object), Sigma = vcov(object)) :
incompatible arguments
I am using R version 2.14.1. I also updated Zelig and MatchIt for the
latest version.
I have completely no idea what I did wrong. I would greatly appreciate it
if you would tell me what to do.
Best Regards,
Kenji Adachi
-
--
Zelig Mailing List, served by HUIT
Send messages: zelig(a)lists.gking.harvard.edu
[un]subscribe Options:
http://lists.gking.harvard.edu/mailman/listinfo/zelig
Zelig program information:
http://gking.harvard.edu/zelig/
Zelig mailing list
Zelig(a)lists.gking.harvard.edu
https://lists.gking.harvard.edu/mailman/listinfo/zelig