2016年8月20日 星期六

影響交通事故率高低的因素與因果推論?

原始資料來源

交通部統計查詢網
http://stat.motc.gov.tw/mocdb/stmain.jsp?sys=100



Idea 構想:
看看交通事故率的高低,是否和以下因素有關 與 猜想背後的因果關係

1. 新手駕駛=>看駕照數的增減
2. 景氣好壞 =>失業率/進出口金額
3. 空氣品質 =>看環保署空氣汙染指標
4. 天候氣溫 =>氣溫日照天數
5. 官方稽查 =>稽查開罰件數


Disclaimer: 僅為統計Kuso應用
 
 

 
Part 1 Cross-Sectional Separated Regression
假說1
新手駕駛(大小客車駕照) 


Dependent Variable: DYA1

 

 

Method: Least Squares

 

 
 
 

 

Sample (adjusted): 2001M02 2016M04

 

Included observations: 183 after adjustments

 

 

 

 

 

 

 

 

 

 

 

Variable

Coefficient

Std. Error

t-Statistic

Prob.  

 

 

 

 

 

 

 

 

 

 

DLA

4.881779

6.423653

0.759969

0.4483

DLB

-1.922808

6.677659

-0.287946

0.7737

 

 

 

 

 

 

 

 

 

 

R-squared

-0.007175

    Mean dependent var

1.204678

Adjusted R-squared

-0.012740

    S.D. dependent var

9.032821

S.E. of regression

9.090177

    Akaike info criterion

7.263135

Sum squared resid

14956.27

    Schwarz criterion

7.298211

Log likelihood

-662.5768

    Hannan-Quinn criter.

7.277353

Durbin-Watson stat

2.987217

 

 

 

 

 

 

 

 

 

 

 

 

 


呵,解釋力很糟


假說2
景氣好壞
解釋力
35% 

Dependent Variable: DYA1

 

 

Method: Least Squares

 

 
  
 

 

Sample (adjusted): 2001M02 2016M04

 

Included observations: 183 after adjustments

 

 

 

 

 

 

 

 

 

 

 

Variable

Coefficient

Std. Error

t-Statistic

Prob.  

 

 

 

 

 

 

 

 

 

 

E1

0.224664

0.120185

1.869316

0.0632

DE2

0.002045

0.000205

10.00076

0.0000

DE3

-0.858224

0.601087

-1.427787

0.1551

 

 

 

 

 

 

 

 

 

 

R-squared

0.358201

    Mean dependent var

1.204678

Adjusted R-squared

0.351070

    S.D. dependent var

9.032821

S.E. of regression

7.276499

    Akaike info criterion

6.823434

Sum squared resid

9530.539

    Schwarz criterion

6.876049

Log likelihood

-621.3442

    Hannan-Quinn criter.

6.844762

Durbin-Watson stat

2.719075

 

 

 

 

 

 

 

 

 

 

 

 

 
對交通事故率與外銷出口的金額的關聯性非常顯著(景氣好,事故率高)
 

假說3
空氣品質(霧霾)

解釋力
5%


Dependent Variable: DYA1

 

 

Method: Least Squares

 

 

 

 

 

Sample (adjusted): 2001M02 2016M04

 

Included observations: 181 after adjustments

 

 

 

 

 

 

 

 

 

 

 

Variable

Coefficient

Std. Error

t-Statistic

Prob.  

 

 

 

 

 

 

 

 

 

 

DAQ1

-0.369524

0.354330

-1.042880

0.2984

DAQ2

-0.115151

0.083183

-1.384303

0.1680

DAQ3

0.353249

0.113126

3.122610

0.0021

 

 

 

 

 

 

 

 

 

 

R-squared

0.056868

    Mean dependent var

1.378677

Adjusted R-squared

0.046271

    S.D. dependent var

8.905764

S.E. of regression

8.697285

    Akaike info criterion

7.180334

Sum squared resid

13464.41

    Schwarz criterion

7.233348

Log likelihood

-646.8203

    Hannan-Quinn criter.

7.201827

Durbin-Watson stat

2.813369

 

 

 

 

 

 

 

 

 

 

 

 

 
空氣品質不好、能見度低,所以事故率會高?
亦或
空氣品質好,大家開快車,所以事故率高?!
 

 
假說4
天候氣溫
解釋力
10% 


Dependent Variable: DYA1

 

 

Method: Least Squares

 

 

 

 

 

Sample (adjusted): 2001M02 2016M04

 

Included observations: 183 after adjustments

 

 

 

 

 

 

 

 

 

 

 

Variable

Coefficient

Std. Error

t-Statistic

Prob.  

 

 

 

 

 

 

 

 

 

 

DW1

0.062103

0.019511

3.182986

0.0017

DW2

-0.035565

0.046516

-0.764575

0.4455

DW3

0.162819

0.147772

1.101827

0.2720

DW4

0.094797

0.188125

0.503903

0.6149

 

 

 

 

 

 

 

 

 

 

R-squared

0.101875

    Mean dependent var

1.204678

Adjusted R-squared

0.086823

    S.D. dependent var

9.032821

S.E. of regression

8.631791

    Akaike info criterion

7.170397

Sum squared resid

13336.90

    Schwarz criterion

7.240549

Log likelihood

-652.0913

    Hannan-Quinn criter.

7.198833

Durbin-Watson stat

2.825518

 

 

 

 

 

 

 

 

 

 

 

 

 

日照天數與事故率顯著相關(日照天數多,大家出遊多,所以事故率高?)


 
假說5
官方執法稽查

解釋力30% 


Dependent Variable: DYA1

 

 

Method: Least Squares

 

 

 

 

 

Sample (adjusted): 2001M02 2016M04

 

Included observations: 183 after adjustments

 

 

 

 

 

 

 

 

 

 

 

Variable

Coefficient

Std. Error

t-Statistic

Prob.  

 

 

 

 

 

 

 

 

 

 

DP1

0.037243

0.006352

5.863581

0.0000

DP2

0.002186

0.004392

0.497629

0.6193

 

 

 

 

 

 

 

 

 

 

R-squared

0.309954

    Mean dependent var

1.204678

Adjusted R-squared

0.306141

    S.D. dependent var

9.032821

S.E. of regression

7.524176

    Akaike info criterion

6.884988

Sum squared resid

10246.99

    Schwarz criterion

6.920065

Log likelihood

-627.9764

    Hannan-Quinn criter.

6.899207

Durbin-Watson stat

2.377284

 

 

 

 

 

 

 

 

 

 

 

 

 
關係顯著,但兩者是正相關,而非負相關

 
 


Part 2 Cross-Sectional Pooled Regression

以上這些因素都放在一起回歸的時候

哪個因素會顯著、relevant?

 


Dependent Variable: DYA1
 
 
Method: Least Squares
 
 
Sample (adjusted): 2001M02 2016M04
 
Included observations: 183 after adjustments
 
 
 
 
 
 
 
 
 
 
 
Variable
Coefficient
Std. Error
t-Statistic
Prob.  
 
 
 
 
 
 
 
 
 
 
C
1.338444
0.695792
1.923625
0.0560
DLA
-1.091594
2.428728
-0.449451
0.6537
DE2
0.001414
0.000218
6.492952
0.0000
DAQ3
0.031253
0.041543
0.752312
0.4529
DW1
0.038969
0.010532
3.700053
0.0003
DP1
0.020305
0.004571
4.441803
0.0000
 
 
 
 
 
 
 
 
 
 
R-squared
0.491222
    Mean dependent var
1.204678
Adjusted R-squared
0.476850
    S.D. dependent var
9.032821
S.E. of regression
6.533360
    Akaike info criterion
6.623957
Sum squared resid
7555.208
    Schwarz criterion
6.729186
Log likelihood
-600.0921
    Hannan-Quinn criter.
6.666612
F-statistic
34.17849
    Durbin-Watson stat
2.317044
Prob(F-statistic)
0.000000
 
 
 
 
 
 
 
 
 
 
 
 
 


新手駕駛、空氣品質不顯著

景氣、天候與官方稽查顯著正相關

 


Part3 Longitudinal Regression

確認不同因素的先後關係以判斷因果關係的解釋

e.g.
景氣好=>車輛數增加=>空物污染增加=>造成車禍事故率高?

車禍事故率高=>官方稽核增加 亦或 官方稽核增加=>車禍事故率低

 
 
Pairwise Granger Causality Tests
Date: 07/14/16   Time: 14:29
Sample: 2001M01 2016M04
Lags: 1
 
 
 
 
 
 
 
 
 
 
 Null Hypothesis:
Obs
F-Statistic
Prob. 
 
 
 
 
 
 
 
 
 DYA1 does not Granger Cause DP1
 182
 14.0995
0.0002
 DP1 does not Granger Cause DYA1
 4.86715
0.0286
 
 
 
 
 
 
 
 


Pairwise Granger Causality Tests
Date: 07/14/16   Time: 14:30
Sample: 2001M01 2016M04
Lags: 7
 
 
 
 
 
 
 
 
 
 
 Null Hypothesis:
Obs
F-Statistic
Prob. 
 
 
 
 
 
 
 
 
 DYA1 does not Granger Cause DP1
 176
 8.10248
2.E-08
 DP1 does not Granger Cause DYA1
 2.51959
0.0174
 
 
 
 
 
 
 
 

因為上個月事故多,官方才會加強稽查
不是官方稽查有助於減少事故發生!
 
 
 

沒有留言: