構造変化

Equation Y_{i}=\alpha + \beta X_{i}+\gamma D_{i}+\delta D_{i} X_{i}+u_{i}t検定による構造変化のテスト H_{0}:\gamma=0H_{0}:\delta=0 H_{1}:\gamma \neq 0H_{1}:\delta \neq 0F検定による構造変化のテスト H_{0}:\gamma=0 と    H_{0}:\delta=0 H_{1}:\gamma \neq 0 もしくは H_{1}:\delta \neq 0R サンプル:民主党政権樹立(2009年9月)から2014年4月までのドル円レートと日経平均株価終値。2013年1月を構造変化点と仮定して検討。 nikkeiusd
> dataset
      date No nikkeiclose usdjpyrate lnnikkei   lnrate D Dlnrate
1   2009-9  1    10133.23      91.55 9.223575 4.516885 0    0.00
2  2009-10  2    10034.74      90.36 9.213808 4.503802 0    0.00
3  2009-11  3     9345.55      89.22 9.142656 4.491105 0    0.00
4  2009-12  4    10546.44      89.57 9.263544 4.495020 0    0.00
5   2010-1  5    10198.04      91.23 9.229951 4.513384 0    0.00
6   2010-2  6    10126.03      90.37 9.222865 4.503912 0    0.00
7   2010-3  7    11089.94      90.54 9.313794 4.505792 0    0.00
8   2010-4  8    11057.40      93.42 9.310855 4.537105 0    0.00
9   2010-5  9     9768.70      91.70 9.186939 4.518522 0    0.00
10  2010-6 10     9382.64      90.93 9.146616 4.510090 0    0.00
11  2010-7 11     9537.30      87.75 9.162966 4.474492 0    0.00
12  2010-8 12     8824.06      85.51 9.085237 4.448633 0    0.00
13  2010-9 13     9369.35      84.37 9.145199 4.435212 0    0.00
14 2010-10 14     9202.45      81.93 9.127225 4.405865 0    0.00
15 2010-11 15     9937.04      82.54 9.204024 4.413283 0    0.00
16 2010-12 16    10228.92      83.46 9.232974 4.424367 0    0.00
17  2011-1 17    10237.92      82.67 9.233854 4.414857 0    0.00
18  2011-2 18    10624.09      82.55 9.270879 4.413404 0    0.00
19  2011-3 19     9755.10      81.83 9.185546 4.404644 0    0.00
20  2011-4 20     9849.74      83.44 9.195200 4.424128 0    0.00
21  2011-5 21     9693.73      81.24 9.179235 4.397408 0    0.00
22  2011-6 22     9816.09      80.57 9.191778 4.389126 0    0.00
23  2011-7 23     9833.03      79.52 9.193502 4.376009 0    0.00
24  2011-8 24     8955.20      77.20 9.099990 4.346399 0    0.00
25  2011-9 25     8700.29      76.88 9.071112 4.342246 0    0.00
26 2011-10 26     8988.39      76.66 9.103689 4.339380 0    0.00
27 2011-11 27     8434.61      77.61 9.040099 4.351696 0    0.00
28 2011-12 28     8455.35      77.88 9.042555 4.355169 0    0.00
29  2012-1 29     8802.51      76.99 9.082792 4.343676 0    0.00
30  2012-2 30     9723.24      78.40 9.182274 4.361824 0    0.00
31  2012-3 31    10083.56      82.47 9.218662 4.412435 0    0.00
32  2012-4 32     9520.89      81.56 9.161244 4.401339 0    0.00
33  2012-5 33     8542.73      79.76 9.052836 4.379022 0    0.00
34  2012-6 34     9006.78      79.31 9.105733 4.373364 0    0.00
35  2012-7 35     8695.06      79.04 9.070510 4.369954 0    0.00
36  2012-8 36     8839.91      78.69 9.087032 4.365516 0    0.00
37  2012-9 37     8870.16      78.18 9.090448 4.359014 0    0.00
38 2012-10 38     8928.29      78.99 9.096980 4.369321 0    0.00
39 2012-11 39     9446.01      80.90 9.153348 4.393214 0    0.00
40 2012-12 40    10395.18      83.65 9.249098 4.426641 0    0.00
41  2013-1 41    11138.66      89.24 9.318177 4.491329 1   89.24
42  2013-2 42    11559.36      93.23 9.355251 4.535070 1   93.23
43  2013-3 43    12397.91      94.81 9.425283 4.551875 1   94.81
44  2013-4 44    13860.86      97.73 9.536824 4.582209 1   97.73
45  2013-5 45    13774.54     101.10 9.530577 4.616110 1  101.10
46  2013-6 46    13677.32      97.45 9.523494 4.579339 1   97.45
47  2013-7 47    13668.32      99.78 9.522836 4.602968 1   99.78
48  2013-8 48    13388.86      97.86 9.502178 4.583538 1   97.86
49  2013-9 49    14455.80      99.23 9.578851 4.597440 1   99.23
50 2013-10 50    14327.94      97.87 9.569967 4.583640 1   97.87
51 2013-11 51    15661.87     100.03 9.658984 4.605470 1  100.03
52 2013-12 52    16291.31     103.49 9.698387 4.639475 1  103.49
53  2014-1 53    14914.53     103.93 9.610091 4.643718 1  103.93
54  2014-2 54    14841.07     102.15 9.605154 4.626442 1  102.15
55  2014-3 55    14827.83     102.27 9.604261 4.627616 1  102.27
56  2014-4 56    14304.11     102.58 9.568302 4.630643 1  102.58

> plot(dataset$lnrate,dataset$lnnikkei,ylab="ln(USD/JPY)",xlab="ln(nikkeiclose)",main="USD/JPY-NIkkei in Japan market")

> fm0 <- lm(dataset$lnnikkei~dataset$lnrate,data=dataset)

> abline(fm0,col=2)

> fm1 <- lm(dataset$lnnikkei~dataset$lnrate+D+Dlnrate,data=dataset)

> summary(fm0)

Call:
lm(formula = dataset$lnnikkei ~ dataset$lnrate, data = dataset)

Residuals:
     Min       1Q   Median       3Q      Max 
-0.19641 -0.03059  0.01316  0.05249  0.14594 

Coefficients:
               Estimate Std. Error t value Pr(>|t|)    
(Intercept)      1.3038     0.4914   2.653   0.0105 *  
dataset$lnrate   1.7825     0.1099  16.217   <2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.07859 on 54 degrees of freedom
Multiple R-squared:  0.8296,    Adjusted R-squared:  0.8265 
F-statistic:   263 on 1 and 54 DF,  p-value: < 2.2e-16

> summary(fm1)

Call:
lm(formula = dataset$lnnikkei ~ dataset$lnrate + D + Dlnrate, 
    data = dataset)

Residuals:
      Min        1Q    Median        3Q       Max 
-0.101943 -0.033734 -0.009109  0.040581  0.112072 

Coefficients:
                Estimate Std. Error t value Pr(>|t|)    
(Intercept)     5.604248   0.617372   9.078 2.63e-12 ***
dataset$lnrate  0.805401   0.139658   5.767 4.48e-07 ***
D              -1.210718   0.359460  -3.368 0.001431 ** 
Dlnrate         0.014606   0.003718   3.928 0.000253 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.05274 on 52 degrees of freedom
Multiple R-squared:  0.9261,    Adjusted R-squared:  0.9219 
F-statistic: 217.3 on 3 and 52 DF,  p-value: < 2.2e-16

> anova(fm0,fm1)
Analysis of Variance Table

Model 1: dataset$lnnikkei ~ dataset$lnrate
Model 2: dataset$lnnikkei ~ dataset$lnrate + D + Dlnrate
  Res.Df     RSS Df Sum of Sq      F    Pr(>F)    
1     54 0.33353                                  
2     52 0.14462  2   0.18891 33.961 3.671e-10 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
> 

参考文献 秋山裕(2009).『Rによる計量経済学』.オーム社.328pp.アプリケーション R Core Team (2013). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. URL http://www.R-project.org/.