楼主: twinklerise
2654 13

[原创博文] 非常急迫,请教一个回归的问题! [推广有奖]

  • 0关注
  • 1粉丝

已卖:1059份资源

博士生

4%

还不是VIP/贵宾

-

威望
0
论坛币
117744 个
通用积分
7.3840
学术水平
1 点
热心指数
2 点
信用等级
0 点
经验
3047 点
帖子
132
精华
1
在线时间
157 小时
注册时间
2005-8-19
最后登录
2024-12-5

楼主
twinklerise 在职认证  发表于 2010-4-27 15:44:29 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
各位朋友,如果用sas做回归
model y1 y2 = x1 x2;

即做回归方程
y1=a1+b11*x1+b12*x2
y2=a2+b21*x1+b22*x2

现在我想做限制:a1+a2=0, b11+b21=1, 应该怎么处理

我只知道要限制b11+b12=1可以使用restrict

非常急,请大家帮忙,谢谢了
二维码

扫码加我 拉你入群

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

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

关键词:非常急 model Rest 回归方程 mode 朋友

回帖推荐

bobguy 发表于9楼  查看完整内容

I believe that you have to get it done in proc model. Here is an example with simulation data. Hope this helps. data t1; do i = 1 to 50; x1=rannor(789);x2=rannor(789); e1=rannor(789);e2=rannor(789); y1=1+1*x1+0.2*x2+e1; y2=-1+0.3*x1+1*x2+e2; output; end; run; proc model data=t1; y1=c1+ a1*x1 +b1*x2; y2=c2+ a2*x1 +b2*x2; restrict ...

本帖被以下文库推荐

沙发
twinklerise 在职认证  发表于 2010-4-27 18:14:56
重金求解,有人能帮忙的话,我赠送10000论坛币:)

藤椅
pccbanboo11 在职认证  发表于 2010-4-27 18:20:38
http://www.colostate.edu/Service ... s/chap19/sect43.htm
你那个看上去是联立方程吧,我SAS学艺不精,仅供参考

板凳
pccbanboo11 在职认证  发表于 2010-4-27 18:29:28
用 intercept 尝试一下 ,下班了 明天帮你请教高手
http://www.docin.com/p-146503.html

报纸
pccbanboo11 在职认证  发表于 2010-4-27 18:30:05
http://www.docin.com/p-146503.html
用 intercept 尝试一下 ,下班了 明天研究

地板
twinklerise 在职认证  发表于 2010-4-27 23:26:33
5# pccbanboo11

谢谢,期待你的帮助:)

7
zhenglaiyi 发表于 2010-4-28 09:28:03
哪里搞到这么多论坛币

8
sushe1527 发表于 2010-4-28 09:51:07
zhenglaiyi 发表于 2010-4-28 09:28
哪里搞到这么多论坛币
可以用rmb买的,或者是版主什么级别的 可以一下就获得,游戏里面这个叫开挂了

9
bobguy 发表于 2010-4-28 10:07:34
twinklerise 发表于 2010-4-27 15:44
各位朋友,如果用sas做回归
model y1 y2 = x1 x2;

即做回归方程
y1=a1+b11*x1+b12*x2
y2=a2+b21*x1+b22*x2

现在我想做限制:a1+a2=0, b11+b21=1, 应该怎么处理

我只知道要限制b11+b12=1可以使用restrict

非常急,请大家帮忙,谢谢了
I believe that you have to get it done in proc model. Here is an example with simulation data. Hope this helps.

data t1;
   do i = 1 to 50;
      x1=rannor(789);x2=rannor(789);
      e1=rannor(789);e2=rannor(789);
      y1=1+1*x1+0.2*x2+e1;
      y2=-1+0.3*x1+1*x2+e2;
      output;
  end;
  run;

  proc model data=t1;
  
  y1=c1+ a1*x1 +b1*x2;
  y2=c2+ a2*x1 +b2*x2;
  restrict b1+b2=1;
  restrict a1+a2=0;
  
  fit y1 y2;
  run;
  quit;
********************************************
                                           The SAS System          20:30 Tuesday, April 27, 2010  12

                                        The MODEL Procedure

                             Nonlinear OLS Summary of Residual Errors

                        DF       DF                                                        Adj
     Equation        Model    Error         SSE         MSE    Root MSE    R-Square       R-Sq

     y1                  2       48     59.7186      1.2441      1.1154      0.2178     0.2015
     y2                  2       48     76.1907      1.5873      1.2599      0.3865     0.3737


                                 Nonlinear OLS Parameter Estimates

                                      Approx                  Approx
        Parameter       Estimate     Std Err    t Value     Pr > |t|    Label

        c1              0.916766      0.1597       5.74       <.0001
        a1               0.29072      0.1272       2.29       0.0267
        b1               0.04525      0.1167       0.39       0.6998
        c2              -1.13091      0.1799      -6.29       <.0001
        a2              -0.29072      0.1272      -2.29       0.0267
        b2               0.95475      0.1167       8.18       <.0001
        Restrict1       -15.6386      3.9341      -3.98       <.0001    a1+a2=0
        Restrict0       -2.31167      4.2889      -0.54       0.5952    b1+b2=1


                         Number of Observations     Statistics for System

                         Used                50    Objective         2.7182
                         Missing              0    Objective*N     135.9093
已有 1 人评分经验 论坛币 收起 理由
bakoll + 3 + 3 精彩帖子

总评分: 经验 + 3  论坛币 + 3   查看全部评分

10
pccbanboo11 在职认证  发表于 2010-4-28 10:08:40
能把数据分想一下不

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

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-29 16:54