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: foreach command
From
Nick Cox <[email protected]>
To
[email protected]
Subject
Re: st: foreach command
Date
Wed, 23 May 2012 13:33:18 +0100
Loops are documented concisely at [P] foreach and [P] forvalues. A
longer tutorial is accessible to you at
SJ-2-2 pr0005 . . . . . . Speaking Stata: How to face lists with fortitude
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . N. J. Cox
Q2/02 SJ 2(2):202--222 (no commands)
demonstrates the usefulness of for, foreach, forvalues, and
local macros for interactive (non programming) tasks
The numerology of this reference was pure accident, but too, too
extraordinary not to bemuse each time I think about it. That aside,
this reference is downloadable from
http://www.stata-journal.com/sjpdf.html?articlenum=pr0005
Sorry, but I don't understand what you are trying to do in your second
question about -predict-. As before, you should not expect comments on
code that you do not show us.
Nick
On Wed, May 23, 2012 at 12:58 PM, Caliph Omar Moumin
<[email protected]> wrote:
> Thank You Very Much,
> Both perfectly working so i choose " forval i = 1/11 { " it is short and looks smarter
> I am sorry for not understanding quicker, it is tricky and difficult for some one who have no prior knowledge abt programming and loops like me. I am reading a lot abt loops in the internet but very few give practical examples.
> I was also wondering if it is possible to tell stata "post regression analysis" like predict. I tried it creates the first one and then error already exist.
>
*
* 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/