library(vdemdata)
modelData <- vdem %>%
filter(year == 2019) %>%
select(country_name, v2x_libdem, e_gdppc) %>%
mutate(lg_gdppc = log(e_gdppc))
glimpse(modelData)
Rows: 179
Columns: 4
$ country_name <chr> "Mexico", "Suriname", "Sweden", "Switzerland", "Ghana", "…
$ v2x_libdem <dbl> 0.434, 0.580, 0.871, 0.866, 0.615, 0.607, 0.755, 0.260, 0…
$ e_gdppc <dbl> 16.814, 11.752, 48.804, 56.110, 5.608, 11.345, 39.061, 5.…
$ lg_gdppc <dbl> 2.8222119, 2.4640234, 3.8878123, 4.0273140, 1.7241941, 2.…