Dear mailing list
I have a question about the MatchIt that might be very naïve or simple, but
I am very new to the package.
I am matching on a series of variables some continues (e.g. temperature and
elevation) and some categorical (country and landcover class). As a result,
I need method = exactly for some variable (i.e. country) and method =
nearest, distance = logit for others (i.e. temperature).
I am not sure if I can specific different methods for different variables in
the same matchit call
Thank you in advance.
Sincerely, Jonas
_____________________________________________________
Postdoctoral Research Fellow
Conservation Science Group
Department of Zoology
University of Cambridge
Downing Street, Cambridge CB2 3EJ
Phone: +44 7412 885 112
Danish: +45 2990 5192
Skype: jgeldmann
Try creating larger strata.
Kosuke Imai
Professor, Department of Politics
Center for Statistics and Machine Learning
Princeton University
http://imai.princeton.edu
On Mon, May 15, 2017 at 12:30 PM, Guogen Shan <guogen.shan(a)unlv.edu> wrote:
> Dear Prof. Imai, Thanks for your prompt response. This strata approach
> works great when the control group has at least one subject having the same
> age as one subject from the treatment group. The control group in our study
> is not large enough to meet that assumption. Any comments? Thank you.
>
> Guogen
>
> On May 15, 2017 6:52 AM, "Kosuke Imai" <kimai(a)princeton.edu> wrote:
>
>> You can stratify the age variable and then do a matching with an extract
>> restriction on that strata.
>>
>> Kosuke Imai
>> Professor, Department of Politics
>> Center for Statistics and Machine Learning
>> Princeton University
>> http://imai.princeton.edu
>>
>> On Sun, May 14, 2017 at 11:58 PM, Guogen Shan <guogen.shan(a)unlv.edu>
>> wrote:
>>
>>> Dear Prof. Imai,
>>>
>>> Thanks for developing the MatchIt package. I have a data set from a
>>> treatment, and I want to match it with another data base (control), by age,
>>> race, education. Age is the primary match criteria, followed by race, and
>>> education. In other words, I want to give more weights to the age
>>> difference than those to race difference. Any suggestion how to use your
>>> package for this type of matching?
>>>
>>> Thank you.
>>>
>>> Guogen
>>>
>>
>>
You can stratify the age variable and then do a matching with an extract
restriction on that strata.
Kosuke Imai
Professor, Department of Politics
Center for Statistics and Machine Learning
Princeton University
http://imai.princeton.edu
On Sun, May 14, 2017 at 11:58 PM, Guogen Shan <guogen.shan(a)unlv.edu> wrote:
> Dear Prof. Imai,
>
> Thanks for developing the MatchIt package. I have a data set from a
> treatment, and I want to match it with another data base (control), by age,
> race, education. Age is the primary match criteria, followed by race, and
> education. In other words, I want to give more weights to the age
> difference than those to race difference. Any suggestion how to use your
> package for this type of matching?
>
> Thank you.
>
> Guogen
>
Dear all,
May I ask a question about package: MatchIt (version 2.4-22) in R(3.3.2)?
When I want to calculate ate by the code below, it doesn't work. Could you
help me solve the problem? Because when I run
> s.out1$qi$att.ev, it comes the error:
Error in s.out1$qi$att.ev : object of type 'closure' is not subsettable
I think it can not find qi object in s.out1 because it's a function? So I
can't call the object att.ev from qi? Do you have any suggestion for
calculating ate?
The code is below:
m.out1 <- matchit(treat ~ age + educ + black + hispan + nodegree +
married + re74 + re75, method = "nearest", data = lalonde)
z.out1 <- zelig(re78 ~ age + educ + black + hispan + nodegree +
married + re74 + re75, data = match.data(m.out1, "control"),
model = "ls")
x.out1 <- setx(z.out1, data = match.data(m.out1, "treat"), cond = TRUE)
s.out1 <- sim(z.out1, x = x.out1)
z.out2 <- zelig(re78 ~ age + educ + black + hispan + nodegree +
married + re74 + re75, data = match.data(m.out1, "treat"),
model = "ls")
x.out2 <- setx(z.out2, data = match.data(m.out1, "control"), cond = TRUE)
s.out2 <- sim(z.out2, x = x.out2)
ate.all <- c(s.out1$qi$att.ev, -s.out2$qi$att.ev)
Thank you so much
Best,
Wan-Yi,Chou
*Wan-Yi Chou (May Chou), Master*
*Management Science, **National Chiao Tung University*
*國立交通大學管理科學研究所 *
*周宛誼*|*Email mayritaspring(a)gmail.com <mayritaspring(a)gmail.com> *
--
*Wan-Yi Chou (May Chou), Master*
*Management Science, **National Chiao Tung University*
*國立交通大學管理科學研究所 *
*周宛誼*|*Email mayritaspring(a)gmail.com <mayritaspring(a)gmail.com> *