全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
2572 1
2007-07-12
哪位高手知道建duration model 的sas 语句啊?谢谢了!
二维码

扫码加我 拉你入群

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

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

全部回复
2015-6-11 09:08:41
Example
Duration Data Model with Unobserved Heterogeneity

All of the previous three models actually have closed-form moment conditions, so the simulation approach is not necessarily required for the estimation. This example illustrates how to use SMM to estimate a model for which there is no closed-form solution for the moments and thus the traditional GMM method does not apply.

title1 'SMM for Duration Model with Unobserved Heterogeneity';

%let nobs=1000;
data durationdata;
   b=0.9; s=0.5;
   do i=1 to &nobs;
      u = rannor( 1011 );
      v = ranuni( 1011 );
      x = 2 * ranuni( 1011 );
      y = -exp(-b * x + s * u) * log(v);
      output;
   end;
run;

proc model data=durationdata;
   parms b .5 s 1;
   instrument x;

   u = rannor( 1011 );
   v = ranuni( 1011 );
   y = -exp(-b * x + s * u) * log(v);

   moment y = (2 3 4);
   fit y / gmm ndraw=10 ;* maxiter=500;
   bound s > 0, b > 0;
run;
二维码

扫码加我 拉你入群

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

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

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群