Mat A=

Index | Categories

creates a matrix a

examples:

mat a=(1,1,3 \ 1,2,5 \ 1,3,8)

mat a=b+c mat a=a*b

* this command defines the matrix. Commas separate columns, \ indicates the end of the row

* you can also make a matrix from data, see help mkmat

* type "help matrix" to learn about Stata's matrix commands.

also:

mat b=J(5,6,1) makes a 5x6 matrix with 1 in each cell


Wednesday, January 02, 2008 (3)