Exercise 2
1
- Item 1
- Item 2
- Item 1.2
2
| Variable 1 | Variable 2 | Variable 3 |
|---|---|---|
| Content 1 | Content 2 | Content 3 |
3
This is a sentence Sharma (2011, 3)
4
knit
Exercise 3 1
library(ggplot2)
## Warning: Paket 'ggplot2' wurde unter R Version 4.2.3 erstellt
emission_data_lm <- read.csv("./Data/emission_data_lm.csv")
ggplot(mapping = aes(x = renewables), data = emission_data_lm) +
geom_histogram(fill = "green", binwidth = 1) +
theme_bw()
2
model <- lm(co2_pc ~ gdp_pc + city + renewables,
data = emission_data_lm)
summary(model)
##
## Call:
## lm(formula = co2_pc ~ gdp_pc + city + renewables, data = emission_data_lm)
##
## Residuals:
## Min 1Q Median 3Q Max
## -16.283 -2.116 -0.381 1.183 34.097
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.477e+00 2.060e-01 7.173 8.38e-13 ***
## gdp_pc 1.140e-04 3.434e-06 33.191 < 2e-16 ***
## city 6.428e-02 2.978e-03 21.588 < 2e-16 ***
## renewables -5.254e-02 2.069e-03 -25.388 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 3.755 on 5264 degrees of freedom
## Multiple R-squared: 0.5277, Adjusted R-squared: 0.5275
## F-statistic: 1961 on 3 and 5264 DF, p-value: < 2.2e-16
3
library(modelsummary)
## Warning: Paket 'modelsummary' wurde unter R Version 4.2.3 erstellt
modelsummary(model,
estimate = "{estimate}{stars}",
title = "Output")
| (1) | |
|---|---|
| (Intercept) | 1.477*** |
| (0.206) | |
| gdp_pc | 0.000*** |
| (0.000) | |
| city | 0.064*** |
| (0.003) | |
| renewables | -0.053*** |
| (0.002) | |
| Num.Obs. | 5268 |
| R2 | 0.528 |
| R2 Adj. | 0.527 |
| AIC | 28896.5 |
| BIC | 28929.3 |
| Log.Lik. | -14443.245 |
| F | 1960.838 |
| RMSE | 3.75 |
4
Questionable, for eyample, year and country specific effects are not considered
Sharma, Susan Sunila. 2011. “Determinants of Carbon Dioxide
Emissions: Empirical Evidence from 69 Countries.” Applied
Energy 88 (1): 376–82. https://doi.org/10.1016/j.apenergy.2010.07.022.