Thank you very much. I managed to solve my problem using your article https://blogs.sas.com/content/iml/2014/02/05/find-the-root-of-a-function.html Here there is my code. Also I have a problem with adding z to a dataset. %macro lambda;
%do i = 1 %to &n_obs.;
data _null_;
set have (where = (a = &i.));
call symput("d_0",d0);
call symput("d_1",db);
call symput("d_2",dt);
run;
proc iml;
start Func(x);
return( &d_0.**x - &d_1.**x - &d_2.**x );
finish;
intervals = {-10 10};
z = froot("Func", intervals);
print z;
quit;
%end;
%mend lambda;
... View more