Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

Re: st: the use of loop function in Stata

From   Rosie Chen <>
To   "" <>
Subject   Re: st: the use of loop function in Stata
Date   Tue, 13 Mar 2012 07:36:36 -0700 (PDT)

Nick, thank you very much for the further advice, which makes the syntax more efficient. Given the loop syntax I have, how to save all the histogram graphs? If I use the code below, the error message says: "file histogram.gph already exists". 

foreach var of varlist lp*{

    histogram `var',  by(AID4, col(1))

    graph save histogram

*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index