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 <dkantor@jhu.edu>
To   statalist@hsphsun2.harvard.edu
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
c:\stata8\ado\base\c\clear.ado

Or, you can...
set trace on
clear
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
dkantor@jhu.edu
410-516-5404

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* 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   |   What's new   |   Site index