- Return to the visualization for Presidential Elections: Popular and Electoral College margins, subset by party, and use that to add color to your points.
- Recreate figures 5.28 using functions from the dplyr library.
- Using gss_sm data, calculate the mean and median number of children by degree
- Using gapminder data, create a boxplot of life expectancy over time
- Using gapminder data, create a violin plot of population over time.
- Using the gapminder data, create a plot comparing log(gdp PerCa with Life Exp and show three different smoothers in three different colors with a legend showing each smoother type.
- In a paragraph compare and contrast the smoother types. LOESS, Cubic Spline, and OLS
- Look at the gapminder data with str()
- Create a linear model of the gapminder data with life expectancy as the target of a multifactor model built from gdpPercap, pop, and continent. Store it in a variable called ‘out’.
- print a summary of out.
- notice that printing a summary of gapminder will produce different results because summary() knows that out is the output of a linear model.
- Use min() and max() to get the minimum and maximum values of per capita GDP and create a vector of 100 evenly spaced elements between them while holding population constant at it’s median and showing the values by continent using a vector..
- use predict() to calculate the fitted values for evey row in the dataframe and show the upper and lower bounds of a 95% confidence interval. Store the result in a variable predi_out.
- Use cbind() to bind the two data frames together by column.
- Look at the top six rows of the result with head()
- make an OLS plot the combined dataframes after subsetting continent to Africa and Europe using geom_ribbon to show the prediction intervals.
- What does the alpha aesthetic do?
R Question
24/7 Homework Help
Stuck on a homework question? Our verified tutors can answer all questions, from basic math to advanced rocket science!
Hire a competent writer to help you with
R Question
troublesome homework
OR