EconPapers    
Economics at your fingertips  
 

The advantages of using macros with loops

Shuk-Li Man () and Hannah Evans
Additional contact information
Shuk-Li Man: Center for Sexual Health and HIV Research, University College London
Hannah Evans: Center for Sexual Health and HIV Research, University College London

United Kingdom Stata Users' Group Meetings 2007 from Stata Users Group

Abstract: 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.

Date: 2007-09-14
References: Add references at CitEc
Citations:

Downloads: (external link)
http://repec.org/usug2007/Stata_user_groupoct2007v5.ppt presentation slides (application/x-ms-powerpoint)
Our link check indicates that this URL is bad, the error code is: 404 Not Found

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: https://EconPapers.repec.org/RePEc:boc:usug07:04

Access Statistics for this paper

More papers in United Kingdom Stata Users' Group Meetings 2007 from Stata Users Group Contact information at EDIRC.
Bibliographic data for series maintained by Christopher F Baum ().

 
Page updated 2025-03-19
Handle: RePEc:boc:usug07:04