EconPapers    
Economics at your fingertips  
 

Improving flexibility and ease of matrix subsetting: The submatrix command

Daniele Spinelli

Stata Journal, 2023, vol. 23, issue 4, 1045-1056

Abstract: Matrix manipulation in Stata can be a time-consuming and tedious task, especially when it is necessary to subset or rearrange elements from large matrices based on nonconsecutive elements. Compared with Mata, these tasks require more time, more code, and sometimes more complex output. The purpose of this article is to introduce submatrix, a command to manipulate matrix elements using row (and column) names, numbers, and equations.

Keywords: submatrix; row names; column names; permutation vectors (search for similar items in EconPapers)
Date: 2023
Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj23-4/pr0077/
References: Add references at CitEc
Citations:

Downloads: (external link)
http://www.stata-journal.com/article.html?article=pr0077 link to article purchase

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: https://EconPapers.repec.org/RePEc:tsj:stataj:v:23:y:2023:i:4:p:1045-1056

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

DOI: 10.1177/1536867X221141012

Access Statistics for this article

Stata Journal is currently edited by Nicholas J. Cox and Stephen P. Jenkins

More articles in Stata Journal from StataCorp LLC
Bibliographic data for series maintained by Christopher F. Baum () and Lisa Gilmore ().

 
Page updated 2025-03-31
Handle: RePEc:tsj:stataj:v:23:y:2023:i:4:p:1045-1056