Dear Stata users,
I'm using -brant- command wrote by J. Scott Long & Jeremy Freese. Under Stata 16, when I run brant after performing ologit, it report an error saying that "variable cut1 not found". I checked the source of this error, and found that it is caused by _rm_modelinfo2 and _rm_rhsnames which are used to handle rhs information of ologit and provide them to brant. And because of different colname rules in ologit's r(table), the "_cons" is now named "cut1" "cut2" "cut3"... (see code below for detailed information), the _rm_rhsnames cannot change occurrences of "_cons" to " ". I think I have found a solution, i.e. to replace all the "cut1" "cut2" "cut3"... to " ". However, the problem is when I manipulate subinstr local, how can I change all occurrences of "cut1" "cut2" "cut3"... using a wildcard? As I show in below, the using of wildcard of * failed. Thank you very much.
I'm using -brant- command wrote by J. Scott Long & Jeremy Freese. Under Stata 16, when I run brant after performing ologit, it report an error saying that "variable cut1 not found". I checked the source of this error, and found that it is caused by _rm_modelinfo2 and _rm_rhsnames which are used to handle rhs information of ologit and provide them to brant. And because of different colname rules in ologit's r(table), the "_cons" is now named "cut1" "cut2" "cut3"... (see code below for detailed information), the _rm_rhsnames cannot change occurrences of "_cons" to " ". I think I have found a solution, i.e. to replace all the "cut1" "cut2" "cut3"... to " ". However, the problem is when I manipulate subinstr local, how can I change all occurrences of "cut1" "cut2" "cut3"... using a wildcard? As I show in below, the using of wildcard of * failed. Thank you very much.
Code:
local RHSnmsALL : subinstr local RHSnmsALL "cut*" " ", all
Code:
. version 13: quietly ologit class age income, nofvlabel
. matrix list r(table)
r(table)[9,5]
class: class: cut1: cut2: cut3:
age income _cons _cons _cons
b .01762786 .0135035 -1.1222525 1.7869218 5.6260597
se .00158518 .00048171 .0891443 .08476514 .13338274
z 11.12045 28.032162 .b .b .b
pvalue 9.977e-29 6.59e-173 .b .b .b
ll .01452098 .01255936 -1.2969721 1.6207852 5.3646343
ul .02073475 .01444765 -.94753284 1.9530585 5.8874851
df . . . . .
crit 1.959964 1.959964 1.959964 1.959964 1.959964
eform 0 0 0 0 0
. version 15: quietly ologit class age income, nofvlabel
. matrix list r(table)
r(table)[9,5]
class: class: /: /: /:
age income cut1 cut2 cut3
b .01762786 .0135035 -1.1222525 1.7869218 5.6260597
se .00158518 .00048171 .0891443 .08476514 .13338274
z 11.12045 28.032162 .b .b .b
pvalue 9.977e-29 6.59e-173 .b .b .b
ll .01452098 .01255936 -1.2969721 1.6207852 5.3646343
ul .02073475 .01444765 -.94753284 1.9530585 5.8874851
df . . . . .
crit 1.959964 1.959964 1.959964 1.959964 1.959964
eform 0 0 0 0 0

Comment