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
Heckman selection model with Blinder-Oaxaca DecompositionI am trying to decompose the log wage gap between the non-disabled (DISTYPE = 1) and work-limited di…
Renaming year variableHi All. Sorry for such a silly question, because I have read the help section in stata on this and I…
meta analysis o subgroupsHi all, I am doing meta-analysis on prevalence of depression using metan cmd in Stata 14. I want to…
Bootstrap Error: Command "_check_dots" unrecoginzedHi All, I'm working on a project and I want to use bootstrapped standard errors. I'm using the oaxa…
T-tests and dummy variablesHi! I'm pretty new to Stata and statistical analyses in general, so sorry in advance if something I…
Subscribe to:
Post Comments (Atom)
0 Response to Write ado command with function defined on Mata
Post a Comment