0

I am using matchit for my firm level analysis.

psm_out <- matchit(treat~firm_variables, data=firm_data, 
method="nearest", exact=c("year","industry"), ratio=1)

The generated result gave me a lot of duplicates. For example, treatment sample is firm A's year 2016. And within the matched control group, I have firm A's year 2010. I want a matched control group without treatment group's other years. How can I get a desired matching result?

2 Answers 2

0

You can solve this quite easily by removing from your control group firms that appear as treated for one year at least. Once you have corrected this, you can run the command you posted.

0

In MatchIt, you can use the antiexact argument, which prevents two units from being matched if they have the same value of the anti-exact matching variable. In this case, you would use firm ID as the anti-exact matching variable; this ensures that a treated observation will never been matched with another observation from the same firm. This would look like the following:

psm_out <- matchit(treat ~ firm_variables, data = firm_data, 
                   exact = ~year + industry,
                   antiexact = ~firmID)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.