Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: st: comparing datasets

From   Mauro Mastrogiacomo <>
To   "''" <>
Subject   RE: st: comparing datasets
Date   Mon, 8 Aug 2011 16:45:35 +0200

Hi, one way could be

des, varlist
local myvars=r(varlist)
dis "`myvars'"

if you repeat this also for the second dataset then you can subtract the two macro's and the difference is what you need.

> -----Original Message-----
> From: [mailto:owner-
>] On Behalf Of Abhimanyu Arora
> Sent: maandag 8 augustus 2011 16:32
> To:
> Subject: Re: st: comparing datasets
> As a follow up, there should be something in the macros in r(), but
> return list gives me a blank stare.
> Abhimanyu
> On Mon, Aug 8, 2011 at 4:27 PM, Abhimanyu Arora
> <> wrote:
> > Dear statalist
> > Hope all's well
> > I have two datasets, one of which has all the variables of the
> second,
> > plus additional variables. I would like to get a list of all these
> > additional variables. There's this obscure command -dta_equal- that I
> > have got hold of, but contrary to what's in the help file, it doesn't
> > display the unique variables belonging to a particular dataset,
> rather
> > seems to be working merely like the -cf-. Any
> alternative/improvement?
> > Many thanks and best regards
> > Abhimanyu Arora
> > *
> > *   For searches and help try:
> > *
> > *
> > *
> >
> *
> *   For searches and help try:
> *
> *
> *

Dit bericht kan informatie bevatten die niet voor u is bestemd. Indien u niet
de geadresseerde bent of dit bericht abusievelijk aan u is toegezonden, wordt
u verzocht dat aan de afzender te melden en het bericht te verwijderen.
De Staat aanvaardt geen aansprakelijkheid voor schade, van welke aard ook, die
verband houdt met risico's verbonden aan het elektronisch verzenden van

This message may contain information that is not intended for you. If you are
not the addressee or if this message was sent to you by mistake, you are
requested to inform the sender and delete the message. The State accepts no
liability for damage of any kind resulting from the risks inherent in the
electronic transmission of messages.

*   For searches and help try:

© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index