Hi Jean-Baptiste,
MatchIt is not set up to take a distance matrix, but if you have a distance measure with
one value for each person (e.g., their predicted value from the Cox model) you can send
that to MatchIt. See this page:
http://gking.harvard.edu/node/4355/rbuild_documentation/How_Do_I3.html
So basically you use a command like:
matchit(tx ~ x1+ x2 + x3, data = data, distance = data$predvalue)
The formula with x1, x2, and x3 in it is just to tell MatchIt what the treatment variable
is and what variables to show balance for; it won't actually fit that propensity
score model.
Liz
On 6/6/12 8:04 AM, "Pingaul jb" <pingaultjb(a)yahoo.fr> wrote:
Question, MatchIt
I am currently using the package MatchIt. However, given the design of the study, the
distance we used was based on Cox models instead of logistic model. We thus created a
distance matrix with the treated in rows and the controls in column. To perform the
matching, we currently use the package Optmatch [we feed the matrix to fullmatch()].
However, MatchIt is very user friendly and its combination with Zelig is also very useful.
So I wonder I could feed my distance matrix to matchit() instead of using a call like:
treat~x1+x2.
Many thanks !
Jean-Baptiste