[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: how to make a string matrix
Along with Bill Gould's solution for using Mata to hold a "string
matrix", also note that such a creature can be handled by using a set
local row1 a b c d e
local row2 f g h i j k l
local row3 m n o p
local row4 q r s t u v
local row5 w x y z
local row 3
local col 2
local element : word `col' of `row`row''
di "S[`row',`col'] is `element'"
Note that unlike standard matrices, such a 'matrix' can have a
different number of elements per row.
Some may note the resemblance between this solution and an array of
pointers to arrays.
Kit Baum, Boston College Economics and DIW Berlin
An Introduction to Modern Econometrics Using Stata:
* For searches and help try: