Dear Jonas,
m.out <-matchit (treatment~x1+x2+x3+x4+x5+x6+x7+x8+x9+x10+x11+x12,data=mydata,
method="nearest",exact=c("x8","x9","x12"))
Best,
Jeanne
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
S. Jeanne Horst, PhD
Center for Assessment and Research Studies
Associate Professor, Department of Graduate Psychology
James Madison University
1122 Lakeview Hall; 298 Port Republic Road; MSC 6806
Harrisonburg, VA 22807
Office Phone: (540) 568-7103
http://www.psyc.jmu.edu/assessment/people/horst.html
http://www.jmu.edu/assessment/
http://www.jmu.edu/learningimprovement/
"Learning to live with ambiguity is learning to live with how life really is, full of
complexities and strange surprises.” James Hollis
"Fall seven times, stand up eight." Japanese Proverb
"Walk to the beat of your own tuba." Dove Chocolate
________________________________
From: matchit-bounces(a)lists.gking.harvard.edu
<matchit-bounces(a)lists.gking.harvard.edu> on behalf of Jonas Geldmann
<jg794(a)cam.ac.uk>
Sent: Friday, May 19, 2017 4:34:09 AM
To: matchit(a)lists.gking.harvard.edu
Subject: [matchit] Different "methods" per variable
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