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
Regress individual and collective indicatorsHello STATA community! In my research I analyse how economy shapes public opinion (of social classes…
regular expression to extract a part of a string variableDear Statalist Suppose I have a string variable Name that is formatted as Text1 (Text2) (Text3), ho…
Help with lclogitHello Everyone, I have conducted a discrete choice experiment in multiple countries. Each participa…
Rank Variable for Income, then further for regionHi, I am fairly new to this forum so please excuse me if I do not follow some guidelines I am not aw…
Return Calculation for Panel DataDear Statalists, I am trying to calculate monthly returns for specific firms and would like to know …
Subscribe to:
Post Comments (Atom)
0 Response to Write ado command with function defined on Mata
Post a Comment