Dear Ani,
Did the exact same command worked last week? If so, you might want to
reinstall the latest version of MatchIt and try again. If you still get an
error, could you also send the code that generated "m.out2" to the list?
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
-----------------------------------------------------
On Thu, 30 Mar 2006, Anirudh V. S. Ruhil wrote:
> I'm using R-2.2.1 (win) + MatchIt 2.2-5
>
> Now, after matching and verifying that object m.out2 exists, invoking
>
> R$ matches <- match.data(m.out2)
>
> yields the following error message "Error in cbind(data, object$distance) :
> cannot coerce type closure to list vector".
>
> The match.data() function worked fine until last week, and I know I updated
> some packages this week, but MatchIt certainly wasn't one of them.
>
> thanks!
>
> 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 Jeanie,
When you use max.controls and min.controls options, it means that you
are matching varying number of controls with the treated. And so, you need
to use "full" matching rather than "optimal" matching option.
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 Wed, 15 Mar 2006, Jeanie (Jie) Na wrote:
> Dear Prof. Imaj,
>
> Yes you are right. That is my confusion. The optimal matching ratio =1
> has been running for 24hrs by now. I have sample size of Control (2692)
> vs Treated (1306). I tried use full match with min.controls = 1, and
> max.controls = 1 to try to substitute the optimal ratio = 1 case. But
> the result still match all the samples instead of 2 times of the number
> of treated. Why is that?
>
> Thank you.
> Jeanie
>
>
> On Wed, 2006-03-15 at 14:40 -0500, Kosuke Imai wrote:
> > Dear Jeanie,
> > So, the problem is that the code works when ratio=2, but it doesn't when
> > ratio=1 (the default)? Depending on the number of observations (and the
> > total number of possible configurations), optimal matching can be
> > computationally intensive. You might want to increase the tolerence level
> > to a larger value, the defualt is tol=0.001. You can also change the
> > values of max.control and min.control to make the problem more manageable
> > for the algorithm. See
> > http://www.stat.lsa.umich.edu/~bbh/optmatch/fullmatch.html
> > Good luck with your project,
> > 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 Wed, 15 Mar 2006, Jeanie (Jie) Na wrote:
> >
> > > Dear Professor,
> > >
> > > I am using matchit for one project and run into some problems that I
> > > could not figure out on my own. I hope you could give me some help.
> > > My data is as follows:
> > > 26 level of CENTERs - recoded to 25 CENTER.num binary (0/1) variables;
> > > 8 level of ANAESTHC - recoded to 7 ANAESTHC.num binary vars;
> > > 4 level of PREDPATC - recoded to 3 PREDPATC... binary vars;
> > > 3 level of OP_C - recoded to 2 OP_C... binary vars;
> > > 3 level of surg2appc - recoded to 2 surg2appc.. binary vars;
> > > 3 level of ASA_R. - recoded to 2 ASA_R. binary vars;
> > > The rest of the vars in the model are continuous vars.
> > > The code has run for 20 hours upto now. I dont know if I need to
> > > terminate it. Is there anything wrong?
> > >
> > > The same model but using optimal with ratio = 2 runs for about 20
> > > minutes to get the result.
> > >
> > > m.out.all <- matchit(NASOTUBB ~ CENTER.3 + CENTER.10 + CENTER.13 +
> > > CENTER.15 + CENTER.17 + CENTER.19 + CENTER.21 + CENTER.22 + CENTER.23 +
> > > CENTER.34 + CENTER.2 + CENTER.5 + CENTER.6 + CENTER.7 + CENTER.8 +
> > > CENTER.11 + CENTER.12 + CENTER.14 + CENTER.16 + CENTER.18 + CENTER.30 +
> > > CENTER.31 + CENTER.32 + CENTER.33 + CENTER.113
> > > + ANAESTHC.0 + ANAESTHC.5 + ANAESTHC.4 + ANAESTHC.6 + ANAESTHC.3 +
> > > ANAESTHC.1 + ANAESTHC.7
> > > + PREDPATC...neither.nor + PREDPATC...PONV + PREDPATC...no.PONV
> > > + OP_C...knee.arthroscopy + OP_C...cholecystectomy +
> > > OP_C...general.surgery + OP_C...bone.surgery +
> > > OP_C...upper.extremity.surgery + OP_C...thyroid.surgery +
> > > OP_C...ENT.Eye.surgery + OP_C...hysterectomy +
> > > OP_C...gynaecologic.surgery + OP_C...breast.surgery +
> > > OP_C...hip.replacement
> > > + surg2appc...other + surg2appc...abdominal.laparoscopic
> > > + ASA_R...1 + ASA_R...2
> > > + BMI_N + YEAREXPN + PONV_GAB + PONV_GAN + KPONVRN,
> > > data = matchuse1, method = "optimal", distance = "logit")
> > >
> > > Thank you very much in advance for any suggestions. Looking forward to
> > > your reply.
> > >
> > >
> >
> >
>
-
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/
Dear Jeanie,
So, the problem is that the code works when ratio=2, but it doesn't when
ratio=1 (the default)? Depending on the number of observations (and the
total number of possible configurations), optimal matching can be
computationally intensive. You might want to increase the tolerence level
to a larger value, the defualt is tol=0.001. You can also change the
values of max.control and min.control to make the problem more manageable
for the algorithm. See
http://www.stat.lsa.umich.edu/~bbh/optmatch/fullmatch.html
Good luck with your project,
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 Wed, 15 Mar 2006, Jeanie (Jie) Na wrote:
> Dear Professor,
>
> I am using matchit for one project and run into some problems that I
> could not figure out on my own. I hope you could give me some help.
> My data is as follows:
> 26 level of CENTERs - recoded to 25 CENTER.num binary (0/1) variables;
> 8 level of ANAESTHC - recoded to 7 ANAESTHC.num binary vars;
> 4 level of PREDPATC - recoded to 3 PREDPATC... binary vars;
> 3 level of OP_C - recoded to 2 OP_C... binary vars;
> 3 level of surg2appc - recoded to 2 surg2appc.. binary vars;
> 3 level of ASA_R. - recoded to 2 ASA_R. binary vars;
> The rest of the vars in the model are continuous vars.
> The code has run for 20 hours upto now. I dont know if I need to
> terminate it. Is there anything wrong?
>
> The same model but using optimal with ratio = 2 runs for about 20
> minutes to get the result.
>
> m.out.all <- matchit(NASOTUBB ~ CENTER.3 + CENTER.10 + CENTER.13 +
> CENTER.15 + CENTER.17 + CENTER.19 + CENTER.21 + CENTER.22 + CENTER.23 +
> CENTER.34 + CENTER.2 + CENTER.5 + CENTER.6 + CENTER.7 + CENTER.8 +
> CENTER.11 + CENTER.12 + CENTER.14 + CENTER.16 + CENTER.18 + CENTER.30 +
> CENTER.31 + CENTER.32 + CENTER.33 + CENTER.113
> + ANAESTHC.0 + ANAESTHC.5 + ANAESTHC.4 + ANAESTHC.6 + ANAESTHC.3 +
> ANAESTHC.1 + ANAESTHC.7
> + PREDPATC...neither.nor + PREDPATC...PONV + PREDPATC...no.PONV
> + OP_C...knee.arthroscopy + OP_C...cholecystectomy +
> OP_C...general.surgery + OP_C...bone.surgery +
> OP_C...upper.extremity.surgery + OP_C...thyroid.surgery +
> OP_C...ENT.Eye.surgery + OP_C...hysterectomy +
> OP_C...gynaecologic.surgery + OP_C...breast.surgery +
> OP_C...hip.replacement
> + surg2appc...other + surg2appc...abdominal.laparoscopic
> + ASA_R...1 + ASA_R...2
> + BMI_N + YEAREXPN + PONV_GAB + PONV_GAN + KPONVRN,
> data = matchuse1, method = "optimal", distance = "logit")
>
> Thank you very much in advance for any suggestions. Looking forward to
> your reply.
>
>
-
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/