I am trying to solve a simultaneous equation problem. Here is my code:
Stata returns error:
And proceeds to display wrong results:
What I am doing wrong?
Help would be much appreciated.
Code:
mata mata clear void function myfun(real colvector y, real colvector x) { x[1] = (1/(4*(y[2]))) y[2] = x[1] } S = solvenl_init() solvenl_init_evaluator(S, &myfun()) solvenl_init_type(S, "fixedpoint") solvenl_init_technique(S, "gaussseidel") solvenl_init_numeq(S, 2) solvenl_init_startingvals(S, J(2, 1, 1)) solvenl_init_iter_log(S, "on") solvenl_solve(S) solvenl_result_values(S) end
HTML Code:
missing values encountered when evaluating function r(416);
HTML Code:
1 and 0.25
Help would be much appreciated.
Comment