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

Re: st: Difference btw "clear" & "drop _all"

From   David Kantor <[email protected]>
To   [email protected]
Subject   Re: st: Difference btw "clear" & "drop _all"
Date   Fri, 19 Mar 2004 16:44:46 -0500

At 04:14 PM 3/19/2004 -0500, Nomorenook wrote:
Hi all,

I am a newbie to STATA and I have a question regarding "clear" and "drop _all".

According to STATA, these two are supposed to be the same. However, if I use "clear", even my matrices are deleted from the memory, as opposed to "drop _all", which just deletes the variables but maintains matrices in the memory. Can anyone tell me more about the differences between these two commands?
These command are not the same, as you have discovered.

-drop _all- drops your observations and you variables; that's all.

-clear- does -drop _all- and a whole lot more. For a complete list of what it does, see -help clear-.

You can also look at the ado file. On a windows system, using Stata8, that would typically be

Or, you can...
set trace on
to see all that happens (be sure you are ready to clear when you do that).

Good luck.
-- David

David Kantor
Institute for Policy Studies
Johns Hopkins University
[email protected]

* For searches and help try:

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