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]

From |
David Kantor <kantor.d@att.net> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Matching samples in Stata |

Date |
Thu, 11 Oct 2012 16:53:01 -0400 |

Hi Paula, At 01:40 PM 10/11/2012, you wrote:

HI David,I finally got round to matching my sample. I match the two sampleson family education level and gendermahapick ed_level_fam sex, idvar( "ID") genfile(D:\matched)nummatches(4) full treated(course)where course is 1 for medicine and 0 for other - as in my analyses Iwant to compare medicine students vs. the others. I created a file'matched' as I intend to import the relevant variables into it sothat I can just run the analyses for this.Ideally I want to only keep the first match. However, when I check for duplicates using duplicates list IDI find that many of the matched respondents are the same fordifferent medicine students.Can you suggest what I am doing wrong and any way around this pls? [...]

Incidentally, if you are checking for duplicates, you might want to try duplicates ... if _matchnum==1

There are two approaches to proceeding.

The second is to do some kind of unique selection.

randomly choose a treated case select its closest match remove both the treated case and its match from the pool repeat this process on the remaining cases until all are matched.

I hope this is useful. I will look for the random-selection code. --David

* * 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/

**Follow-Ups**:**Re: st: Matching samples in Stata***From:*Paula Arce <paulaarce@rocketmail.com>

**References**:**st: Matching samples in Stata***From:*Paula Arce <paulaarce@rocketmail.com>

**Re: st: Matching samples in Stata***From:*David Kantor <kantor.d@att.net>

**Re: st: Matching samples in Stata***From:*Paula Arce <paulaarce@rocketmail.com>

**Re: st: Matching samples in Stata***From:*David Kantor <kantor.d@att.net>

**Re: st: Matching samples in Stata***From:*Paula Arce <paulaarce@rocketmail.com>

- Prev by Date:
**Re: st: two selection equations followed by mlogit?** - Next by Date:
**Re: st: ordered logistic regression with endogenous variable** - Previous by thread:
**Re: st: Matching samples in Stata** - Next by thread:
**Re: st: Matching samples in Stata** - Index(es):