In order to improve readability, use temporary parameters.
> my_q_con <- to.quarterly(UNDCONTSA["2001-04-01::2016-03-01"])[,4]
> my_q_pay <- to.quarterly(PAYEMS["2001-04-01::2016-03-01"])[,4]
Put all explanatory variables and boolean vector
"output" as cross terms. R^2 improved to 0.954.
> summary(lm(formula = to.quarterly(SP5["2001-04-01::2016-03-01"])[, 4] ~
+ +my_q_pay * +my_q_con * +GDPC96["2001-04-01::2016-01-01"] * output))
Call:
lm(formula = to.quarterly(SP5["2001-04-01::2016-03-01"])[, 4] ~
+my_q_pay * +my_q_con * +GDPC96["2001-04-01::2016-01-01"] *
output)
Residuals:
Min 1Q Median 3Q Max
-206.13 -40.42 0.00 40.04 130.58
Coefficients:
Estimate Std. Error t value
(Intercept) 2.593e+05 7.082e+04 3.662
my_q_pay -1.981e+00 5.393e-01 -3.673
my_q_con -2.441e+02 6.914e+01 -3.531
GDPC96["2001-04-01::2016-01-01"] -1.782e+01 4.638e+00 -3.843
output -9.491e+05 2.603e+06 -0.365
my_q_pay:my_q_con 1.873e-03 5.271e-04 3.553
my_q_pay:GDPC96["2001-04-01::2016-01-01"] 1.368e-04 3.524e-05 3.881
my_q_con:GDPC96["2001-04-01::2016-01-01"] 1.635e-02 4.541e-03 3.600
my_q_pay:output 7.490e+00 2.006e+01 0.373
my_q_con:output 1.190e+03 3.627e+03 0.328
GDPC96["2001-04-01::2016-01-01"]:output 6.028e+01 1.720e+02 0.351
my_q_pay:my_q_con:GDPC96["2001-04-01::2016-01-01"] -1.256e-07 3.450e-08 -3.640
my_q_pay:my_q_con:output -9.284e-03 2.775e-02 -0.335
my_q_pay:GDPC96["2001-04-01::2016-01-01"]:output -4.766e-04 1.324e-03 -0.360
my_q_con:GDPC96["2001-04-01::2016-01-01"]:output -7.749e-02 2.434e-01 -0.318
my_q_pay:my_q_con:GDPC96["2001-04-01::2016-01-01"]:output 6.048e-07 1.861e-06 0.325
Pr(>|t|)
(Intercept) 0.000668 ***
my_q_pay 0.000647 ***
my_q_con 0.000986 ***
GDPC96["2001-04-01::2016-01-01"] 0.000387 ***
output 0.717158
my_q_pay:my_q_con 0.000922 ***
my_q_pay:GDPC96["2001-04-01::2016-01-01"] 0.000345 ***
my_q_con:GDPC96["2001-04-01::2016-01-01"] 0.000803 ***
my_q_pay:output 0.710686
my_q_con:output 0.744484
GDPC96["2001-04-01::2016-01-01"]:output 0.727614
my_q_pay:my_q_con:GDPC96["2001-04-01::2016-01-01"] 0.000713 ***
my_q_pay:my_q_con:output 0.739587
my_q_pay:GDPC96["2001-04-01::2016-01-01"]:output 0.720694
my_q_con:GDPC96["2001-04-01::2016-01-01"]:output 0.751710
my_q_pay:my_q_con:GDPC96["2001-04-01::2016-01-01"]:output 0.746693
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 86.73 on 44 degrees of freedom
Multiple R-squared: 0.9541, Adjusted R-squared: 0.9384
F-statistic: 60.95 on 15 and 44 DF, p-value: < 2.2e-16
0 件のコメント:
コメントを投稿