楼主: hfl109
4206 7

求助:SAS8.1中PLS回归的源程序例子哪儿有? [推广有奖]

  • 0关注
  • 0粉丝

大专生

81%

还不是VIP/贵宾

-

威望
0
论坛币
2839 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
410 点
帖子
53
精华
0
在线时间
54 小时
注册时间
2007-9-19
最后登录
2021-3-24

楼主
hfl109 发表于 2007-11-4 22:07:00 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
请教各位专家:
SAS8.1的help中pls回归的例子没有输出回归方程的标准回归系数和还原为原始变量的回归系数,以及方程是否显著?决定系数是多少?请问那位专家知道,能不能给个例子?感激不尽!!!
二维码

扫码加我 拉你入群

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

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

关键词:PLS 源程序 标准回归系数 回归系数 Help 程序 例子 PLS

回帖推荐

sushe1527 发表于7楼  查看完整内容

/*,hi,buddy,i wish it may works. The SAMPLE LIBRARY  of SAS,good luck!!*/  /****************************************************************/  /*          S A S   S A M P L E   L I B R A R Y                 */  /*   &nbs ...

losttemple 发表于5楼  查看完整内容

proc pls data =data1 details ;model y1 y2 y3=x1 x2 x3/solution ;output out = outpls yscore = u xscore = t predicted = pr1 - pr3 ;run ;MODEL语句中斜线后的选项SOLUTION 要求给出p个因变量的回归模型的回归系数。 OUTPUT语句生成一个名为OUTPLS的输出数据集,除原始数据外,其中还包括成分的得分向量及偏最小二乘回归式对p个因变量的预测结果。

本帖被以下文库推荐

沙发
kuhasu 发表于 2007-11-17 14:57:00
[em01][em01][em01][em01]

藤椅
hfl109 发表于 2007-11-17 17:03:00

这里卧虎藏龙

这里高手如林

难道没有人知道?

板凳
zhangxd-2000 发表于 2007-11-17 18:07:00
在proc pls 后面加details 试试

报纸
losttemple 发表于 2007-11-17 21:27:00

proc pls data =data1 details ;
model y1 y2 y3=x1 x2 x3/solution ;
output out = outpls yscore = u xscore = t predicted = pr1 - pr3 ;
run ;

MODEL语句中斜线后的选项SOLUTION 要求给出p个因变量的回归模型的回归系数。 
OUTPUT语句生成一个名为OUTPLS的输出数据集,除原始数据外,其中还包括成分的得分向量及偏最小二乘回归式对p个因变量的预测结果。

已有 1 人评分经验 论坛币 收起 理由
bakoll + 3 + 10 精彩帖子

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

地板
hfl109 发表于 2007-11-18 12:06:00

多谢!

    可以得到标准回归系数和回归系数,但是回归方程的决定系数和显著性检验,以及回归系数的显著性检验没有,要怎么编程才可以解决呀?

    高惠璇老师的应用多元统计分析的第十一章例子正好没有,谁那儿有?赠给一份吧?或者那位高手懂,指导指导吧?

非常感谢!!!

[此贴子已经被作者于2007-11-18 12:06:09编辑过]

7
sushe1527 发表于 2007-11-19 21:01:00

/*,hi,buddy,i wish it may works. The SAMPLE LIBRARY  of SAS,good luck!!*/

  /****************************************************************/
  /*          S A S   S A M P L E   L I B R A R Y                 */
  /*                                                              */
  /*    NAME: PLSEG1                                              */
  /*   TITLE: Partial Least Squares Analysis                      */
  /* PRODUCT: STAT                                                */
  /*  SYSTEM: ALL                                                 */
  /*    KEYS: PLS, regression analysis, chemometrics              */
  /*   PROCS: PLS                                                 */
  /*    DATA:                                                     */
  /*                                                              */
  /*     REF:                                                     */
  /*    MISC:                                                     */
  /*                                                              */
  /****************************************************************/
   /*
 /  A certain chemical process involves five different reactions.  For
 /  20 different runs of the process, reaction time, temperature, and
 /  pressure as well as chemical yield are observed for each substi-
 /  tuent reaction.  The following data step reads in the data.
 /---------------------------------------------------------------------*/
 data process;
    input time1-time5 temp1-temp5 pres1-pres5 yield1-yield5;
    cards;
  6.4 3.6 4.0 6.2 4.4
    7  11  48  19   7
  .19 .48 .17 .09 .15      37.9  99.6  88.9  54.3  73.4
  7.9 7.1 7.7 9.9 5.5
   22  33  60  54  34
  .46 .74 .51 .26 .43      62.9 159.8 130.5  88.3 106.3
  3.2 1.1 1.6 2.5 2.1
    5  12  25   0   6
  .04 .21 .05 .00 .03      17.4  44.6  36.6  21.5  34.2
  4.3 2.6 2.2 4.3 3.0
    0   0  31  20   0
  .12 .32 .06 .11 .08      25.9  67.0  57.8  38.4  54.0
  5.5 7.4 8.7 9.3 3.7
   39  62  43  62  63
  .55 .66 .73 .30 .58      62.6 146.5 117.1  83.3  84.4
  2.1 2.8 2.2 3.3 1.6
    5   9  15  32  12
  .17 .23 .15 .18 .15      18.7  50.8  36.3  25.7  36.5
  6.2 6.8 8.7 9.2 4.1
   39  65  49  49  61
  .51 .67 .71 .22 .54      59.2 150.7 116.2  84.4  88.2
  4.2 2.5 2.9 4.2 2.8
    8  14  32  15  11
  .14 .33 .15 .07 .12      26.6  67.9  60.5  40.6  51.3
  7.4 5.8 6.9 8.7 5.0
   23  36  57  36  32
  .37 .65 .45 .16 .36      55.1 143.3 114.1  80.5  97.9
  5.8 4.4 5.5 6.8 3.9
   20  34  45  26  29
  .28 .51 .36 .11 .28      41.2 110.1  88.0  56.9  74.3
  7.1 7.3 8.7 9.9 4.8
   34  54  55  55  52
  .52 .73 .66 .26 .52      60.7 161.2 127.1  90.4 100.2
  7.7 5.7 8.0 9.0 5.0
   33  57  61  28  47
  .40 .68 .57 .10 .42      61.7 147.7 120.0  82.9  96.7
  4.4 4.3 4.5 5.9 3.1
   14  22  33  36  23
  .28 .43 .30 .19 .26      38.4  96.5  73.6  50.2  63.7
  1.1 2.8 1.6 2.8 1.0
    3   3   7  40  10
  .18 .18 .12 .23 .14      16.8  38.9  34.8  21.2  23.7
  7.6 6.6 7.1 9.5 5.3
   20  30  58  48  30
  .42 .70 .46 .23 .39      59.3 152.1 123.6  82.9 103.0
  0.0 0.0 0.0 0.0 0.0
    3   9   0   4   8
  .00 .00 .00 .03 .00       0.0   0.0   0.0   0.0   0.0
  2.9 1.7 2.1 2.9 2.0
    7  14  22  10  11
  .10 .23 .11 .05 .08      21.9  48.0  37.5  24.9  37.7
  4.1 2.5 3.6 4.2 2.6
   15  29  32  10  22
  .16 .33 .23 .04 .16      23.3  68.6  57.7  39.1  48.4
  2.4 3.0 3.0 3.8 1.7
   12  20  18  31  22
  .21 .27 .23 .16 .20      24.8  58.2  47.9  30.5  36.3
  3.8 1.9 3.0 3.6 2.4
   13  26  30   4  19
  .11 .29 .18 .01 .12      23.6  62.8  50.1  33.2  47.6
 ;

  /*
 /  You can use the method of partial least squares to model the
 /  yields as a function of all the reaction variables.  The following
 /  statements print a table which summarizes how much variation each
 /  PLS component accounts for.
 /---------------------------------------------------------------------*/
 proc pls data=process;
    model yield1-yield5 = time1-time5 temp1-temp5 pres1-pres5;
    run;

  /*
 /  Notice that the percentage of variation in Y accounted for by the
 /  PLS analysis doesn't change very much after the first few compo-
 /  nents.  You can use the CV=ONE option to select number of compo-
 /  nents by cross-validation.
 /---------------------------------------------------------------------*/
 proc pls data=process cv=one;
    model yield1-yield5 = time1-time5 temp1-temp5 pres1-pres5;
    run;

  /*
 /  While three PLS components give the absolute minimum predicted
 /  residual sum of squares of 0.76 for the cross-validation, this
 /  isn't very different from the PRESS of 0.82 for only two PLS
 /  components.  You can use the CVTEST option to test for the
 /  significance of this difference.
 /---------------------------------------------------------------------*/
 proc pls data=process cv=one cvtest;
    model yield1-yield5 = time1-time5 temp1-temp5 pres1-pres5;
    run;

  /*
 /  The result is that three PLS components don't explain signifi-
 /  cantly more variation than just two.*/

已有 1 人评分论坛币 收起 理由
bakoll + 10 精彩帖子

总评分: 论坛币 + 10   查看全部评分

8
summercon 发表于 2009-8-25 05:51:18
THANKS FOR sushe1527 'S EXAPLE

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

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2026-1-19 20:09