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
Collecting Descriptive Stats (counts percentages) for categorical variables in a Postfile with a LoopHello, My goal is to collect counts and percentage of each level of a categorical variable in a Pos…
Issues with legend when exporting graphs as pdfHi, When I export the following graph to pdf, the legend section is getting distorted. I am using S…
From unbalanced to balanced panel data setDear all, I have an unbalanced panel dataset, which means that not all entities have data for all y…
spmap code gives me no basemap data error despite data having _ID _CX _CY variablesHello, My current dataset for each county has _ID _CX _CY variables except for few counties. My mai…
Obtain the timestamp of a fileI am seeking guidance about how to fetch the timestamp of a file from the file system. Searches with…
Subscribe to:
Post Comments (Atom)
0 Response to Write ado command with function defined on Mata
Post a Comment