sas做广义估计方程

赵目等在“纵向数据下广义估计方程估计”一文从数学角度对广义估计方程进行了探讨,这里转载个sas做广义估计方程的例子:

data thall;
   input id y visit trt bline age;
      intercpt=1;
   cards;
104 5 1 0 11 31
104 3 2 0 11 31
104 3 3 0 11 31
104 3 4 0 11 31
106 3 1 0 11 30
106 5 2 0 11 30
106 3 3 0 11 30
106 3 4 0 11 30
107 2 1 0 6 25
107 4 2 0 6 25
107 0 3 0 6 25
107 5 4 0 6 25
114 4 1 0 8 36
114 4 2 0 8 36
;run;
data new;
   set thall;
   output;
   if visit=1 then do; 
      y=bline; visit=0; output;
   end;
run;
data new2;
   set new;
   if id ne 107;
   if visit=0 then do; x1=0; ltime=log(8); end;
   else do; x1=1; ltime=log(2); end;
      x1trt=x1*trt;
run;

proc genmod data=new2;
   model y=x1 | trt / d=poisson offset=ltime itprint;
   class id;
   repeated subject=id / corrw type=exch;
run;
quit;


 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值