2016年8月7日日曜日

New GDP/S&P500 model without boolean switch


>start_date <- "2001-04-01"
>end_date <- "2016-04-01"

>summary(lm(to.quarterly(SP5[paste(start_date,end_date,sep='::')])[,4] ~
              to.quarterly(PAYEMS[paste(start_date,end_date,sep='::')])[,4] *
              to.quarterly(UNDCONTSA[paste(start_date,end_date,sep='::')])[,4] *
              GDPC96[paste(start_date,end_date,sep='::')]))

Call:
lm(formula = to.quarterly(SP5[paste(start_date, end_date, sep = "::")])[, 
    4] ~ to.quarterly(PAYEMS[paste(start_date, end_date, sep = "::")])[, 
    4] * to.quarterly(UNDCONTSA[paste(start_date, end_date, sep = "::")])[, 
    4] * GDPC96[paste(start_date, end_date, sep = "::")])

Residuals:
     Min       1Q   Median       3Q      Max 
-193.065  -65.262    9.311   77.450  178.759 

Coefficients:
                                                                                                                                                                                           Estimate
(Intercept)                                                                                                                                                                               3.358e+05
to.quarterly(PAYEMS[paste(start_date, end_date, sep = "::")])[, 4]                                                                                                                       -2.632e+00
to.quarterly(UNDCONTSA[paste(start_date, end_date, sep = "::")])[, 4]                                                                                                                    -3.034e+02
GDPC96[paste(start_date, end_date, sep = "::")]                                                                                                                                          -2.205e+01
to.quarterly(PAYEMS[paste(start_date, end_date, sep = "::")])[, 4]:to.quarterly(UNDCONTSA[paste(start_date, end_date, sep = "::")])[, 4]                                                  2.405e-03
to.quarterly(PAYEMS[paste(start_date, end_date, sep = "::")])[, 4]:GDPC96[paste(start_date, end_date, sep = "::")]                                                                        1.737e-04
to.quarterly(UNDCONTSA[paste(start_date, end_date, sep = "::")])[, 4]:GDPC96[paste(start_date, end_date, sep = "::")]                                                                     1.923e-02
to.quarterly(PAYEMS[paste(start_date, end_date, sep = "::")])[, 4]:to.quarterly(UNDCONTSA[paste(start_date, end_date, sep = "::")])[, 4]:GDPC96[paste(start_date, end_date, sep = "::")] -1.531e-07
                                                                                                                                                                                         Std. Error
(Intercept)                                                                                                                                                                               6.689e+04
to.quarterly(PAYEMS[paste(start_date, end_date, sep = "::")])[, 4]                                                                                                                        5.037e-01
to.quarterly(UNDCONTSA[paste(start_date, end_date, sep = "::")])[, 4]                                                                                                                     6.614e+01
GDPC96[paste(start_date, end_date, sep = "::")]                                                                                                                                           4.428e+00
to.quarterly(PAYEMS[paste(start_date, end_date, sep = "::")])[, 4]:to.quarterly(UNDCONTSA[paste(start_date, end_date, sep = "::")])[, 4]                                                  4.988e-04
to.quarterly(PAYEMS[paste(start_date, end_date, sep = "::")])[, 4]:GDPC96[paste(start_date, end_date, sep = "::")]                                                                        3.329e-05
to.quarterly(UNDCONTSA[paste(start_date, end_date, sep = "::")])[, 4]:GDPC96[paste(start_date, end_date, sep = "::")]                                                                     4.386e-03
to.quarterly(PAYEMS[paste(start_date, end_date, sep = "::")])[, 4]:to.quarterly(UNDCONTSA[paste(start_date, end_date, sep = "::")])[, 4]:GDPC96[paste(start_date, end_date, sep = "::")]  3.301e-08
                                                                                                                                                                                         t value
(Intercept)                                                                                                                                                                                5.020
to.quarterly(PAYEMS[paste(start_date, end_date, sep = "::")])[, 4]                                                                                                                        -5.226
to.quarterly(UNDCONTSA[paste(start_date, end_date, sep = "::")])[, 4]                                                                                                                     -4.588
GDPC96[paste(start_date, end_date, sep = "::")]                                                                                                                                           -4.980
to.quarterly(PAYEMS[paste(start_date, end_date, sep = "::")])[, 4]:to.quarterly(UNDCONTSA[paste(start_date, end_date, sep = "::")])[, 4]                                                   4.821
to.quarterly(PAYEMS[paste(start_date, end_date, sep = "::")])[, 4]:GDPC96[paste(start_date, end_date, sep = "::")]                                                                         5.218
to.quarterly(UNDCONTSA[paste(start_date, end_date, sep = "::")])[, 4]:GDPC96[paste(start_date, end_date, sep = "::")]                                                                      4.384
to.quarterly(PAYEMS[paste(start_date, end_date, sep = "::")])[, 4]:to.quarterly(UNDCONTSA[paste(start_date, end_date, sep = "::")])[, 4]:GDPC96[paste(start_date, end_date, sep = "::")]  -4.639
                                                                                                                                                                                         Pr(>|t|)
(Intercept)                                                                                                                                                                              6.18e-06
to.quarterly(PAYEMS[paste(start_date, end_date, sep = "::")])[, 4]                                                                                                                       2.98e-06
to.quarterly(UNDCONTSA[paste(start_date, end_date, sep = "::")])[, 4]                                                                                                                    2.78e-05
GDPC96[paste(start_date, end_date, sep = "::")]                                                                                                                                          7.13e-06
to.quarterly(PAYEMS[paste(start_date, end_date, sep = "::")])[, 4]:to.quarterly(UNDCONTSA[paste(start_date, end_date, sep = "::")])[, 4]                                                 1.24e-05
to.quarterly(PAYEMS[paste(start_date, end_date, sep = "::")])[, 4]:GDPC96[paste(start_date, end_date, sep = "::")]                                                                       3.07e-06
to.quarterly(UNDCONTSA[paste(start_date, end_date, sep = "::")])[, 4]:GDPC96[paste(start_date, end_date, sep = "::")]                                                                    5.54e-05
to.quarterly(PAYEMS[paste(start_date, end_date, sep = "::")])[, 4]:to.quarterly(UNDCONTSA[paste(start_date, end_date, sep = "::")])[, 4]:GDPC96[paste(start_date, end_date, sep = "::")] 2.34e-05
                                                                                                                                                                                            
(Intercept)                                                                                                         ***
to.quarterly(PAYEMS[paste(start_date, end_date, sep = "::")])[, 4]                                                                                                                      \
***
to.quarterly(UNDCONTSA[paste(start_date, end_date, sep = "::")])[, 4]                                                                                                               
***
GDPC96[paste(start_date, end_date, sep = "::")]                                                                                                                                          
***
to.quarterly(PAYEMS[paste(start_date, end_date, sep = "::")])[, 4]:to.quarterly(UNDCONTSA[paste(start_date, end_date, sep = "::")])[, 4]                                                 
***
to.quarterly(PAYEMS[paste(start_date, end_date, sep = "::")])[, 4]:GDPC96[paste(start_date, end_date, sep = "::")]                                                                       
***
to.quarterly(UNDCONTSA[paste(start_date, end_date, sep = "::")])[, 4]:GDPC96[paste(start_date, end_date, sep = "::")]                                                                    
***
to.quarterly(PAYEMS[paste(start_date, end_date, sep = "::")])[, 4]:to.quarterly(UNDCONTSA[paste(start_date, end_date, sep = "::")])[, 4]:GDPC96[paste(start_date, end_date, sep = "::")] 
***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 95.52 on 53 degrees of freedom
Multiple R-squared:  0.9374, Adjusted R-squared:  0.9291 
F-statistic: 113.4 on 7 and 53 DF,  p-value: < 2.2e-16

0 件のコメント: