It should be fairly simply, but I am very confused as to how I should refer to a location in a matrix. I want to store certain column's of the regression output in a new matrix. To do so I start by creating an empty matrix and try to save first column (all rows) of matrix m1 in first column of matrix m:
Code:
mat m=J(15,27, .) svy: regress y x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 mat m1=r(table)' mat m[1..,1]=m1[1..,1]
Code:
mat m[1..,1]=m1[1..,1] 1.. invalid name r(198);

I will be grateful for your help and also reference to a guide to using matrices in Stata please.
Many thanks.
Sincerely,
Sumedha.
0 Response to Referring to matrix columns and rows
Post a Comment