Question
Researchers have theorized that natural resources may have an inhibiting effect on the democratization process. Although there are multiple explanations as to why this might
Researchers have theorized that natural resources may have an inhibiting effect on the democratization process. Although there are multiple explanations as to why this might be the case, one hypothesis posits that governments in countries with large natural resource endowments (like oil) are able to fund their operations without taxing civilians. Since representation (and other democratic institutions) are a compromise offered by governments in exchange for tax revenue, resource-rich countries do not need to make this trade. In this exercise, we will not investigate causal effects of oil on democracy. Instead, we examine whether the association between oil and democracy is consistent with the aforementioned hypothesis. This exercise is in part based on Michael L. Ross. (2001). 'Does Oil Hinder Democracy?' *World Politics*,53:3, pp.325-361. The data set is in the csv file `resources.csv`. The names and descriptions of variables are: ------------------------------------------------------------------------------- Name Description -------------------- --------------------------------------------------------- `cty_name` Country name `year` Year `logGDPcp` Logged GDP per capita `regime` A measure of a country's level of democracy: -10 (authoritarian) to 10 (democratic) `oil` Amount of oil exports as a percentage of the country's GDP `metal` Amount of non-fuel mineral exports as a percentage of the country's GDP `illit` Percentage of the population that is illiterate `life` Life expectancy in the country -------------------------------------------------------------------------------
Question 1. Use scatterplots to examine the bivariate relationship between logged GDP per capita and life expectancy as well as between logged GDP per capita and illiteracy. Be sure to add informative axis labels. Also, compute the correlation separately for each bivariate relationship. Briefly comment on the results.
```{r} resources <- read.csv("https://sanghoonkim.org/FQM/resources.csv") library(ggplot2) ggplot(resources) + geom_point(aes(x=resources$logGDPcp, y=resources$life, yab = "Life Expectancy", xlab = "Logged GDP per capita")) ggplot(resources) + geom_point(aes(x=resources$logGDPcp, y=resources$illit, ylab="Illiteray Rate", xlab = "Logged GDP Per Capita")) #Correlating cor(resources$logGDPcp, resources$life, use = "complete.obs") cor(resources$logGDPcp, resources$illit, use = "complete.obs") ```
Need help with question 2
help with creating a subset that includes the following three countries: Benin, Spain, and Turkey. Also creating a line plot showing temporal trends in regime category across the three countries. The horizontal axis should represent year and the vertical axis represent regime type.
Need help with question 3
Using bar plots to show variation in regime type across countries. Be sure to use an aggregate value of regime category by averaging the variable across all the time periods included in the dataset. - *Optional*: Color each country bar: color positive regime scores in "blue" and negative scores in "red."
Sample of dataset resources is below. Unable to add entire data but it has different countries in it.