library(dplyr)
library(wooldridge)
library(car)
data("barium")
data("volat")
model_i <- lm(lchnimp ~ lchempi + lgas + lrtwex + befile6 + affile6 + afdec6 + t, data = barium)
summary(model_i)
##
## Call:
## lm(formula = lchnimp ~ lchempi + lgas + lrtwex + befile6 + affile6 +
## afdec6 + t, data = barium)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.94317 -0.31168 0.03172 0.36366 1.21218
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -2.367526 20.782165 -0.114 0.90949
## lchempi -0.686236 1.239711 -0.554 0.58089
## lgas 0.465679 0.876178 0.531 0.59604
## lrtwex 0.078224 0.472440 0.166 0.86876
## befile6 0.090470 0.251289 0.360 0.71945
## affile6 0.097006 0.257313 0.377 0.70683
## afdec6 -0.351502 0.282542 -1.244 0.21584
## t 0.012706 0.003844 3.305 0.00124 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.5748 on 123 degrees of freedom
## Multiple R-squared: 0.3616, Adjusted R-squared: 0.3252
## F-statistic: 9.951 on 7 and 123 DF, p-value: 8.358e-10
None of the variables other than the time trend is statsitically significant.
linearHypothesis(model_i, c("lchempi = 0", "lgas = 0", "lrtwex = 0", "befile6 = 0", "affile6 = 0", "afdec6 = 0"))
##
## Linear hypothesis test:
## lchempi = 0
## lgas = 0
## lrtwex = 0
## befile6 = 0
## affile6 = 0
## afdec6 = 0
##
## Model 1: restricted model
## Model 2: lchnimp ~ lchempi + lgas + lrtwex + befile6 + affile6 + afdec6 +
## t
##
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 129 41.709
## 2 123 40.638 6 1.071 0.5402 0.7767
The p-value indicates that the variables, except for time trend, are jointly statistically insignificant.
model_iii <- lm(lchnimp ~ lchempi + lgas + lrtwex + befile6 + affile6 + afdec6 + t + feb + mar + apr + may + jun + jul + aug + sep + oct + nov + dec, data = barium)
summary(model_iii)
##
## Call:
## lm(formula = lchnimp ~ lchempi + lgas + lrtwex + befile6 + affile6 +
## afdec6 + t + feb + mar + apr + may + jun + jul + aug + sep +
## oct + nov + dec, data = barium)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.86054 -0.36284 0.02233 0.37155 1.09845
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 27.300074 31.397067 0.870 0.38643
## lchempi -0.451656 1.271528 -0.355 0.72310
## lgas -0.820624 1.345056 -0.610 0.54303
## lrtwex -0.197141 0.529531 -0.372 0.71038
## befile6 0.164851 0.256979 0.641 0.52251
## affile6 0.153400 0.271986 0.564 0.57388
## afdec6 -0.295016 0.299428 -0.985 0.32662
## t 0.012339 0.003916 3.151 0.00209 **
## feb -0.355415 0.293754 -1.210 0.22886
## mar 0.062566 0.254858 0.245 0.80652
## apr -0.440615 0.258398 -1.705 0.09093 .
## may 0.031299 0.259200 0.121 0.90410
## jun -0.200950 0.259213 -0.775 0.43984
## jul 0.011111 0.268378 0.041 0.96705
## aug -0.127114 0.267792 -0.475 0.63594
## sep -0.075193 0.258350 -0.291 0.77155
## oct 0.079763 0.257051 0.310 0.75691
## nov -0.260303 0.253062 -1.029 0.30588
## dec 0.096533 0.261553 0.369 0.71277
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.5788 on 112 degrees of freedom
## Multiple R-squared: 0.4106, Adjusted R-squared: 0.3158
## F-statistic: 4.334 on 18 and 112 DF, p-value: 6.188e-07
summary(model_i)$coefficients
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -2.36752571 20.782164848 -0.1139210 0.909486134
## lchempi -0.68623641 1.239711188 -0.5535454 0.580894844
## lgas 0.46567857 0.876177882 0.5314886 0.596038777
## lrtwex 0.07822372 0.472440015 0.1655739 0.868764143
## befile6 0.09046996 0.251288689 0.3600240 0.719446617
## affile6 0.09700615 0.257313120 0.3769965 0.706825810
## afdec6 -0.35150180 0.282541716 -1.2440705 0.215839231
## t 0.01270583 0.003844281 3.3051245 0.001244189
summary(model_iii)$coefficients
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 27.30007415 31.39706688 0.86951034 0.386427675
## lchempi -0.45165551 1.27152822 -0.35520683 0.723102699
## lgas -0.82062398 1.34505551 -0.61010418 0.543028721
## lrtwex -0.19714150 0.52953135 -0.37229429 0.710377272
## befile6 0.16485089 0.25697887 0.64149589 0.522511203
## affile6 0.15340038 0.27198562 0.56400179 0.573880563
## afdec6 -0.29501635 0.29942757 -0.98526782 0.326616221
## t 0.01233888 0.00391627 3.15067176 0.002089577
## feb -0.35541477 0.29375401 -1.20990611 0.228862403
## mar 0.06256597 0.25485803 0.24549342 0.806523684
## apr -0.44061491 0.25839800 -1.70517929 0.090933157
## may 0.03129904 0.25919977 0.12075258 0.904103374
## jun -0.20095005 0.25921335 -0.77523032 0.439837302
## jul 0.01111147 0.26837771 0.04140237 0.967048838
## aug -0.12711371 0.26779170 -0.47467383 0.635943720
## sep -0.07519288 0.25835019 -0.29105022 0.771551210
## oct 0.07976266 0.25705140 0.31029851 0.756910639
## nov -0.26030316 0.25306226 -1.02861310 0.305877817
## dec 0.09653259 0.26155252 0.36907535 0.712768370
Including the monthly dummies does not change any other estimates or their standard erroes in important ways.
\(\beta_1\) should have a positive sign and \(\beta_2\) should have a negative sign.
summary(lm(rsp500 ~ pcip + i3, data = volat))
##
## Call:
## lm(formula = rsp500 ~ pcip + i3, data = volat)
##
## Residuals:
## Min 1Q Median 3Q Max
## -157.871 -22.580 2.103 25.524 138.137
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 18.84306 3.27488 5.754 1.44e-08 ***
## pcip 0.03642 0.12940 0.281 0.7785
## i3 -1.36169 0.54072 -2.518 0.0121 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 40.13 on 554 degrees of freedom
## (1 observation deleted due to missingness)
## Multiple R-squared: 0.01189, Adjusted R-squared: 0.008325
## F-statistic: 3.334 on 2 and 554 DF, p-value: 0.03637
Intercept (18.84306): When both predictors (pcip and i3) are zero, the expected return on the S&P 500 (rsp500) is 18.84.
pcip (0.03642): For a 1-unit increase in the percentage change in industrial production (pcip), the return on the S&P 500 (rsp500) is expected to increase by 0.03642, holding i3 constant. The effect is very small and statistically insignificant.
i3 (-1.36169): For a 1% increase in the 3-month T-bill rate (i3), the return on the S&P 500 is expected to decrease by 1.36169, holding pcip constant. This effect is statistically significant.
No, the model has a very low R-squared (0.01189), indicating that the predictors explain only a tiny portion of the variation in the S&P 500 returns. The statistical significance of i3 suggests it has a small, but potentially useful, effect, but overall, the predictability of S&P 500 returns from these variables is weak.