Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
re: st: identifying matched pairs using command: nnmatch
From
"Ariel Linden, DrPH" <[email protected]>
To
<[email protected]>
Subject
re: st: identifying matched pairs using command: nnmatch
Date
Thu, 8 Aug 2013 10:36:11 -0400
Hi Verena,
First, a couple of general "housekeeping" items:
(1) The program is "Stata", not STATA.
(2) When mentioning a user written program, such as -nnmatch-, state where
you found the program and what version. This is because user written
programs can be found at different sites, and versions change, making it
sometimes difficult to replicate the problem you indicate. In the case of
-nnmatch-, (http://www.stata-journal.com/software/sj4-3) it is important,
because Stata V13 now includes -teffects nnmatch- which is based on
-nnmatch- but has a few changes...
Now to your question(s): You state that you have panel data. Does this mean
you are evaluating this as a longitudinal study? That makes a difference in
choice of "matching" approach. It also brings with it additional issues of
missing data due to attrition, etc.
As for the question " I do not know how to output the generated matched
pair-sample from step 1 to use it later for the Regression in step 2", I
suggest you read the help file for -nnmatch-. It very clearly describes the
keep() option, which produces a new data set with the information you are
inquiring about, specifically:
id: The identification code for the observation being matched, i.
(When the command nnmatch is given, the program creates a
temporary variable, id = {1,2,...N}, based on the original sort
order.)
index: The identification code for j, the match for observation i.
As for the last issue you raise, about using these data in a regression, I
am not sure why you need to do that? -nnmatch- gives you the treatment
effect estimate, so why would you need to take this and run a regression on
it?
Ariel
Date: Wed, 7 Aug 2013 22:23:36 +0100 (BST)
From: verena nuiding <[email protected]>
Subject: st: identifying matched pairs using command: nnmatch
Dear all,
I have a question regarding matching in STATA.
In my research I have panel data, one dependent variable (continous), a
treatment variable and different control variables. I am using STATA 11.
In the first step wanted to do matching (using the command nnmatch for
nearest neighbour matching). In the second step I wanted to use the
generated matched pair-sample to do a regression on that sample. But my
problem is that I do not know how to output the generated matched
pair-sample from step 1 to use it later for the Regression in step 2.
I hope you can help me with this issue.
I already read your contribution regarding a similar problem:
http://www.stata.com/statalist/archive/2010-04/msg00209.html, but I suppose
this does only work with a binary variable as dependent variable, am I
right?
Thank you very much for your support in advance.
Kind regards
Verena Nuiding
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/