%let w1=&v1.;
%let w2=&v2.;
%let i=&start.;
%do %while(&i.<=&end.);
proc nlp out=_sheet;
max y;
PARMS b;
bounds 0<=b<=1;
Y1= exp(w1);
y=y1*w2;
run;
data temp1;
set _sheet;
run;
%if &i. = &start. %then %do;/*initialize the date*/
data &out;
set temp1;
run;
%end;
%else %do;
data &out;
set &out temp1; /*append more date to result*/
run;
%end;
%let i=%sysfunc(sum(&i.,&step.));
%end;
%mend nlp;
%nlp (start=0.05,end=20, step=0.5,v1=0.2,v2=0.5,out=result)
但日志报错:请各位给看看,为啥?搞不懂
ERROR: The variable w1 was referenced but not given a value.
ERROR: The variable w2 was referenced but not given a value.
WARNING: Your program statements contain 2 symbols used but not given a value.
NOTE: Initial value of parameter b is set randomly to 0.7902130768.
ERROR: There are references to missing variables when the program code is executed for _OBS_= 1



雷达卡


京公网安备 11010802022788号







