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

Re: st: help merge

From   David Kantor <>
Subject   Re: st: help merge
Date   Tue, 09 Sep 2003 13:13:43 -0400

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

In an earlier Stata version, you would need to do what Oscar Alberto Budar 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 the -keep()- feature.

This also reminds us to state what version of Stata you use (if it is not 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:

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