Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: RE: Stata equivalent to Matlab 'waitbar' function?

From   "Nick Cox" <>
To   <>
Subject   st: RE: Stata equivalent to Matlab 'waitbar' function?
Date   Wed, 7 Apr 2010 12:29:13 +0100

I'm not familiar with -waitbar-. 

You could moderate the -display- by conditioning, e.g.

forval i = 1/1000 { 
	if mod(`i', 100) == 0 {
		display 100 * `i'/1000 "% done" 

If the code was otherwise done -quietly- you would need to prefix it


SLG Brilleman

Does anyone know of a way to produce either a graphical or numeric
in the STATA results window, that indicates the progress when running a 
program with a loop function in it (ie. to indicate the proportion of
iterations currently complete, when using a command such as -forvalues i
1/`iterations'- ...)

I can use -display- to provide a cumulative percentage, but would prefer
the printed result could overwrite the last text rather than a
build up of numbers in the results window.

If it helps, this would be something equivalent to the 'waitbar'
in Matlab.

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index