EconPapers    
Economics at your fingertips  
 

Speaking Stata: Rowwise

Nicholas Cox ()

Stata Journal, 2009, vol. 9, issue 1, pages 137-157

Abstract: 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.

Keywords: rowsort; rowranks; rows; functions; loops; egen; Mata; minimum; maximum; median; any; all; distinct values; sorting; ranking (search for similar items in EconPapers)
Date: 2009

Downloads: (external link)
http://www.stata-journal.com/article.html?article=pr0046 link to article purchase
http://www.stata-journal.com/software/sj9-1/pr0046/ (text/html)

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: http://EconPapers.repec.org/RePEc:tsj:stataj:v:9:y:2009:i:1:p:137-157

Ordering information: This journal article can be ordered from
http://www.stata-journal.com/subscription.html

Access Statistics for this article

Stata Journal is edited by H. Joseph Newton and Nicholas J. Cox

More articles in Stata Journal from StataCorp LP
Series data maintained by Christopher F. Baum ().

 
Page updated 2009-10-25
Handle: RePEc:tsj:stataj:v:9:y:2009:i:1:p:137-157