Hi all,
I have an r(table) where the columns have names that stretch over three rows. I want to select one value in the r(table) and save it to a matrix. Normally, I would use:
mat X=r(table)
mat Y=X["pvalue",Variable1"]
which would return the value in row 'pvalue' and column 'variable1'.
This no longer works now that the name of column variable consists out of 3 lines as can be seen in the sample below:
(some column and rows were removed for viewing purposes)
. mat li X
X[9,16]
Q: How can I write the value printed in red (.00002365) in a matrix by specifying the column and row names?
I do not wish to use hardcoded column and row numbers (e.g. mat Y=X[4,3]).
Thanks,
- Vincent
I have an r(table) where the columns have names that stretch over three rows. I want to select one value in the r(table) and save it to a matrix. Normally, I would use:
mat X=r(table)
mat Y=X["pvalue",Variable1"]
which would return the value in row 'pvalue' and column 'variable1'.
This no longer works now that the name of column variable consists out of 3 lines as can be seen in the sample below:
(some column and rows were removed for viewing purposes)
. mat li X
X[9,16]
Dep_var: | Dep_var: | Dep_var: | Dep_var: | cut1: | cut2: | |
1b. | 2. | |||||
Bin | Bin | Variable1 | Variable2 | _cons | _cons | |
b | 1 | 2.5912676 | .89907478 | 1.0662699 | -11.00487 | -10.587897 |
se | . | .66428033 | .02262727 | .04042181 | 2.0752059 | 2.0324945 |
z | . | 3.714197 | -4.2272772 | 1.6926192 | .b | .b |
pvalue | . | .00020385 | .00002365 | .09052797 | .b | .b |
ll | . | 1.5678475 | .85580218 | .98991626 | -15.072199 | -14.571513 |
I do not wish to use hardcoded column and row numbers (e.g. mat Y=X[4,3]).
Thanks,
- Vincent
Comment