EDS 241: Environmental Policy Evaluation - Lab 1
────────────────────────────────────────────────────
(1)
───────────────────────────────────
(Intercept) 5.065 *** (0.079)
X1 1.492 *** (0.014)
───────────────────────────────────
N 10000
R2 0.547
logLik -27873.395
AIC 55752.791
────────────────────────────────────────────────────
*** p < 0.001; ** p < 0.01; * p < 0.05.
Column names: names, model1, NA
ggplot(forgraph , aes(x=n, y=beta1hat)) + geom_line(size=0.5, color="blue") +
geom_hline(yintercept=1.5, size=2, color="red") +
labs(x="n", y = "Beta1hat") +
ggthemes::theme_pander(base_size = 14)
ggsave(filename = "logo.png", width = 5, height = 4, units = "in", dpi = 300)
X2 = X1 +rnorm(bigN , mean=0 , sd=2.2)
Y <- 5 + 1.5*X1 + 10*X2 + u
population_data <- data.frame(X1, Y)
model1 <- lm(formula = Y ~ X1, data = population_data)
huxreg(model1, error_pos="right")
────────────────────────────────────────────────────
(1)
───────────────────────────────────
(Intercept) 4.960 *** (0.448)
X1 11.596 *** (0.077)
───────────────────────────────────
N 10000
R2 0.692
logLik -45267.984
AIC 90541.968
────────────────────────────────────────────────────
*** p < 0.001; ** p < 0.01; * p < 0.05.
Column names: names, model1, NA
ggplot(forgraph , aes(x=n, y=beta1hat)) + geom_line(size=0.5, color="blue") +
geom_hline(yintercept=1.5, size=2, color="red") +
labs(x="n", y = "Beta1hat") +
ggthemes::theme_pander(base_size = 14)