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, statalist.org is already up and running.


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

st: possible bug in merge, keepusing


From   Robert Duval <rduval@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: possible bug in merge, keepusing
Date   Sat, 5 Nov 2011 07:56:01 -0600

Dear all.

I apologize for calling out a bug, but i think there is something
wrong with the merge command with the keepusing option. Consider the
following code

sysuse auto
collapse price-headroom , by(foreign)

foreach j of var price-head {
rename `j' M`j'
}

save col

sysuse auto
merge m:1 foreign using col, keepusing(Mprice-Mrep78)

the output I get from my Stata/MP 11.2 for Windows (64-bit x86-64) is

variable Mprice-Mrep78 not found in using dataset
r(111);

namely it fails to recognize that Mprice-Mrep78 is a valid varlist.
Instead if I enter the variables individually, i.e. Mprice Mmpg Mrep78
everything goes as expected. In other words although the manual
specifies that the keepusing() option accepts a varlist argument it
doesn't recognize (at least in my case) the standar thisvar-thatvar
varlist statement.

Am I missing something here? Can you reproduce the mistake?
Thanks in advance.
robert
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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