全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
1057 2
2009-10-25
请教:
根据某个定性变量,将总样本一分为二,应用同一个模型进行回归,得到两个回归方程,
,如何检验这两个方程的相同变量的回归系数的差异?
二维码

扫码加我 拉你入群

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

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

全部回复
2009-10-26 10:28:33
I should use the estimate statements to estimate paired coefficients and judge them with t-value.

Here is an example with simulated data. group=1,2 indicates the first and second sample.

data t1;
   do i = 1 to 30;
       group=1;
           x=rannor(12345);
           y=1+1*x+rannor(12345);
           output;
       group=2;
           x=rannor(12345);
           y=1+2*x+2*rannor(12345);
           output;
        end;
run;

proc glm data=t1;
   class group;
   model y= group group* x/solution noint;
   estimate  'group1-group2' group 1 -1;
   estimate  'group1x-group2x' group*x 1 -1;
   run;
   quit;
二维码

扫码加我 拉你入群

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

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

2009-10-31 16:54:21
thanks a lot
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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