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. © 2009 StataCorp LP.
CITATION STYLE
Cox, N. J. (2009). Speaking stata: Rowwise. Stata Journal, 9(1), 137–157. https://doi.org/10.1177/1536867x0900900107
Mendeley helps you to discover research relevant for your work.