Kosuke,
Thanks for the email. Here is a means to generate a matching number
using some additional R code:
len <- dim(original.data)[1]
match <- rep(NA,len)
len2 <- length(propensity.data$match.matrix)
count <- 1
for(i in 1:len2){
match1 <- propensity.data$match.matrix[i]
match2 <- row.names(propensity.data$match.matrix)[i]
if(!is.na(match1)){
match[as.numeric(match1)] <- count
match[as.numeric(match2)] <- count
count <- count+1}
}
original.data$match <- match
propensityout.data$match <-
match[as.numeric(row.names(propensityout.data))]
#Where: original.data is the complete datafile prior to running MatchIt
#Where: propensity.data is the raw output using MatchIt
#Where: propensityout.data is from propensity.out <-
match.data(propensity.data)
This loop does not rank the matches based upon propensity score of the
initial
paring partner in the match.matrix. Out of curiosity, will wfe or some
other
conditional logistic regression require this pairing to be ranked/sorted
with
respect to the propensity score? If so, I will need to append the code.
How do other people "use" the output from MatchIt that lacks an appended
subcategorization column (such as subclass or the matching number
above)?
Perhaps I missed a simple way to perform subsequent analyses using an
unmanipulated version of the match.matrix where the paring partner
identities are important? Most of the conditional logistic regression
packages I have found do not seem permit a matrix as the conditional
variable. I am still new to R syntax so it is possible I may be
overlooking something.
Thanks,
Bob
-----Original Message-----
From: Kosuke Imai [mailto:kimai@Princeton.Edu]
Sent: Thursday, April 19, 2012 20:24
To: McDonald, Robert J., M.D., Ph.D.
Cc: matchit(a)lists.gking.harvard.edu
Subject: Re: [matchit] Converting match matrix results to single column
group?
Unfortunately, you would have to do a bit of programming for this I
think: writing a loop etc. Once you create this variable, however, the
analysis can be done simply by running the weighted fixed effects
regression. Doing the difference-in-means within each strata and then
aggregating is the same as running the weighted fixed effects regression
with certain regression weights: see this paper
http://imai.princeton.edu/research/FEmatch.html (section 2.2). The
weighted fixed effects can then be run with the software "wfe", which we
developed.
Kosuke
Department of Politics
Princeton University
http://imai.princeton.edu
On Apr 19, 2012, at 12:55 PM, McDonald, Robert J., M.D., Ph.D. wrote:
I wish to perform conditional logistic regression on
the results of
1:1 matching (eventually 1:N) from MatchIt to both assess the
improvement in covariate balance and to analyze outcomes. Is there any
way, using R, to append the match.matrix to the matched dataset as a new
column that represents matched pair group numbers (where each grouping
represents the two members of the pair? I plan to use this as a means
to perform the conditional logistic regression, conditioned on the
matched pair group number.
Thanks for your help,
Bob
-
---
MatchIt mailing list served by HUIT
List Address: matchit(a)lists.gking.harvard.edu
Subscribe/Unsubscribe:
http://lists.gking.harvard.edu/mailman/listinfo/ei
MatchIt Software and Documentation:
http://gking.harvard.edu/matchit/
Browse/Search List Archive:
http://lists.gking.harvard.edu/mailman/private/matchit/