Question: 1 . Make all the obvious visual interpretation and explain each boxplot in detail. 2 . Do statistical tests between groups that are not very
Make all the obvious visual interpretation and explain each boxplot in detail.
Do statistical tests between groups that are not very obviously different:
ie sample t test between europe and africa, anova for all the groups
Remember to log transform or remove outliers to make tests more accurate
CODE IN R:
librarytidyverse
libraryggplot
# Change the file directories!!
countrymetadata readcsvcountrymetadata.csv
education education
pivotlongercols : namesto 'year'
fulljoincountrymetadata:
filterisnavalue
filterisnaRegion
filterisnaIncomeGroup # Run this again to filter venezuela
# Log transform to handle outliers
education$logvalue logeducation$value
educationdecade education
filteryear in c:
# Label data as male or female, filter data pertaining to gender
educationmf education
mutatemaleorfemale casewhen
strdetectIndicator Name male' ~ 'male',
strdetectIndicator Name 'female' ~ 'female'
filterisnamaleorfemale
# Perform sample ttest between Europe and Africa
ttestresult ttesteducationmf$value ~ educationmf$Region,
subseteducationmf Region in cEurope "Africa"
# Perform ANOVA for all groups
anovaresult aovvalue ~ Region, data educationmf
# Print results
printSample ttest between Europe and Africa:"
printttestresult
printANOVA Test for all groups:"
printanovaresult
# Indicator: Adjusted net enrollment by income group and region
educationmf
filterstrdetectIndicator Name 'Adjusted net enrollment rate'
ggplot geomboxplotaesx value, fill IncomeGroup
facetwrap ~ maleorfemale
ggtitleAdjusted net enrollment rate by income group'
xlabAdjusted net enrollment
scaleycontinuousbreaks NULL, labels NULL
educationmf
filterstrdetectIndicator Name 'Adjusted net enrollment rate'
ggplot geomboxplotaesx value, fill Region
facetwrap ~ maleorfemale
ggtitleAdjusted net enrollment rate by region'
xlabAdjusted net enrollment
scaleycontinuousbreaks NULL, labels NULL
# Indicator: Repeaters by income group and region
educationmf
filterstrdetectIndicator Name 'Repeaters'
ggplot
geomboxplotaesx value, fill IncomeGroup
facetwrap ~ maleorfemale
ggtitleRepeaters by income group'
xlabRepeaters
scaleycontinuousbreaks NULL, labels NULL
educationmf
filterstrdetectIndicator Name 'Repeaters'
ggplot
geomboxplotaesx value, fill Region
facetwrap ~ maleorfemale
ggtitleRepeaters by region'
xlabRepeaters
scaleycontinuousbreaks NULL, labels NULL
# Indicator: Trained teachers by income group and region
educationmf
filterstrdetectIndicator Name 'Trained teachers'
ggplot
geomboxplotaesx value, fill IncomeGroup
facetwrap ~ maleorfemale
ggtitleTrained teachers by income group'
xlabTrained teachers
scaleycontinuousbreaks NULL, labels NULL
educationmf
filterstrdetectIndicator Name 'Trained teachers'
ggplot
geomboxplotaesx value, fill Region
facetwrap ~ maleorfemale
ggtitleTrained teachers by region'
xlabTrained teachers
scaleycontinuousbreaks NULL, labels NULL
# Indicator: Literacy rate by income group and region
educationmf
filterstrdetectIndicator Name 'Literacy rate'
ggplot
geomboxplotaesx value, fill IncomeGroup
facetwrap ~ maleorfemale
ggtitleLiteracy rate by income group'
xlabLiteracy rate
scaleycontinuousbreaks NULL, labels NULL
educationmf
filterstrdetectIndicator Name 'Literacy rate'
ggplot
geomboxplotaesx value, fill Region
facetwrap ~ maleorfemale
ggtitleLiteracy rate by region'
xlabLiteracy rate
scaleycontinuousbreaks NULL, labels NULL
# Indicator: Unemployment by income group and region
educationmf
filterstrdetectIndicator Name 'Unemployment'
ggplot
geomboxplotaesx value, fill IncomeGroup
facetwrap ~ maleorfemale
ggtitleUnemployment by income group'
xlabUnemployment
scaleycontinuousbreaks NULL, labels NULL
educationmf
filterstrdetectIndicator Name 'Unemployment'
ggplot
geomboxplotaesx value, fill Region
facetwrap ~ maleorfemale
ggtitleUnemployment by region'
xlabUnemployment
scaleycontinuousbreaks NULL, labels NULL
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
