I am having problems with a seemingly simple issue. I am trying to take a specific subset of the r(table) matrix which is stored in Stata after running a logistic regression. In doing so, I would like to use row and column names to subscript r(table). My code is like the following:
However, when I run this code, Stata reports the error
despite the fact that when I list r(table) I see var3 as the name of a column. Is anyone able to help me solve this issue?
Many thanks in advance.
Code:
logistic y var1 var2 var3 matrix s1=r(table) matrix s2=s1["pvalue","var3"]
Code:
var3 not found r(111)
Many thanks in advance.
Comment