楼主: mingfeng07
1269 0

[问答] 有关似然函数的求解问题 [推广有奖]

副教授

65%

还不是VIP/贵宾

-

威望
0
论坛币
1147 个
通用积分
2.0601
学术水平
113 点
热心指数
105 点
信用等级
83 点
经验
30381 点
帖子
643
精华
0
在线时间
1147 小时
注册时间
2012-11-20
最后登录
2023-5-23

初级热心勋章

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
我在采用NLP过程进行似然函数求解时,出现以下问题:
NOTE: Your code contains 7 program statements.
NOTE: Gradient is computed using analytic formulas.
NOTE: Hessian is computed using analytic formulas.
ERROR: Execution Errors for _OBS_= 2 :
ERROR: There are references to missing variables when the program code is executed for _OBS_= 2
WARNING: Your program statements cannot be executed completely.
WARNING: In a total of 1 calls an error occurred during execution of the program statements. NLP attempted to recover by using
         a shorter step size.

我的编程如下所示:
  1. proc nlp data=a4 vardef=n covariance=h pcov phes outest=b covariance=h pall tech=newrap;
  2.        profile beta delta;
  3.        max loglik;
  4.        parms beta=-1,delta=1;
  5.        bounds delta>0;
  6. /*中间是似然函数的表示,,太多了就省略了*/;
  7. loglik=c1*y1+c2*y2+c3*y3+c4*y4+c5*y5+c6*y6;
  8. run;
复制代码
而我在用蒙特卡洛模拟做的时候,编程如下:
  1. proc mcmc data=a4 nmc=5000 outpost=a5 statistics=(summary) diagnostics=none thin=5 seed=246810;
  2. parms beta 1 delta 1;
  3. prior beta~normal(0,var=1);
  4. prior delta~gamma(1.4,scale=3.5);
  5. /*中间是同样的似然函数表示,太多省略*/;
  6. model general(y);
  7. run;
复制代码
用MCMC过程能够得到结果,但是为何NLP就得不到结果了呢?

二维码

扫码加我 拉你入群

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

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

关键词:似然函数 diagnostics Statements covariance COMPLETELY references statements execution occurred cannot

欢迎扫一扫我头像关注, 不定期分享SAS技术知识。
您需要登录后才可以回帖 登录 | 我要注册

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

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

GMT+8, 2024-4-23 15:34