Ayuda
Ir al contenido

Dialnet


Speaking Stata: loops, again and again

  • Autores: Nicholas J. Cox
  • Localización: The Stata journal, ISSN 1536-867X, Vol. 20, Nº. 4, 2020, págs. 999-1015
  • Idioma: inglés
  • Enlaces
  • Resumen
    • Two commands in official Stata, foreach and forvalues, provide structures for looping through lists of values (variable names, numbers, arbitrary text) and repeating commands using members of those lists in turn. These commands may be used interactively, and none is restricted to use in Stata programs.

      They are explained and compared in some detail with a variety of examples. In addition, a self-contained exposition is given on local macros, understanding of which is needed for use of foreach and forvalues. This column is a revision of the column “How to face lists with fortitude”,which appeared in Stata Journal 2: 202–222 (2002). (The bizarre bibliographical details are too, too extraordinary not to be flagged but were pure happenstance.) The presentation here has been trimmed of now historic content and corrected, improved, and updated in several minor details.


Fundación Dialnet

Dialnet Plus

  • Más información sobre Dialnet Plus

Opciones de compartir

Opciones de entorno