楼主: lya046
1205 0

求助:这个函数出了什么错误呢? [推广有奖]

  • 0关注
  • 0粉丝

高中生

77%

还不是VIP/贵宾

-

威望
0
论坛币
47 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
238 点
帖子
26
精华
0
在线时间
8 小时
注册时间
2009-2-20
最后登录
2010-1-3

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
I在运行程序时遇到以下问题,我觉得应该是函数的收敛上有问题,但我确实不知道具体哪里出了错误。大家有遇到过这种类似的情况吗?应该怎样解决呢?谢谢大家!
NOTE: The function f(x) seems to be increasing without limit in direction x + alfa s. You can use the BOUNDS statement to restrict the feasible region.
NOTE: FCONV convergence criterion satisfied.
NOTE: At least one element of the (projected) gradient is greater than 1e-3.
Do you know why and how to debug the program?

The whole log file showed as below:
554  proc iml;
NOTE: IML Ready
555  use dataset3;
556  read all into data;
557  show names;
558  print data;
559  start maxFunc(W) global(data) ;
560  sum=0;
561  Vh=J(1,2,0);
562  do i=1 to 100;
563  Vh[1]=W[1]*data[i,1]+W[2]*data[i,3]+W[3]*data[i,5];
564  Vh[2]=W[1]*data[i,2]+W[2]*data[i,4]+W[3]*data[i,6];
565  /*prob1no=1-prob1tvb-prob1atv;
566  prob2no=1-prob2tvb-prob2atv;
567  prob3no=1-prob31tvb-prob3atv;*/
568  sum=sum+(log(1-data[i,10]*data[i,11]*data[i,12])-Vh[1]-Vh[2])*(data[i,7]+data[i,8])
569  +Vh[1]*data[i,7]+Vh[2]*data[i,8]+(log(data[i,10])+log(data[i,11])+log(data[i,12]))*data[i,9];
570  end;
571  return(sum);
572  finish maxFunc;
NOTE: Module MAXFUNC defined.
573
574  optn={1 2};
575  X=J(1,3,1);
576  call nlpcg(rc,xres,"maxFunc",X,optn);
NOTE: The function f(x) seems to be increasing without limit in direction x + alfa s. You can use the BOUNDS
      statement to restrict the feasible region.
NOTE: The function f(x) seems to be increasing without limit in direction x + alfa s. You can use the BOUNDS
      statement to restrict the feasible region.
NOTE: The function f(x) seems to be increasing without limit in direction x + alfa s. You can use the BOUNDS
      statement to restrict the feasible region.
NOTE: The function f(x) seems to be increasing without limit in direction x + alfa s. You can use the BOUNDS
      statement to restrict the feasible region.
NOTE: The function f(x) seems to be increasing without limit in direction x + alfa s. You can use the BOUNDS
      statement to restrict the feasible region.
NOTE: The function f(x) seems to be increasing without limit in direction x + alfa s. You can use the BOUNDS
      statement to restrict the feasible region.
NOTE: The function f(x) seems to be increasing without limit in direction x + alfa s. You can use the BOUNDS
      statement to restrict the feasible region.
NOTE: The function f(x) seems to be increasing without limit in direction x + alfa s. You can use the BOUNDS
      statement to restrict the feasible region.
NOTE: The function f(x) seems to be increasing without limit in direction x + alfa s. You can use the BOUNDS
      statement to restrict the feasible region.
NOTE: The function f(x) seems to be increasing without limit in direction x + alfa s. You can use the BOUNDS
      statement to restrict the feasible region.
NOTE: The function f(x) seems to be increasing without limit in direction x + alfa s. You can use the BOUNDS
      statement to restrict the feasible region.
NOTE: The function f(x) seems to be increasing without limit in direction x + alfa s. You can use the BOUNDS
      statement to restrict the feasible region.
NOTE: The function f(x) seems to be increasing without limit in direction x + alfa s. You can use the BOUNDS
      statement to restrict the feasible region.
NOTE: FCONV convergence criterion satisfied.
NOTE: At least one element of the (projected) gradient is greater than 1e-3.
577
578  run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
579  quit;
NOTE: Exiting IML.
NOTE: 187 workspace compresses.
NOTE: “PROCEDURE IML”所用时间(总处理时间):
      实际时间         1.06 秒
      CPU 时间         1.04 秒
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:Convergence Increasing statement Direction Satisfied 求助

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-5-23 15:20