The advantages of using macros with loops
Using loops and macros in Stata can hold many advantages, mainly reducing the length of your do files, allowing errors to be tracked and fixed quickly and efficiently, faster running do files and providing us with re-usable programs which can be used in subsequent data analyses with similar scenarios. In this presentation we shall cover the following areas: * Storing global and local macros within Stata, with applied examples including storing categories of a variable, storing data summaries and names of files within a directory. * The commands foreach, forval and while, with applied examples. * Applied examples of how to combine macros with loops and show why this can be useful.
When requesting a correction, please mention this item's handle: RePEc:boc:usug07:04. See general information about how to correct material in RePEc.
For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: (Christopher F Baum)
If references are entirely missing, you can add them using this form.