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 on April 23, and its replacement, is already up and running.

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

st: a reverse wildcard or other way to mean "all variables but..."

From   Doug Hess <>
Subject   st: a reverse wildcard or other way to mean "all variables but..."
Date   Fri, 29 Jun 2012 11:56:42 -0400

I thought I was being smart and quick with the following one-liner

-collapse *, by(ID)-

But, of course, the variable named ID is included in the wildcard
before the comma, which means the command gives the error statement
"control may not be both target and by()." I'm not sure if the
solution is some reverse of the wildcard or way to say: _all "but
don't include ID when I say _all".   I guess one can just include all
the variables in a - local - or -global- and then hunt for and remove
the one variable you want left out. But is there a code for
subtracting something from * or _all on the fly, so to speak?

Thank you. I'm on the list in digest mode, so if replies can cc me,
that would helpful.

[P.S. I found this discussion in the archive, but it's not exactly the
same issue:

*   For searches and help try:

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