24小时热门版块排行榜    

北京石油化工学院2026年研究生招生接收调剂公告
查看: 714  |  回复: 10
当前主题已经存档。
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

cheshg

铜虫 (正式写手)

[交流] 【求助】SAS问题

想计算相关系数,有两个变量一个变量是数据形式的,一个 不是,这样应该怎么求相关系数 ???请教  

[ Last edited by cheshg on 2009-6-20 at 00:05 ]
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

snoopyzhao

至尊木虫 (职业作家)

★ ★ ★ ★
小木虫(金币+0.5):给个红包,谢谢回帖交流
mingdong(金币+3,VIP+0):谢谢您的交流! 6-25 15:59
给你 SAS 回归的结果:
CODE:
                                          The SAS System          20:33 Tuesday, June 20, 2009  21

                                        The REG Procedure
                                          Model: MODEL1
                                     Dependent Variable: SOC

                                       Analysis of Variance

                                              Sum of           Mean
          Source                   DF        Squares         Square    F Value    Pr > F

          Model                     1       12.20083       12.20083      20.30    0.0011
          Error                    10        6.01127        0.60113
          Corrected Total          11       18.21210


                       Root MSE              0.77532    R-Square     0.6699
                       Dependent Mean        8.90500    Adj R-Sq     0.6369
                       Coeff Var             8.70661


                                       Parameter Estimates

                                    Parameter       Standard
               Variable     DF       Estimate          Error    t Value    Pr > |t|

               Intercept     1        9.91333        0.31652      31.32      <.0001
               landform1     1       -2.01667        0.44763      -4.51      0.0011

                                          The SAS System          20:33 Tuesday, June 20, 2009  22

                                        The REG Procedure
                                          Model: MODEL1
                                     Dependent Variable: SOC

                                       Analysis of Variance

                                              Sum of           Mean
          Source                   DF        Squares         Square    F Value    Pr > F

          Model                     1        0.00120        0.00120       0.00    0.9800
          Error                    10       18.21090        1.82109
          Corrected Total          11       18.21210


                       Root MSE              1.34948    R-Square     0.0001
                       Dependent Mean        8.90500    Adj R-Sq    -0.0999
                       Coeff Var            15.15416


                                       Parameter Estimates

                                    Parameter       Standard
               Variable     DF       Estimate          Error    t Value    Pr > |t|

               Intercept     1        8.89500        0.55092      16.15      <.0001
               landuse1      1        0.02000        0.77912       0.03      0.9800

相关的源程序如下:
CODE:
data ex;
input landform $        landuse $        SOC;
if landform eq 'tablelan' then landform1 = 1; else landform1 = 0;
if landform eq 'slopelan' then landform2 = 1; else landform2 = 0;
if landuse eq 'grasslan' then landuse1 = 1; else landuse1 = 0;
if landuse eq 'orchard' then landuse2 = 1; else landuse2 = 0;
datalines;
tableland        grassland        8.28
tableland        grassland        9.10
tableland        grassland        8.25
tableland        orchard        7.21
tableland        orchard        7.27
tableland        orchard        7.27
slopeland        orchard        10.20
slopeland        orchard        11.21
slopeland        orchard        10.21
slopeland  grassland      9.23
slopeland  grassland      9.31
slopeland  grassland    9.32
;
proc reg data = ex;
model SOC = landform1;
/* model SOC = landform2; */
run;
proc reg data = ex;
model SOC = landuse1;
/* model SOC = landuse2; */
run;
quit;

[ Last edited by snoopyzhao on 2009-6-20 at 21:34 ]
9楼2009-06-20 21:32:52
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 11 个回答

snoopyzhao

至尊木虫 (职业作家)

给出部分数据看看……
2楼2009-05-17 22:17:05
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

cheshg

铜虫 (正式写手)

★ ★
mingdong(金币+2,VIP+0):谢谢您的交流! 6-25 15:59
SAS ---相关系数

相求一组是数字形式的变量,量一组不是数字形式的标量的相关系数?怎么求 请高手知道

例如:
变量X          变量Y
  A              1.1   1.2
  B              1.3   1.2
   C               1.4  1.5

每个变量X对照两个以上的变量Y

这样怎么求相关性,或者决定系数 就是X决定Y是多少 ?
3楼2009-06-14 21:37:53
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

snoopyzhao

至尊木虫 (职业作家)

★ ★
小木虫(金币+0.5):给个红包,谢谢回帖交流
mingdong(金币+1,VIP+0):谢谢! 6-15 14:47
这个似乎没有办法吧。以某个 y 对 x 可以获得线性模型的回归系数(决定系数)。但你的数据集给出的结果都会是 1,呵呵……
4楼2009-06-14 22:17:44
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
普通表情 高级回复 (可上传附件)
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 11408 359分 求调剂 +4 yfever 2026-03-28 4/200 2026-04-03 16:43 by asdfzly
[考研] 材料调剂 +4 一样YWY 2026-04-03 4/200 2026-04-03 09:48 by 蓝云思雨
[考研] 一志愿厦门大学材料工程专硕354找调剂!!! +8 贝呗钡钡 2026-03-30 8/400 2026-04-03 09:41 by hypershenger
[考研] 330分求调剂 +15 qzenlc 2026-03-29 15/750 2026-04-02 21:41 by 百灵童888
[考研] 296求调剂 +4 sdhu 2026-04-02 4/200 2026-04-02 21:29 by baoball
[考研] 081200-11408-276学硕求调剂 +3 崔wj 2026-04-02 3/150 2026-04-02 15:06 by cal0306
[考研] 初试301,代码085701环境工程,本硕一致,四六级已过,有二区一作,共发表5篇论文 +6 axibli 2026-04-01 6/300 2026-04-02 13:42 by Ecowxq666!
[考研] 材料专业求调剂 +10 月月鸟木 2026-04-01 10/500 2026-04-02 12:57 by wxiongid
[考研] 能源动力 调剂 +3 不破不立0 2026-04-02 3/150 2026-04-02 12:46 by ffffjjjj
[考研] 材料求调剂 一志愿哈工大总分298分,前三科223分 +12 dongfang59 2026-03-27 12/600 2026-04-02 12:26 by ms629
[考研] 材料工程322分 +8 哈哈哈吼吼吼哈 2026-04-01 8/400 2026-04-02 11:53 by 3041
[考研] 284求调剂 +12 小熊~~ 2026-03-31 12/600 2026-04-01 20:23 by 花??
[考研] 309求调剂 +19 谁不是少年 2026-03-29 19/950 2026-04-01 15:47 by jp9609
[考研] 材料调剂 +11 一样YWY 2026-03-31 11/550 2026-04-01 11:35 by wangjy2002
[考研] 301求调剂 +8 axibli 2026-04-01 8/400 2026-04-01 09:51 by 我的船我的海
[考研] 070300化学专业279调剂 +10 哈哈哈^_^ 2026-03-31 10/500 2026-03-31 23:13 by liu823948201
[考研] 375求调剂 +7 雨夏整夜 2026-03-29 7/350 2026-03-31 18:52 by xhai2011
[考研] 08工科求调剂286 +5 tgs_001 2026-03-28 5/250 2026-03-31 08:18 by 一只好果子?
[考研] 083000环境科学与工程调剂,总分281 +4 橙子(胜意) 2026-03-30 4/200 2026-03-31 00:44 by Linzejun
[考研] 327求调剂 +5 小卡不卡. 2026-03-29 5/250 2026-03-30 19:30 by Wang200018
信息提示
请填处理意见