Presentation is loading. Please wait.

Presentation is loading. Please wait.

第八章 稳健回归. §8.1 异常值 我们给出如下的 SAS 模拟计算的程序: data a1; do i=1 to 10 ; set p183; r=rannor(1234567) ; if i=6 then y=-2-x+12+r; else y=-2-x+r; output; end; run;

Similar presentations


Presentation on theme: "第八章 稳健回归. §8.1 异常值 我们给出如下的 SAS 模拟计算的程序: data a1; do i=1 to 10 ; set p183; r=rannor(1234567) ; if i=6 then y=-2-x+12+r; else y=-2-x+r; output; end; run;"— Presentation transcript:

1 第八章 稳健回归

2 §8.1 异常值

3 我们给出如下的 SAS 模拟计算的程序: data a1; do i=1 to 10 ; set p183; r=rannor(1234567) ; if i=6 then y=-2-x+12+r; else y=-2-x+r; output; end; run;

4 proc reg data=a1 ; model y=x; output out=b1 p=y1hat; run; data a2; set a1; if x>5 then delete; run; proc reg data=a2; model y=x; output out=b2 p=y2hat; run;

5 proc sort data=b1; by x; run; proc sort data=b2; by x; run; data b; merge b1 b2; run; proc gplot data=b; symbol1 v=star c=green I= none; symbol2 v=plus c=red i=l; symbol3 v=plus c=blue i=l; plot y*x haty1*x haty2*x/overlay; run;

6

7 §7.2 M 估计

8

9

10

11

12

13

14

15

16

17

18

19 §7.2 R 估计

20

21

22

23

24


Download ppt "第八章 稳健回归. §8.1 异常值 我们给出如下的 SAS 模拟计算的程序: data a1; do i=1 to 10 ; set p183; r=rannor(1234567) ; if i=6 then y=-2-x+12+r; else y=-2-x+r; output; end; run;"

Similar presentations


Ads by Google