Differences between revisions 3 and 4
Revision 3 as of 2023-06-09 14:24:51
Size: 1035
Comment:
Revision 4 as of 2025-10-24 16:39:59
Size: 1019
Comment: Rewrite
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
The '''`clear`''' command clears data from memory. '''`-clear-`''' clears data from memory.
Line 17: Line 17:
There are several extended commands: There are several subcommands:

Stata Clear

-clear- clears data from memory.


Usage

clear

There are several subcommands:

  • clear frames removes all frames from memory and resets the current frame to 'default'

  • clear mata is equivalent to mata: mata clear

  • clear results is equivalent to return clear, ereturn clear, sreturn clear, and _return drop _all altogether

  • clear matrix is equivalent to clear results, matrix drop _all, and estimates drop _all altogether

  • clear programs is equivalent to program drop _all

  • clear ado is equivalent to program drop _allado

  • clear rngstream resets all random number states

  • clear collect is equivalent to collect clear

  • clear all and clear * are equivalent to all of the above altogether, except clear rngstream


See also

Stata manual for clear


CategoryRicottone

Stata/Clear (last edited 2025-10-24 16:52:40 by DominicRicottone)