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]

Re: st: Dropping variables in USE statement

From   Nick Cox <>
Subject   Re: st: Dropping variables in USE statement
Date   Thu, 28 Mar 2013 14:19:37 +0000

You can specify a -varlist- with the -use- command, which is the way
to do what you want.
This is documented in the -help- for -use-. But you do that
positively, not negatively.

-drop- in Stata terminology refers only to deletion of variables from
the current dataset, that in memory. It would never be used to refer
to something else, namely not reading in some variables.

There is no difficulty about using a wildcard * with -drop- once data
are in memory. There is an explicit example in the -help- for -drop-.


On Thu, Mar 28, 2013 at 1:56 PM, William Sankey <> wrote:

> Is there a way to drop variables on the use statement? I am bringing
> in Stata dataset with too many variables (transferred over from SAS
> which is a pain to drop variables because I don't think I can drop
> variables with a *).
> Ideally I would like to process use DATASET, drop D4* D5* D6* etc
> Anyway to approach this besides going back to the original dataset in SAS?
*   For searches and help try:

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