I am writing an ado file and I use structures like:
program define XX, eclass
myfunction()
ereturn matrix V = `V'
end
mata:
myfunction(
calculate V
st_matrix(`V', v)
)
end
I use trace and it tells me that ereturn matrix V = __000003 invalid syntax
I use -ereturn post `V' before, but it gives back matrix __000003 not found. (but matrix V existed if I use matrix list V instead)
I think I already changed the calculated V into matrix in st_matrix. Do I need mat `V' = e (V) somewhere?
Thanks!
Related Posts with Write ado command with function defined on Mata
Creating dummy based on variable value in subset yearHi all, If I have data of 100 firms for 10 years with three variables; and I want to make a dummy v…
General regression helpHi, I am having some problems with the basics of regressions. I have panel data, similar to what is…
-xtreg- Ensuring correct model specificationHello! My goal is to study the effect of new feature introduction by online platform on the ratings…
Help generating region variableDear all, I am using Stata 16, on mac. I want to create a region variable based on my dummy variabl…
export the result of logistic in excelHi, I have 30 predictors and I would like to fit uni-variate logistic regression for each predictor…
Subscribe to:
Post Comments (Atom)
0 Response to Write ado command with function defined on Mata
Post a Comment