year | month | day | delay | temp | wind | precip | quarter | hot |
---|---|---|---|---|---|---|---|---|
2013 | 1 | 1 | 17.483553 | 36.81909 | 13.233970 | 0 | 1 | FALSE |
2013 | 1 | 2 | 25.322674 | 28.70000 | 10.884461 | 0 | 1 | FALSE |
2013 | 1 | 3 | 8.450451 | 29.57750 | 8.582901 | 0 | 1 | FALSE |
2013 | 1 | 4 | 12.103858 | 34.33250 | 14.001157 | 0 | 1 | FALSE |
2013 | 1 | 5 | 5.696203 | 36.56000 | 9.398037 | 0 | 1 | FALSE |
2013 | 1 | 6 | 12.383333 | 39.92000 | 9.110342 | 0 | 1 | FALSE |
Statistic | N | Mean | St. Dev. | Min | Pctl(25) | Pctl(75) | Max |
year | 364 | 2,013.000 | 0.000 | 2,013 | 2,013 | 2,013 | 2,013 |
month | 364 | 6.511 | 3.445 | 1 | 4 | 9.2 | 12 |
day | 364 | 15.679 | 8.784 | 1 | 8 | 23 | 31 |
delay | 364 | 15.080 | 13.883 | -1.349 | 5.446 | 20.007 | 97.771 |
temp | 364 | 55.531 | 17.598 | 15.455 | 40.114 | 71.647 | 91.085 |
wind | 364 | 9.464 | 4.398 | 2.637 | 6.797 | 11.508 | 56.388 |
precip | 364 | 0.121 | 0.335 | 0 | 0 | 0.03 | 4 |
hot | 364 | 0.022 | 0.147 | 0 | 0 | 0 | 1 |
Statistic | N | Pctl(75) | St. Dev. |
year | 364 | 2,013 | 0.000 |
month | 364 | 9.2 | 3.445 |
day | 364 | 23 | 8.784 |
delay | 364 | 20.007 | 13.883 |
temp | 364 | 71.647 | 17.598 |
wind | 364 | 11.508 | 4.398 |
precip | 364 | 0.03 | 0.335 |
hot | 364 | 0 | 0.147 |
Statistic | year | month | day | delay | temp | wind | precip | hot |
N | 364 | 364 | 364 | 364 | 364 | 364 | 364 | 364 |
Mean | 2,013.000 | 6.511 | 15.679 | 15.080 | 55.531 | 9.464 | 0.121 | 0.022 |
St. Dev. | 0.000 | 3.445 | 8.784 | 13.883 | 17.598 | 4.398 | 0.335 | 0.147 |
Min | 2,013 | 1 | 1 | -1.349 | 15.455 | 2.637 | 0 | 0 |
Pctl(25) | 2,013 | 4 | 8 | 5.446 | 40.114 | 6.797 | 0 | 0 |
Pctl(75) | 2,013 | 9.2 | 23 | 20.007 | 71.647 | 11.508 | 0.03 | 0 |
Max | 2,013 | 12 | 31 | 97.771 | 91.085 | 56.388 | 4 | 1 |
output <- lm(delay ~ temp + wind + precip, data = both)
output2 <- lm(delay ~ temp + wind + precip + quarter, data = both)
output3 <- ivreg(delay ~ temp + wind + precip | . - temp + hot, data = both)
output %>%
summary
#
# Call:
# lm(formula = delay ~ temp + wind + precip, data = both)
#
# Residuals:
# Min 1Q Median 3Q Max
# -47.164 -8.150 -3.148 4.667 70.493
#
# Coefficients:
# Estimate Std. Error t value Pr(>|t|)
# (Intercept) 6.15166 2.98897 2.058 0.0403 *
# temp 0.07905 0.03933 2.010 0.0452 *
# wind 0.28523 0.15741 1.812 0.0708 .
# precip 15.25495 2.01280 7.579 2.98e-13 ***
# ---
# Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#
# Residual standard error: 12.82 on 360 degrees of freedom
# Multiple R-squared: 0.1541, Adjusted R-squared: 0.147
# F-statistic: 21.86 on 3 and 360 DF, p-value: 5.003e-13
Dependent variable: | ||
delay | ||
(1) | (2) | |
temp | 0.079** | 0.164** |
(0.039) | (0.066) | |
wind | 0.285* | 0.237 |
(0.157) | (0.157) | |
precip | 15.255*** | 14.845*** |
(2.013) | (2.004) | |
quarter2 | -2.060 | |
(2.579) | ||
quarter3 | -6.755** | |
(3.121) | ||
quarter4 | -4.408** | |
(2.037) | ||
Constant | 6.152** | 5.246 |
(2.989) | (3.412) | |
Observations | 364 | 364 |
R2 | 0.154 | 0.175 |
Adjusted R2 | 0.147 | 0.161 |
Residual Std. Error | 12.822 (df = 360) | 12.718 (df = 357) |
F Statistic | 21.860*** (df = 3; 360) | 12.593*** (df = 6; 357) |
Note: | p<0.1; p<0.05; p<0.01 |
delay | ||
(1) | (2) | |
temp | 0.079** | 0.164** |
(0.039) | (0.066) | |
wind | 0.285* | 0.237 |
(0.157) | (0.157) | |
precip | 15.255*** | 14.845*** |
(2.013) | (2.004) | |
quarter2 | -2.060 | |
(2.579) | ||
quarter3 | -6.755** | |
(3.121) | ||
quarter4 | -4.408** | |
(2.037) | ||
Constant | 6.152** | 5.246 |
(2.989) | (3.412) | |
N | 364 | 364 |
R2 | 0.154 | 0.175 |
Adjusted R2 | 0.147 | 0.161 |
Residual Std. Error | 12.822 (df = 360) | 12.718 (df = 357) |
F Statistic | 21.860*** (df = 3; 360) | 12.593*** (df = 6; 357) |
Notes: | ***Significant at the 1 percent level. | |
**Significant at the 5 percent level. | ||
*Significant at the 10 percent level. |
stargazer(output, output2, type = "html",
title = "These are awesome results!",
covariate.labels = c("Temperature", "Wind speed", "Rain (inches)",
"2nd quarter", "3rd quarter", "Fourth quarter"),
dep.var.caption = "A better caption",
dep.var.labels = "Flight delay (in minutes)")
A better caption | ||
Flight delay (in minutes) | ||
(1) | (2) | |
Temperature | 0.079** | 0.164** |
(0.039) | (0.066) | |
Wind speed | 0.285* | 0.237 |
(0.157) | (0.157) | |
Rain (inches) | 15.255*** | 14.845*** |
(2.013) | (2.004) | |
2nd quarter | -2.060 | |
(2.579) | ||
3rd quarter | -6.755** | |
(3.121) | ||
Fourth quarter | -4.408** | |
(2.037) | ||
Constant | 6.152** | 5.246 |
(2.989) | (3.412) | |
Observations | 364 | 364 |
R2 | 0.154 | 0.175 |
Adjusted R2 | 0.147 | 0.161 |
Residual Std. Error | 12.822 (df = 360) | 12.718 (df = 357) |
F Statistic | 21.860*** (df = 3; 360) | 12.593*** (df = 6; 357) |
Note: | p<0.1; p<0.05; p<0.01 |
Dependent variable: | ||
delay | ||
Good | Better | |
(1) | (2) | |
temp | 0.079** | 0.164** |
(0.039) | (0.066) | |
wind | 0.285* | 0.237 |
(0.157) | (0.157) | |
precip | 15.255*** | 14.845*** |
(2.013) | (2.004) | |
quarter2 | -2.060 | |
(2.579) | ||
quarter3 | -6.755** | |
(3.121) | ||
quarter4 | -4.408** | |
(2.037) | ||
Constant | 6.152** | 5.246 |
(2.989) | (3.412) | |
Observations | 364 | 364 |
R2 | 0.154 | 0.175 |
Adjusted R2 | 0.147 | 0.161 |
Residual Std. Error | 12.822 (df = 360) | 12.718 (df = 357) |
F Statistic | 21.860*** (df = 3; 360) | 12.593*** (df = 6; 357) |
Note: | p<0.1; p<0.05; p<0.01 |
stargazer(output, output, output2, output2, type = "html",
column.labels = c("Good", "Better"),
column.separate = c(2, 2))
Dependent variable: | ||||
delay | ||||
Good | Better | |||
(1) | (2) | (3) | (4) | |
temp | 0.079** | 0.079** | 0.164** | 0.164** |
(0.039) | (0.039) | (0.066) | (0.066) | |
wind | 0.285* | 0.285* | 0.237 | 0.237 |
(0.157) | (0.157) | (0.157) | (0.157) | |
precip | 15.255*** | 15.255*** | 14.845*** | 14.845*** |
(2.013) | (2.013) | (2.004) | (2.004) | |
quarter2 | -2.060 | -2.060 | ||
(2.579) | (2.579) | |||
quarter3 | -6.755** | -6.755** | ||
(3.121) | (3.121) | |||
quarter4 | -4.408** | -4.408** | ||
(2.037) | (2.037) | |||
Constant | 6.152** | 6.152** | 5.246 | 5.246 |
(2.989) | (2.989) | (3.412) | (3.412) | |
Observations | 364 | 364 | 364 | 364 |
R2 | 0.154 | 0.154 | 0.175 | 0.175 |
Adjusted R2 | 0.147 | 0.147 | 0.161 | 0.161 |
Residual Std. Error | 12.822 (df = 360) | 12.822 (df = 360) | 12.718 (df = 357) | 12.718 (df = 357) |
F Statistic | 21.860*** (df = 3; 360) | 21.860*** (df = 3; 360) | 12.593*** (df = 6; 357) | 12.593*** (df = 6; 357) |
Note: | p<0.1; p<0.05; p<0.01 |
Dependent variable: | ||
delay | ||
(1) | (2) | |
temp | 0.079 | 0.164 |
t = 2.010** | t = 2.479** | |
wind | 0.285 | 0.237 |
t = 1.812* | t = 1.507 | |
precip | 15.255 | 14.845 |
t = 7.579*** | t = 7.407*** | |
quarter2 | -2.060 | |
t = -0.799 | ||
quarter3 | -6.755 | |
t = -2.164** | ||
quarter4 | -4.408 | |
t = -2.164** | ||
Constant | 6.152 | 5.246 |
t = 2.058** | t = 1.537 | |
Observations | 364 | 364 |
R2 | 0.154 | 0.175 |
Adjusted R2 | 0.147 | 0.161 |
Residual Std. Error | 12.822 (df = 360) | 12.718 (df = 357) |
F Statistic | 21.860*** (df = 3; 360) | 12.593*** (df = 6; 357) |
Note: | p<0.1; p<0.05; p<0.01 |
Dependent variable: | |||
delay | |||
OLS | instrumental | ||
variable | |||
(1) | (2) | (3) | |
temp | 0.079** | 0.164** | 0.041 |
(0.039) | (0.066) | (0.135) | |
wind | 0.285* | 0.237 | 0.250 |
(0.157) | (0.157) | (0.198) | |
precip | 15.255*** | 14.845*** | 15.335*** |
(2.013) | (2.004) | (2.034) | |
quarter2 | -2.060 | ||
(2.579) | |||
quarter3 | -6.755** | ||
(3.121) | |||
quarter4 | -4.408** | ||
(2.037) | |||
Constant | 6.152** | 5.246 | 8.577 |
(2.989) | (3.412) | (8.797) | |
Observations | 364 | 364 | 364 |
R2 | 0.154 | 0.175 | 0.152 |
Adjusted R2 | 0.147 | 0.161 | 0.145 |
Residual Std. Error | 12.822 (df = 360) | 12.718 (df = 357) | 12.839 (df = 360) |
F Statistic | 21.860*** (df = 3; 360) | 12.593*** (df = 6; 357) | |
Note: | p<0.1; p<0.05; p<0.01 |
Dependent variable: | |||
delay | delay | delay | |
OLS | OLS | instrumental | |
variable | |||
(1) | (2) | (3) | |
temp | 0.079** | 0.164** | 0.041 |
(0.039) | (0.066) | (0.135) | |
wind | 0.285* | 0.237 | 0.250 |
(0.157) | (0.157) | (0.198) | |
precip | 15.255*** | 14.845*** | 15.335*** |
(2.013) | (2.004) | (2.034) | |
quarter2 | -2.060 | ||
(2.579) | |||
quarter3 | -6.755** | ||
(3.121) | |||
quarter4 | -4.408** | ||
(2.037) | |||
Constant | 6.152** | 5.246 | 8.577 |
(2.989) | (3.412) | (8.797) | |
Observations | 364 | 364 | 364 |
R2 | 0.154 | 0.175 | 0.152 |
Adjusted R2 | 0.147 | 0.161 | 0.145 |
Residual Std. Error | 12.822 (df = 360) | 12.718 (df = 357) | 12.839 (df = 360) |
F Statistic | 21.860*** (df = 3; 360) | 12.593*** (df = 6; 357) | |
Note: | p<0.1; p<0.05; p<0.01 |
stargazer(output, output2, type = "html",
add.lines = list(c("Fixed effects?", "No", "No"),
c("Results believable?", "Maybe", "Try again later")))
Dependent variable: | ||
delay | ||
(1) | (2) | |
temp | 0.079** | 0.164** |
(0.039) | (0.066) | |
wind | 0.285* | 0.237 |
(0.157) | (0.157) | |
precip | 15.255*** | 14.845*** |
(2.013) | (2.004) | |
quarter2 | -2.060 | |
(2.579) | ||
quarter3 | -6.755** | |
(3.121) | ||
quarter4 | -4.408** | |
(2.037) | ||
Constant | 6.152** | 5.246 |
(2.989) | (3.412) | |
Fixed effects? | No | No |
Results believable? | Maybe | Try again later |
Observations | 364 | 364 |
R2 | 0.154 | 0.175 |
Adjusted R2 | 0.147 | 0.161 |
Residual Std. Error | 12.822 (df = 360) | 12.718 (df = 357) |
F Statistic | 21.860*** (df = 3; 360) | 12.593*** (df = 6; 357) |
Note: | p<0.1; p<0.05; p<0.01 |
Dependent variable: | ||
delay | ||
(1) | (2) | |
temp | 0.079** | 0.164** |
(0.002, 0.156) | (0.034, 0.294) | |
wind | 0.285* | 0.237 |
(-0.023, 0.594) | (-0.071, 0.545) | |
precip | 15.255*** | 14.845*** |
(11.310, 19.200) | (10.917, 18.773) | |
quarter2 | -2.060 | |
(-7.116, 2.995) | ||
quarter3 | -6.755** | |
(-12.872, -0.638) | ||
quarter4 | -4.408** | |
(-8.401, -0.416) | ||
Constant | 6.152** | 5.246 |
(0.293, 12.010) | (-1.442, 11.934) | |
Observations | 364 | 364 |
R2 | 0.154 | 0.175 |
Adjusted R2 | 0.147 | 0.161 |
Residual Std. Error | 12.822 (df = 360) | 12.718 (df = 357) |
F Statistic | 21.860*** (df = 3; 360) | 12.593*** (df = 6; 357) |
Note: | p<0.1; p<0.05; p<0.01 |
Dependent variable: | ||
delay | ||
(1) | (2) | |
temp | 0.079** | 0.164** |
(0.014, 0.144) | (0.055, 0.273) | |
wind | 0.285* | 0.237 |
(0.026, 0.544) | (-0.022, 0.496) | |
precip | 15.255*** | 14.845*** |
(11.944, 18.566) | (11.548, 18.141) | |
quarter2 | -2.060 | |
(-6.303, 2.182) | ||
quarter3 | -6.755** | |
(-11.889, -1.622) | ||
quarter4 | -4.408** | |
(-7.759, -1.058) | ||
Constant | 6.152** | 5.246 |
(1.235, 11.068) | (-0.367, 10.858) | |
Observations | 364 | 364 |
R2 | 0.154 | 0.175 |
Adjusted R2 | 0.147 | 0.161 |
Residual Std. Error | 12.822 (df = 360) | 12.718 (df = 357) |
F Statistic | 21.860*** (df = 3; 360) | 12.593*** (df = 6; 357) |
Note: | p<0.1; p<0.05; p<0.01 |
cov1 <- vcovHC(output, type = "HC1")
robust_se <- sqrt(diag(cov1))
# Adjust F statistic
wald_results <- waldtest(output, vcov = cov1)
stargazer(output, output, type = "html",
se = list(NULL, robust_se),
omit.stat = "f",
add.lines = list(c("F Statistic (df = 3; 360)", "12.879***", "7.73***")))
Dependent variable: | ||
delay | ||
(1) | (2) | |
temp | 0.079** | 0.079* |
(0.039) | (0.041) | |
wind | 0.285* | 0.285 |
(0.157) | (0.177) | |
precip | 15.255*** | 15.255*** |
(2.013) | (4.827) | |
Constant | 6.152** | 6.152** |
(2.989) | (3.074) | |
F Statistic (df = 3; 360) | 12.879*** | 7.73*** |
Observations | 364 | 364 |
R2 | 0.154 | 0.154 |
Adjusted R2 | 0.147 | 0.147 |
Residual Std. Error (df = 360) | 12.822 | 12.822 |
Note: | p<0.1; p<0.05; p<0.01 |
Dependent variable: | ||
delay | ||
(1) | (2) | |
temp | 0.079** (0.039) | 0.164** (0.066) |
wind | 0.285* (0.157) | 0.237 (0.157) |
precip | 15.255*** (2.013) | 14.845*** (2.004) |
quarter2 | -2.060 (2.579) | |
quarter3 | -6.755** (3.121) | |
quarter4 | -4.408** (2.037) | |
Constant | 6.152** (2.989) | 5.246 (3.412) |
Observations | 364 | 364 |
R2 | 0.154 | 0.175 |
Adjusted R2 | 0.147 | 0.161 |
Residual Std. Error | 12.822 (df = 360) | 12.718 (df = 357) |
F Statistic | 21.860*** (df = 3; 360) | 12.593*** (df = 6; 357) |
Note: | p<0.1; p<0.05; p<0.01 |
Dependent variable: | ||
delay | ||
(1) | (2) | |
temp | 0.079** | 0.164** |
(0.039) | (0.066) | |
wind | 0.285* | 0.237 |
(0.157) | (0.157) | |
precip | 15.255*** | 14.845*** |
(2.013) | (2.004) | |
Constant | 6.152** | 5.246 |
(2.989) | (3.412) | |
Observations | 364 | 364 |
R2 | 0.154 | 0.175 |
Adjusted R2 | 0.147 | 0.161 |
Residual Std. Error | 12.822 (df = 360) | 12.718 (df = 357) |
F Statistic | 21.860*** (df = 3; 360) | 12.593*** (df = 6; 357) |
Note: | p<0.1; p<0.05; p<0.01 |
Dependent variable: | ||
delay | ||
(1) | (2) | |
temp | 0.079** | 0.164** |
(0.039) | (0.066) | |
wind | 0.285* | 0.237 |
(0.157) | (0.157) | |
precip | 15.255*** | 14.845*** |
(2.013) | (2.004) | |
Constant | 6.152** | 5.246 |
(2.989) | (3.412) | |
Quarter dummies? | No | No |
Observations | 364 | 364 |
R2 | 0.154 | 0.175 |
Adjusted R2 | 0.147 | 0.161 |
Residual Std. Error | 12.822 (df = 360) | 12.718 (df = 357) |
F Statistic | 21.860*** (df = 3; 360) | 12.593*** (df = 6; 357) |
Note: | p<0.1; p<0.05; p<0.01 |
Dependent variable: | ||
delay | ||
(1) | (2) | |
temp | 0.079** | 0.164** |
(0.039) | (0.066) | |
wind | 0.285* | 0.237 |
(0.157) | (0.157) | |
precip | 15.255*** | 14.845*** |
(2.013) | (2.004) | |
quarter2 | -2.060 | |
(2.579) | ||
quarter3 | -6.755** | |
(3.121) | ||
quarter4 | -4.408** | |
(2.037) | ||
Constant | 6.152** | 5.246 |
(2.989) | (3.412) | |
Observations | 364 | 364 |
Adjusted R2 | 0.147 | 0.161 |
Residual Std. Error | 12.822 (df = 360) | 12.718 (df = 357) |
Note: | p<0.1; p<0.05; p<0.01 |
Dependent variable: | ||
delay | ||
(1) | (2) | |
temp | 0.079** | 0.164** |
(0.039) | (0.066) | |
wind | 0.285* | 0.237 |
(0.157) | (0.157) | |
precip | 15.255*** | 14.845*** |
(2.013) | (2.004) | |
quarter2 | -2.060 | |
(2.579) | ||
quarter3 | -6.755** | |
(3.121) | ||
quarter4 | -4.408** | |
(2.037) | ||
Constant | 6.152** | 5.246 |
(2.989) | (3.412) | |
Observations | 364 | 364 |
R2 | 0.154 | 0.175 |
Adjusted R2 | 0.147 | 0.161 |
Residual Std. Error | 12.822 | 12.718 |
F Statistic | 21.860*** | 12.593*** |
Note: | p<0.1; p<0.05; p<0.01 |
Dependent variable: | ||
delay | ||
(1) | (2) | |
temp | 0.079* | 0.164* |
(0.039) | (0.066) | |
wind | 0.285 | 0.237 |
(0.157) | (0.157) | |
precip | 15.255*** | 14.845*** |
(2.013) | (2.004) | |
quarter2 | -2.060 | |
(2.579) | ||
quarter3 | -6.755* | |
(3.121) | ||
quarter4 | -4.408* | |
(2.037) | ||
Constant | 6.152* | 5.246 |
(2.989) | (3.412) | |
Observations | 364 | 364 |
R2 | 0.154 | 0.175 |
Adjusted R2 | 0.147 | 0.161 |
Residual Std. Error | 12.822 (df = 360) | 12.718 (df = 357) |
F Statistic | 21.860*** (df = 3; 360) | 12.593*** (df = 6; 357) |
Note: | p<0.05; p<0.01; p<0.001 |
stargazer(output, output2, type = "html",
notes = "Sometimes you just have to start over.",
notes.append = FALSE,
notes.align = "l",
notes.label = "New note label")
Dependent variable: | ||
delay | ||
(1) | (2) | |
temp | 0.079** | 0.164** |
(0.039) | (0.066) | |
wind | 0.285* | 0.237 |
(0.157) | (0.157) | |
precip | 15.255*** | 14.845*** |
(2.013) | (2.004) | |
quarter2 | -2.060 | |
(2.579) | ||
quarter3 | -6.755** | |
(3.121) | ||
quarter4 | -4.408** | |
(2.037) | ||
Constant | 6.152** | 5.246 |
(2.989) | (3.412) | |
Observations | 364 | 364 |
R2 | 0.154 | 0.175 |
Adjusted R2 | 0.147 | 0.161 |
Residual Std. Error | 12.822 (df = 360) | 12.718 (df = 357) |
F Statistic | 21.860*** (df = 3; 360) | 12.593*** (df = 6; 357) |
New note label | Sometimes you just have to start over. |
Dependent variable: | ||
delay | ||
(1) | (2) | |
temp | 0,079** | 0,164** |
(0,039) | (0,066) | |
wind | 0,285* | 0,237 |
(0,157) | (0,157) | |
precip | 15,255*** | 14,845*** |
(2,013) | (2,004) | |
quarter2 | -2,060 | |
(2,579) | ||
quarter3 | -6,755** | |
(3,121) | ||
quarter4 | -4,408** | |
(2,037) | ||
Constant | 6,152** | 5,246 |
(2,989) | (3,412) | |
Observations | 364 | 364 |
R2 | 0,154 | 0,175 |
Adjusted R2 | 0,147 | 0,161 |
Residual Std. Error | 12,822 (df = 360) | 12,718 (df = 357) |
F Statistic | 21,860*** (df = 3; 360) | 12,593*** (df = 6; 357) |
Note: | p<0,1; p<0,05; p<0,01 |
Dependent variable: | ||
delay | ||
(1) | (2) | |
temp | 0.1** | 0.2** |
(0.04) | (0.1) | |
wind | 0.3* | 0.2 |
(0.2) | (0.2) | |
precip | 15.3*** | 14.8*** |
(2.0) | (2.0) | |
quarter2 | -2.1 | |
(2.6) | ||
quarter3 | -6.8** | |
(3.1) | ||
quarter4 | -4.4** | |
(2.0) | ||
Constant | 6.2** | 5.2 |
(3.0) | (3.4) | |
Observations | 364 | 364 |
R2 | 0.2 | 0.2 |
Adjusted R2 | 0.1 | 0.2 |
Residual Std. Error | 12.8 (df = 360) | 12.7 (df = 357) |
F Statistic | 21.9*** (df = 3; 360) | 12.6*** (df = 6; 357) |
Note: | p<0.1; p<0.05; p<0.01 |
CPGREN_log_f_d4 <- dataraw %>%
select(countryname, yearqtr, CPGREN, UNR) %>%
na.omit %>%
group_by(countryname) %>%
mutate(CPGREN_log_f = hpfilter(log(CPGREN), freq = 100000, type = "lambda")$cycle,
UNR_f = hpfilter(UNR, freq = 100000, type = "lambda")$cycle,
CPGREN_log_f_d4 = CPGREN_log_f - lag(CPGREN_log_f, 4)) %>%
ungroup %>%
lm(CPGREN_log_f_d4 ~ UNR_f, data = .)
HPI_RPI <- dataraw %>%
select(countryname, yearqtr, HPI_RPI, UNR) %>%
na.omit %>%
group_by(countryname) %>%
mutate(HPI_RPI_log_f = hpfilter(log(HPI_RPI), freq = 100000, type = "lambda")$cycle,
UNR_f = hpfilter(UNR, freq = 100000, type = "lambda")$cycle,
HPI_RPI_log_f_d4 = HPI_RPI_log_f - lag(HPI_RPI_log_f, 4)) %>%
ungroup %>%
lm(HPI_RPI_log_f_d4 ~ UNR_f, data = .)
RPI <- dataraw %>%
select(countryname, yearqtr, RPI, UNR) %>%
na.omit %>%
group_by(countryname) %>%
mutate(RPI_log_f = hpfilter(log(RPI), freq = 100000, type = "lambda")$cycle,
UNR_f = hpfilter(UNR, freq = 100000, type = "lambda")$cycle,
RPI_log_f_d4 = RPI_log_f - lag(RPI_log_f, 4)) %>%
ungroup %>%
lm(RPI_log_f_d4 ~ UNR_f, data = .)
if (knitr::is_html_output()) type <- "html" else type <- "latex"
stargazer(CPGREN_log_f_d4, HPI_RPI, RPI,
header = F,
df = F,
title = "\\textsc{Phillips Curve}",
dep.var.labels = c("Energy", "House Prices", "Rents"),
covariate.labels = "Unemployment",
intercept.bottom = FALSE,
omit.stat = c("f", "ser", "rsq"),
omit = "Constant",
style = "qje",
notes = "Panel of 35 OECD Countries. Standard-errors are clustered.",
notes.append = FALSE,
notes.align = "l",
notes.label = "Note:",
type = type)
Energy | House Prices | Rents | |
(1) | (2) | (3) | |
Unemployment | -0.247*** | -0.980*** | -0.723*** |
(0.069) | (0.073) | (0.042) | |
N | 4,987 | 4,049 | 4,444 |
Adjusted R2 | 0.002 | 0.043 | 0.062 |
Note: | Panel of 35 OECD Countries. Standard-errors are clustered. |