I am trying to create a matrix in Stata with multiple elements. For example, one column with string variables, one column with numbers, like the one below:
So I tried the following command:
But I got the error message
I checked the help file of -matrix-, it seems that all the elements in a matrix should be number. Does anyone know how to define a matrix with different types of elements?
Code:
column1 column2 row 1 x is 4 row 2 y is 5 row 3 z is 6
Code:
matrix a = ("x is", 4\"y is", 5\"z is", 6)
Code:
type mismatch r(109);
Comment