English, Article, Journal or magazine article edition: How to face lists with fortitude Nicholas J. Cox

User activity

Share to:
 
Bookmark: http://trove.nla.gov.au/version/176151
Physical Description
  • preprint
Language
  • English

Edition details

Title
  • How to face lists with fortitude
Author
  • Nicholas J. Cox
Physical Description
  • preprint
Notes
  • Among various structures in Stata for cycling through lists (whether lists of variable names, numbers, or arbitrary strings) are foreach and forvalues, introduced in Stata 7 in 2001, and for, introduced in Stata 3.1 in 1992, and revised in 5.0 (1997) and 6.0 (1999). Typically, each member of the list supplied is substituted in turn in one or more commands within the structure being used. This is a tutorial specifically designed for Stata users who do little or no Stata programming. Despite being labelled as programming commands, these structures have many uses either interactively or within do files and help impart both speed and system to repetitive tasks. One prerequisite for understanding foreach and forvalues is the idea of a local macro, of which the most difficult part is understanding the strange name. With that idea assimilated, it is relatively easy to see how foreach and forvalues can be used in a large variety of problems. Despite being newer than for in Stata, these structures are recommended over for to new users, or to more experienced users who have made little or no use of any of these to date. For completeness, there is also comparison with for, and some comments on their relative merits.
  • RePEc:boc:usug02:14
Language
  • English
Contributed by
OAIster

Get this edition

Other links

  • Set up My libraries

    How do I set up "My libraries"?

    In order to set up a list of libraries that you have access to, you must first login or sign up. Then set up a personal list of libraries from your profile page by clicking on your user name at the top right of any screen.

  • All (1)
  • Unknown (1)
None of your libraries hold this item.
None of your libraries hold this item.
None of your libraries hold this item.
None of your libraries hold this item.
None of your libraries hold this item.
None of your libraries hold this item.
None of your libraries hold this item.
None of your libraries hold this item.

User activity


e.g. test cricket, Perth (WA), "Parkes, Henry"

Separate different tags with a comma. To include a comma in your tag, surround the tag with double quotes.

Be the first to add a tag for this edition

Be the first to add this to a list

Comments and reviews

What are comments? Add a comment

No user comments or reviews for this version

Add a comment