Stata’s main data model treats observations in rows and variables in columns quite differently, but rowwise problems also arise that require working against the grain. This column shows how to exploit existing functions and egen functions when they exist and apply to such problems. It offers advice on how to build your own loops, egen functions, or programs when needed. Mata provides especially convenient tools for constructing many such functions and programs, centered on putting selected data into matrices and then processing each observation as a separate vector. Two programs, rowsort and rowranks, are formally published with this column.
Download Info
To download:
If you experience problems downloading a file, check if you have the
proper application to
view it first. Information about this may be contained
in the File-Format links below. In case of further problems read
the IDEAS help
page. Note that these files are not on the IDEAS
site. Please be patient as the files may be large.
Publisher Info
Article provided by StataCorp LP in its journal Stata Journal.
Volume (Year): 9 (2009) Issue (Month): 1 (March) Pages: 137-157 Download reference. The following formats are available: HTML
(with abstract),
plain text
(with abstract),
BibTeX,
RIS (EndNote, RefMan, ProCite),
ReDIF