Speaking Stata: Rowwise

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.


Issue Date:
2009
Publication Type:
Journal Article
DOI and Other Identifiers:
pr0046 (Other)
PURL Identifier:
http://purl.umn.edu/122706
Published in:
Stata Journal, Volume 09, Number 1
Page range:
137-157
Total Pages:
21

Record appears in:



 Record created 2017-04-01, last modified 2017-08-26

Fulltext:
Download fulltext
PDF

Rate this document:

Rate this document:
1
2
3
 
(Not yet reviewed)