Hi,
I am struggling to get the column number of a coefficient after estimating a model with multiple equations via gsem. For this, I am using colnumb():
gsem .. omitted
matrix b=e(b)
scalar pos = colnumb(b, "_b["equation_name:covariate_name]")
display pos
where equation_name and covariate_name are the name of a specific equation and covariate of my model.
Unfortunately, nothing is displayed.
From my understanding, written in this way, colnumb() seems not support the equation name. For example, in my model most covariates appear in multiple equations and when I modify the line above with only the covariate name:
scalar pos = colnumb(b, "_b["covariate_name]")
display pos
the position of the first appearance of that covariate in b is displayed.
I need to access the position of each coefficient by equation name and covariate name.
Any help would be greatly appreciated,
Simone
I am struggling to get the column number of a coefficient after estimating a model with multiple equations via gsem. For this, I am using colnumb():
gsem .. omitted
matrix b=e(b)
scalar pos = colnumb(b, "_b["equation_name:covariate_name]")
display pos
where equation_name and covariate_name are the name of a specific equation and covariate of my model.
Unfortunately, nothing is displayed.
From my understanding, written in this way, colnumb() seems not support the equation name. For example, in my model most covariates appear in multiple equations and when I modify the line above with only the covariate name:
scalar pos = colnumb(b, "_b["covariate_name]")
display pos
the position of the first appearance of that covariate in b is displayed.
I need to access the position of each coefficient by equation name and covariate name.
Any help would be greatly appreciated,
Simone
Comment