Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: how to show "dots" in a loop?
From
László Sándor <[email protected]>
To
[email protected]
Subject
Re: st: how to show "dots" in a loop?
Date
Wed, 18 Apr 2012 19:26:01 -0400
Thank you all, and shame I did not find it myself �ut well, this is
why you are such a great resource.
I could look this into more and more; but for anyone watching: Jörg's
solution works like a dream.
Thanks again,
Laszlo
On Wed, Apr 18, 2012 at 7:14 PM, Paul Millar <[email protected]> wrote:
>
> Use the display command with the _cont feature:
>
> forvalues i=1/20 {
> di "." _cont
> }
>
> - Paul
>
> On Wed, Apr 18, 2012 at 6:38 PM, Joerg Luedicke
> <[email protected]> wrote:
> > A good way to tackle a problem like that is to look into the source
> > code of programs that actually do what is desired. Inspecting the file
> > -bootstrap.ado- reveals that Stata is using some undocumented program
> > for these dots (-findfile _dots.ado-). Have a look at this little
> > example program:
> >
> >
> > *---------------------------------
> > clear
> > set obs 1000
> > gen x=runiform()
> >
> >
> > program define dots
> >
> > _dots 0
> >
> > forval i = 1/1000 {
> > qui sum x in `i'
> > _dots `i' 0
> > }
> >
> > end
> > *---------------------------------
> >
> > HTH,
> >
> > J.
> >
> > 2012/4/18 László Sándor <[email protected]>:
> >> Hi all,
> >>
> >> I try to do a simple thing in Stata 11 MP for Windows: demean and
> >> detrend a panel. For this I need to loop over all individuals'
> >> subsamples. However, I finish quickly with a 1% subsample of my data,
> >> while it is suspiciously slow with 10% (of any operations, the loop
> >> should be linear in this regard as long as the system has enough
> >> memory).
> >>
> >> I would now like to report something every iteration, but I would
> >> avoid seeing thousands of lines filled with this, esp. in my log. Long
> >> story short: can I somehow print dots as wrapper commands like
> >> bootstrap do?
> >>
> >> (Formatted, easy-to-count dots would be the best, but if those are not
> >> simple to copy from a "dottable" command, I could live with a flood of
> >> dots to judge how fast I'm going through the data.)
> >>
> >> Thanks,
> >>
> >> Laszlo
> >> *
> >> * For searches and help try:
> >> * http://www.stata.com/help.cgi?search
> >> * http://www.stata.com/support/statalist/faq
> >> * http://www.ats.ucla.edu/stat/stata/
> >
> > *
> > * For searches and help try:
> > * http://www.stata.com/help.cgi?search
> > * http://www.stata.com/support/statalist/faq
> > * http://www.ats.ucla.edu/stat/stata/
>
>
>
> --
> - Paul Millar, Ph.D.
> School of Criminology and Criminal Justice
> Nipissing University
> North Bay, Ontario, Canada
> www.paulmillar.ca
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/