Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Dataset: Gapminder data Description: Excerpt of the Gapminder data on life expectancy, GDP per capita, and population by country. Variables: ( i ) Country (
Dataset: Gapminder data
Description: Excerpt of the Gapminder data on life expectancy, GDP per capita, and population by country.
Variables:
i Country
ii Continent
iiiyear: ranges from to in increments of years
iv lifeExp: life expectancy at birth, in years
v pop: population
vi gdpPercap: GDP per capita US$ inflationadjusted
Using the 'Gapminder' dataset, filter the data for the year and create a new variable gdpcategory' based on GDP per capita. Classify countries into three categories: 'Low, 'Medium, and 'High' based on the following criteria:
'Low' if GDP per capita is less than
'Medium' if GDP per capita is between inclusive and exclusive
'High' if GDP per capita is or more.
Write a script to perform these operations and provide a brief explanation of your approach.
Using the filtered 'gapminder' dataset for the year and the previously created gdpcategory' variable, conduct a detailed comparative analysis of life expectancy across different GDP categories. Hint: Only use appropriate graphics andor descriptive statistics to help you achieve this.
Generate an appropriate plot to explore the evolution of life expectancy across any five selected countries, with each country representing one continent. Utilize the 'gapminder' dataset for this analysis. USING R STUDIO
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started