Hi all,
I am having trouble storing moptimize results (moptimize_result_coefs(M)) from mata, shown below. It returns a 1*2 row vector, I am able to extract each element, but not sure how to store them.
I also need to use the returned coefficients in another program. I'd really appreciate any advice you may have!
mata:
function minsearch(transmorphic M, real rowvector b, real colvector lnf)
{
real colvector p1
real colvector y1
p1 = moptimize_util_xb(M, b, 1)
y1 = moptimize_util_depvar(M, 1)
lnf = ln(normalden(y11, 0, 2))
}
M = moptimize_init()
moptimize_init_evaluator(M, &minsearch())
moptimize_init_depvar(M, 1, "y")
moptimize_init_eq_indepvars(M, 1, "x")
moptimize(M)
moptimize_result_coefs(M)
end
I am having trouble storing moptimize results (moptimize_result_coefs(M)) from mata, shown below. It returns a 1*2 row vector, I am able to extract each element, but not sure how to store them.
I also need to use the returned coefficients in another program. I'd really appreciate any advice you may have!
mata:
function minsearch(transmorphic M, real rowvector b, real colvector lnf)
{
real colvector p1
real colvector y1
p1 = moptimize_util_xb(M, b, 1)
y1 = moptimize_util_depvar(M, 1)
lnf = ln(normalden(y11, 0, 2))
}
M = moptimize_init()
moptimize_init_evaluator(M, &minsearch())
moptimize_init_depvar(M, 1, "y")
moptimize_init_eq_indepvars(M, 1, "x")
moptimize(M)
moptimize_result_coefs(M)
end
Comment