Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: help merge

From   "Ritesh Mistry" <>
To   <>
Subject   RE: st: help merge
Date   Tue, 9 Sep 2003 10:22:54 -0700

Thanks all for your posts.  I did infact try what Oscar suggested and
that worked fine.


-----Original Message-----
[] On Behalf Of David Kantor
Sent: Tuesday, September 09, 2003 10:14 AM
Subject: Re: st: help merge

Indeed, -keep()- is a feature that is new in Stata 8.

In an earlier Stata version, you would need to do what Oscar Alberto
Mejía had suggested. Here's a somewhat modified variant on that:

use master;
keep the variables you want to take, plus match-key variables;
sort on the match-key variables;
save as a tempfile;
use analytic;
merge using the tempfile created above;

I used to do this all the time.  Thus I am very please that they added
-keep()- feature.

This also reminds us to state what version of Stata you use (if it is
the latest) when posing a question.

-- David

At 12:36 PM 9/9/2003 -0400, you wrote:
>I think the problem is that the keep option for merge is new in Stata
8, so
>it wouldn't be documented or working for the poster who states they are
>using Stata 7.0.
>Michael Blasnik

David Kantor
Institute for Policy Studies
Johns Hopkins University

*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2022 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index