• 沒有找到結果。

診斷分析

在文檔中 美國真的那麼危險嗎? (頁 10-14)

會比較敏感,看圖 18,Student 有一點異常點 New York,看圖 19,R Student 有兩點異常點,但如之前所說,我們並沒有刪除這些點,我們選擇保留。

第二節 影響點判斷

在此影響點的判斷,圖20,我們用了 5 種方法去判斷,分別有:Cook’s Distance、

COVRATIO、Hat value、DFFITS、DFBETAS,雖然有許多影響點,以第9 筆重 複最多,但影響比較大並不代表不好,所以我們沒有將之剃掉(下列 p 為參數共 Massachusetts、27 Montana、30 New Hampshire、33 New York、35 North Dakota、

38 Oregon、40 Rhode Island、44 Texas、46 Vermont,是影響點,其中以第 9 筆 District of Columbia 為 3.4884 影響最大。

(三) Hat value

表 2,在 hat value 方法中,準則為 Hat Value >2*p/n,即當 Hat Value > 0.4314 是為影響點,所以第 5 California、9 District of Columbia、46 Vermont 比 為影響點,其中以第 9 District of Columbia 筆為 0.9246 影響最大。

(四) DFFITS

表 3,在 DFFITS 中,準則為|DFFITS| >2* ,即當|DFFITS|>0.9288 為影響 點,所以發現第 5 California、9 District of Columbia、10 Florida、33 New York、44 Texas、51 Wyoming 是影響點,其中以第 33 New York 筆為-2.0712 影 響最大。

(五)DFBETAS

表 4,在 DFBETAS 中,準則為|DFBETAS|>2/ ,即當|DFBETAS|>0.2801 時表示 可能有影響點, Intercept 發現第 8 Delaware、9 District of Columbia、21 Louisiana、31 New Jersey、33 New York、39 Oklahoma、44 Texas 為影響點,其 中以第 9District of Columbia 為 0.8190 影響最大;

𝑥

1發現第 9District of Columbia、

33 New York、44 Texas、47 Virginia 為影響點,其中以第 9 District of Columbia 為 0.6691 影響最大;

𝑥

2發現第 5 California、10 Florida、33 New York、44 Texas 為影響點,其中以第 44 Texas 為 1.4412 影響最大;

𝑥

3發現第 9 District of Columbia、10 Florida、46Vermont、48 Washington 為影響點,其中以第 9 District of Columbia 為 1.5768 影響最大;

𝑥

4發現第 8 Delaware、9 District of Columbia、

31 New Jersey、33 New York、39Pennsylvania、44 Texas 為影響點,其中以第 9 District of Columbia 為 2.4982 影響最大;

𝑥

5發現第 8 Delaware、48 Washington 為影響點,其中以第 8 Delaware 為-0.4919 影響最大;

𝑥

6發現第 8 Delaware、9 District of Columbia、20 Kentucky、33 New York、44 Texas、51Wyoming 為影響 點,其中以第 33 New York 為-1.0952 影響最大;

𝑥

7發現第 8 Delaware、9 District of Columbia、10 Florida、20 Kentucky、33 New York、44 Texas、51 Wyoming 為 影響點,其中以第 33 New York 為 1.0436 影響最大;

𝑥

8發現第 8 Delaware、9 District of Columbia、21 Louisiana、31 New Jersey、33 New York、39 Pennsylvania、

44 Texas、47 Virginia、51 Wyoming 為影響點,其中以第 9 District of Columbia 為-1.0704 影響最大;

𝑥

9發現第 5 California、10 Florida、33 New York、46 Vermont、47 Virginia、51 Wyoming 為影響點,其中以第 51 Wyoming 為-0.7571 影響最大;

𝑥

10發現第 8 Delaware、9 District of Columbia、10 Florida、31 New Jersey、33 New York、44 Texas、48 Washington 為影響點,其中以第 33 New York 為-0.6883 影響最大。

(六)影響點的匯總和探討

方法 最大的影響點

Cook’s Distance 第 9 筆 District of Columbia COVRATIO 第 9 筆 District of Columbia Hat value 第 9 筆 District of Columbia DFFITS 第 33 筆 New York

DFBETAS Intercept 第 9 筆 District of Columbia

𝑥1 第 9 筆 District of Columbia

District of Columbia,美國首都,簡稱 DC,犯罪率排名 40,失業率排名 9,人 口數排名 49,人均 GDP 排名 1,人均教育花費排名 1,綜合稅並排 36,人均社

Wyoming,懷俄明州,美國人口最少的州,犯罪率排名 51,失業率並排 45,人 口數排名 51,人均 GDP 排名 4,人均教育花費排名 51,綜合稅並排 43,人均社 會福利排名 47,人均醫療花費排名 43,CPI 排名 48,人均年花費排名 2,警力 比例排名 6。在懷俄明州的數據中,人均社會福利、CPI、人均年花費以及警力 比例這四個變數是和我們的迴歸模型的預期不一樣的,所以這成為了懷俄明州 是影響點的原因。

第三節 殘差檢定

看圖21,使用 Student’s t,Sign,Signed Rank 三種方法檢定,如果 p-value 值大 於α=0.05,不會拒絕虛無假設,而從圖 21 中,p-value 值都不拒絕 ,也就是 E( )=0,符合我們的假設。

(二) 殘差的變異數為

:Var( ) =

:Var( )≠

看圖22,主要使用 Breusch-Pagan 檢定,變異數是否一致,如果 p-value 值大於 α=0.05,不會拒絕虛無假設,而從圖 22 中,p-value 值不拒絕 ,所以殘差的

看圖 23,主要使用 Durbin-Watson 檢測是否有自我相關,如果 p-value 值大於 α=0.05,不會拒絕虛無假設,從圖 23 中看出,沒有正自我相關,也沒有負自我 相關。

(四) 殘差符合常態

:Residuals follow normally distributed.

:Residuals do not follow normally distributed.

看圖 21、24,使用 Shapiro-Wilk,Kolmogorov-Smirnov,Cramer-von Mises,

Anderson-Darling 四種方法檢定,如果 p-value 值大於 α=0.05,不會拒絕虛無假 設,而從圖 21 和 24 中,p-value 值都不拒絕 ,也就是殘差符合常態,符合我 們的假設。

在文檔中 美國真的那麼危險嗎? (頁 10-14)

相關文件