To implement an ML estimation, I used the moptimize command.
Specifically, the code looks like below:
I am now building a Stata command that utilizes the MLE results.
But, I am not sure what type is appropriate for the object "M" above.
For example, in my Mata command, I have to extract a subset of the estimation results as below:
When I try to use this command, Mata says that I have to declare the type of M.
But, I cannot find a guide for the object M.
So, what is the object type of M that comes from moptimize_init()?
Specifically, the code looks like below:
Code:
:function llk (transmorphic M, real rowvector b, real colvector lnf) { . . . } :M = moptimize_init() :moptimize_init_evaluator(M, &llk()) . . . :moptimize(M)
But, I am not sure what type is appropriate for the object "M" above.
For example, in my Mata command, I have to extract a subset of the estimation results as below:
Code:
: beta = moptimize_result_coefs(M)[1 .. 3]
But, I cannot find a guide for the object M.
So, what is the object type of M that comes from moptimize_init()?
Comment