Highlights
Question
1. Import the world.csv dataset into R. (Hint: make sure that you import it into R in a way that works for R Markdown. That is, if you select the .csv file directly from the lower right part of RStudio, the .Rmd file may not knit correctly. If that is a problem, look at the code that the R console outputs when you import a dataset this way, i.e., the file path that it displays, then copy that code into your .Rmd file so it loads correctly when knitting. You must complete this step to get full credit on this question.)
2. What is the unit of analysis in this dataset? (Make sure you display any code and output you use to determine this. If you determine it some other way, make sure to explain how you figured it out. Hint: The unit of analysis is essentially what makes each row unique or different from one another.)
3. Create two new dataframes: one should be a subset of countries that were UK colonies, the other should be a subset of countries that were either Spanish or Portuguese colonies. Make sure that you assign names to the new dataframes.
4. Ethnic factionalization measures whether a country has lots of different linguistic, ethnic and racial groups or relatively low numbers of such groups (i.e., more homogeneous groups). What type of variable is frac eth, and how can you tell? In this dataset, do higher values point towards more factionalization or less? How can you tell?
5. Using the two subsets you created above and the frac eth variable, create (and display) two boxplots displaying this variable: one for countries that were UK colonies and one for countries that were either Spanish or Portuguese colonies. The following features must be true of these boxplots:
The boxplots should be displayed one above the other in the same frame/figure.
The titles and x-axes must be informative and appropriate for the given figures. Make the box-plots look nice by using different colors (or making any other aesthetic choices that you want) to make the figure more informative and easier to understand.
The x-axis range and scale for both boxplots must be the same so that their x-axis values align visually and can be looked at clearly. Make sure to define the limits and breaks in an informative and reasonable way.
6. Using only the boxplots you have displayed above, compare the distribution of the frac eth variable between the two subsets. In doing so, make sure you think about at least the median, the IQR, the range, and the likely spread of data. (Note that the question is not asking you to simply describe this for each subset but, rather, to compare these for the two.)
7. Create a new variable using a nested ifelse() function called womyear ordinal, which should be attached to the existing dataset and will be based on the variable called womyear. This new variable should be coded as “early” if women gained enfranchisement within the first quartile of the womyear variable, “middle” if they gained enfranchisement after the first quartile year but before the third quartile year, and “late” if enfranchisement was granted to women in the third quartile year or later. Next, output a summary of how many observations fall in each category for your new variable. Finally, in a few sentences, explain in your own words how you coded this new variable, i.e., if you were explaining the code to someone unfamiliar with the ifelse() function, how would you explain what you have done here? (When coding, be careful about the missing values in the variable! And, in your explanation, remember that you are explaining this to another person rather than writing instructions for a software.)
This GV900 - Political Science Assignment Help has been solved by our Political Science Experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.