[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: multiple identical .do files
In your do-files, you can use macros `1' `2' etc:
do mycoolfile data1
and then in your mycoolfile.do you can say something like
log using `1', replace
use `1', clear
I think this should be explained in more details in either [P] or [U],
and I am pretty sure I learned that in one of NetCourses some 8 years
On 3/23/06, paul d jacobs <email@example.com> wrote:
> Hi Stata users:
> My issue (which I could not find an answer to in the
> archives) has to do with a single .do file I would
> like to run on 10 datasets which all have the same
> variable names. Essentially, I am looking for a macro
> or loop program that could run the .do file on all ten
> datasets without having to update 10 separate .do
> files each time I make changes to the original.
> More specifically, right now I have 10 .do files and
> ten datasets. Each time I change a command, I have to
> resave the file ten times so that it corresponds to
> each dataset, run each file, and then use each .log
> file to find the particular statistics I want.
> Thanks very much for your assistance.
> Paul Jacobs
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> * For searches and help try:
> * http://www.stata.com/support/faqs/res/findit.html
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
* For searches and help try: