Francesco | 27 Apr 19:30
Picon
Favicon

customising the plot() command

Dear Matchit list,

I have a simple question : how can I customize the output of the plot command ?
I am thinking of changing the title,  choosing only  particular
covariates in the QQ plots, etc ...

Many thanks for your help!
Best Regards
-
---
MatchIt mailing list served by HUIT
List Address: matchit@...
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/
Matchit mailing list
Matchit@...
https://lists.gking.harvard.edu/mailman/listinfo/matchit

Favicon

Converting match matrix results to single column group?

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@...
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/
Matchit mailing list
Matchit@...
https://lists.gking.harvard.edu/mailman/listinfo/matchit
georgebaah | 5 Apr 17:37
Picon
Favicon

Question

Hi Everyone,
   I have a theoretical question. It's been bothering me for a while.
I have a dataset from which I know the treatment is stochastic: 0 <  
Pr(T=1 | X) < 1.
Also I know that Y is independent of T given X. However, T is not  
independent
of Y given X. Does this make sense? Does this violate the theory behind
the potential outcome model? Thanks.

George 

-
---
MatchIt mailing list served by HUIT
List Address: matchit@...
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/
Matchit mailing list
Matchit@...
https://lists.gking.harvard.edu/mailman/listinfo/matchit

John G. Bullock | 15 Mar 17:48
Picon
Favicon

matchit() silently adds a propensity score to X when method=='genetic'


Hello,

     I am writing on behalf of myself and Rocío Titiunik.

     As we see it, matchit() serves as a front end to GenMatch() 
when method=='genetic'.  So it should be possible to get the same 
results from both the MatchIt and Matching packages.  But this 
proves difficult.  Discrepancies seem to occur because matchit() 
silently adds a column of propensity scores to the X matrix that it 
passes to GenMatch().  I'm appending some code that we developed to 
demonstrate this point.

     The benefits (in most cases) of adding a propensity score are 
clear, but it seems problematic that this addition occurs without 
any notification.  For example, a user of MatchIt may claim to have 
matched on a set of predictors, unaware that he has also matched on 
the propensity score.  Or, if a user thinks that he has matched on 
one propensity score (because he included it in X when calling 
matchit()), he will be unaware that he has also matched on a second, 
matchit()-generated propensity score that is based on the first 
propensity score.  In either case, he will be also be unable to 
replicate his MatchIt results with Matching or vice versa, even 
though MatchIt is supposed to be a wrapper for Matching.  And 
third-party readers of code that includes a call to matchit() will 
likely have no idea that a propensity score has been added.

     We can't see any explicit mention of this 
propensity-score-adding feature in the MatchIt manual.  To promote 
future replication efforts, can a line be added to the MatchIt 
manual about the addition of a propensity score to X?  Or can a note 
be added to matchit() output whenever method=='genetic' is used?

Thank you,
John Bullock
###

library(Matching)
library(MatchIt)
data(lalonde)
X <- with(lalonde, cbind(age, educ, black, hispan, married, 
nodegree, re74, re75))

# GET ESTIMATE FROM MATCHIT()
set.seed(5678)
m.out1 <- matchit(treat ~ X, data=lalonde, method='genetic', 
estimand='ATT', ties=TRUE, print.level=1,
                        pop.size=150, wait.generations=1, 
max.generations=10, hard.generation.limit=TRUE,
                        unif.seed=1945, int.seed=1906)

# Create a vector of "parameters at the solution" reported by matchit().
# Behind the scenes, these weights have been produced by GenMatch().
weights <- c(8.121767e+02, 7.735192e+02, 5.938936e+02, 4.079661e+02, 
3.665018e+02, 1.361011e+02,
                  9.644896e+02, 6.083636e+02,  2.346772e+00)

ATT.MatchIt <- with(match.data(m.out1), 
weighted.mean(re78[treat==1], weights[treat==1])) -
                with(match.data(m.out1), 
weighted.mean(re78[treat==0], weights[treat==0]))
print(ATT.MatchIt)  # 939.2

# GET ESTIMATE FROM MATCH()
# The Match() estimate is -952.3 -- very different.
Match(Y=lalonde$re78, Tr=lalonde$treat, X=X, estimand="ATT", 
Weight.matrix=diag(weights), ties=TRUE)$est

# NOTE DISCREPANCY BETWEEN ncol(X) AND length(weights)
# There are only 8 variables in X, so why is matchit() producing 
weights for nine variables?
ncol(X)          # 8
length(weights)  # 9

# ADD PROPENSITY SCORE TO X AND RE-ESTIMATE WITH MATCH()
glm1 <- glm(treat ~ 
age+educ+black+hispan+married+nodegree+re74+re75, family=binomial, 
data=lalonde)
X2 <- with(lalonde, cbind(age, educ, black, hispan, married, 
nodegree, re74, re75))
X2 <- cbind(glm1$fitted, X2)

Match(Y=lalonde$re78, Tr=lalonde$treat, X=X2, estimand="ATT", 
Weight.matrix=diag(weights), ties=TRUE)$est  # 939.2

-
---
MatchIt mailing list served by HUIT
List Address: matchit <at> 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/
Matchit mailing list
Matchit <at> lists.gking.harvard.edu
https://lists.gking.harvard.edu/mailman/listinfo/matchit
Donny Baum | 27 Feb 18:14
Picon

Using matchit for large datasets

Has anyone come across problems of performance using MatchIt with large datasets? I am trying to perform nearest neighbor matching with 10 subclassifications on a sample of 400,000 (50,000 treatment cases, 350,00 untreated) with about 25 covariates. I was able to get one round of successful results after about 8 hours of waiting for R to produce the output. Is this typical of using MatchIt with large data? Is there any way to increase the speed or otherwise work around this?

Any help would be great.

Cheers,

Don Baum

--
Don Baum
Ph.D. Candidate/ Graduate Assistant
Comparative and International Development Education
Educational Policy and Administration
University of Minnesota


-
---
MatchIt mailing list served by HUIT
List Address: matchit@...
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/
Matchit mailing list
Matchit@...
https://lists.gking.harvard.edu/mailman/listinfo/matchit
Marco Francesco | 27 Feb 12:33
Picon
Favicon

(no subject)

Thank You very much Kosuke,

I will check my variables right now.
May I ask you a little methodological question ?

When I use the (logit) propensity matching method , the average propensity score for treated is about 12%...
because only a small part of the treated has scores between 50% and
80%...
Does it means that there is an omitted variable somewhere ? Or there is no absolute reference level and I have
to assess this figure relatively to the average score of the control group?
I was expecting to obtain a propensity score much higher for the treated ...  also because when I run the
same logistic specification of the probability of bein treated using another stat package (in order to
see the significance of the coefficients) I obtain that all my variables are highly significant at the 1% level...

What do you think ?
Many thanks

On 27 February 2012 04:36, Kosuke Imai <kimai <at> princeton.edu> wrote:
> My guess is that there is a perfect collinearity among your variables.
>
> Kosuke
>
> Department of Politics
> Princeton University
> http://imai.princeton.edu
>
> On Feb 24, 2012, at 5:32 PM, Francesco wrote:
>
>> Dear Matchit list,
>>
>> I am using matchit for my work, and I really appreciate the excellent work you have done so far.
>> I have a question : I perform a nearest neighbor matching procedure with a large dataset ( 40 000
individuals, 15 variables) and when I use the standard propensity score as a distance, everything works
fine : the matching is quite good
>> However if I specify the "mahalanobis" distance I get an error saying that :
>>
>> "Lapack dgesv : le système est exactement singulier" (the system is exactly singular)...
>>
>> Do you have an idea of what might cause this problem ? I have no missing data...
>>
>> Many thanks
>> -
>> ---
>> MatchIt mailing list served by HUIT
>> List Address: matchit <at> 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/
>> Matchit mailing list
>> Matchit <at> lists.gking.harvard.edu
>> https://lists.gking.harvard.edu/mailman/listinfo/matchit
>
-
---
MatchIt mailing list served by HUIT
List Address: matchit <at> 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/
Matchit mailing list
Matchit <at> lists.gking.harvard.edu
https://lists.gking.harvard.edu/mailman/listinfo/matchit
Francesco | 24 Feb 23:32
Picon
Favicon

MAHALANOBIS

Dear Matchit list,

I am using matchit for my work, and I really appreciate the excellent work you have done so far.
I have a question : I perform a nearest neighbor matching procedure with a large dataset ( 40 000 individuals, 15 variables) and when I use the standard propensity score as a distance, everything works fine : the matching is quite good
However if I specify the "mahalanobis" distance I get an error saying that :

"Lapack dgesv : le système est exactement singulier" (the system is exactly singular)...

Do you have an idea of what might cause this problem ? I have no missing data...

Many thanks

-
---
MatchIt mailing list served by HUIT
List Address: matchit@...
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/
Matchit mailing list
Matchit@...
https://lists.gking.harvard.edu/mailman/listinfo/matchit
Shane Phillips | 1 Feb 23:36
Picon

Question about optimal matching


> 
> Could you please verify that the code below is properly constructed? 
> 
> nearest0 <- matchit(treat ~ age+lunch+iep+gender+cogat+mapfall+itbs, data = Run0031,
method="nearest", exact=c("lunch","iep"))
> nearest1 <- matchit(treat ~ age+lunch+iep+gender+cogat+mapfall+itbs, data = Run0031,
method="nearest", caliper=0.1)
> opt <- matchit(treat ~ age+lunch+iep+gender+cogat+mapfall+itbs, data = Run0031, method="optimal", ratio=1)
> 
> This the segment of my code for doing PSM on one run of my data using 3 different methods.
> 
> Thanks!
> 
> Shane
> 
-
---
MatchIt mailing list served by HUIT
List Address: matchit@...
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/
Matchit mailing list
Matchit@...
https://lists.gking.harvard.edu/mailman/listinfo/matchit

Francois Maurice | 1 Feb 20:16
Favicon

Trying to implement an example from the MatchIt manual

Hi,
 
I'm trying to implement the example at page 18 from the MatchIt manual. The example is about a way to estimate the ATT.
 
I can't implement the example because I'm using model="ls.mixed" so my dataframe has to be in a long format. In concrete terms, when I extract my dataframe with match.data() to restructure it in long format, I can't use the option data=match.data(mydata, "control") within Zelig.
 
Is there a workaround ? I tried to use matchit() with the long format dataframe, but it gives wrong mathching since each case has multiple observations in that format.
 
Thanks,
 
François Maurice
-
---
MatchIt mailing list served by HUIT
List Address: matchit@...
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/
Matchit mailing list
Matchit@...
https://lists.gking.harvard.edu/mailman/listinfo/matchit
Francois Maurice | 1 Feb 17:38
Favicon

ATE or ATT ?

Hi,
 
I'm using MatchIt. I'm trying to understand which method produce ATE estimate and which one produce ATT estimate.
 
In the documentation, section 5: Frequently Asked Questions: How Exactly are the Weights Created?, it is said :
 
"These weights are constructed to estimate the average treatment effect on the treated, [...]".
 
Is there a way with MatchIt to estimate ATE ? To be concrete, I'm using experimental data with a control group almost three times the treated group. I'm using the following four methods with ratio=2 in matchit():
 
Nearest : Drop some controls
Subclassification : Keep all controls
Nearest with exact : Drop some controls
Genetic : Drop some contrls
 
Since subclassification keeps all controls, can that be an ATE estimate or do I need to built my own weights to make sure it is ATE?
 
In general, is MatchIt produced only match set with weights that can only be use to estimate ATT ?
 
And if I use Zelig after MatchIt, is there a way to produce ATE estimate ?
 
Thanks,
 
François Maurice
-
---
MatchIt mailing list served by HUIT
List Address: matchit@...
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/
Matchit mailing list
Matchit@...
https://lists.gking.harvard.edu/mailman/listinfo/matchit
Shane Phillips | 1 Feb 16:34
Picon

Another optimal matching question

Hi, again!


I am comparing optimal matching to two nearest neighbor matching methods.  I ran the PSM in MatchIt! and I am seeing some weird stuff in the distributions of my covariates for the optimal method.  The standardized mean differences are very low on average for my simulation runs.  However the treated and control groups ore very dissimilar in the optimal matching method.  The covariate distributions in the nearest neighbor methods are very similar.  How can I explain that?

Thanks!

Shane Phillips
-
---
MatchIt mailing list served by HUIT
List Address: matchit@...
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/
Matchit mailing list
Matchit@...
https://lists.gking.harvard.edu/mailman/listinfo/matchit

Gmane