Saraswathi Analytics provides Visual Analytics Week 9 solution (Visual Analytics - 202051 - CRN140).

Working with Models

  1. 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.
  2. In a paragraph compare and contrast the smoother types. LOESS, Cubic Spline, and OLS 3. Look at the gapminder data with str()
  3. 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’.
  4. print a summary of out.
  5. notice that printing a summary of gapminder will produce different results because summary() knows that out is the output of a linear model.
  6. 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..
  7. 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.
  8. Use cbind() to bind the two data frames together by column.
  9. Look at the top six rows of the result with head()
  10. make an OLS plot the combined dataframes after subsetting continent to Africa and Europe using geom_ribbon to show the prediction intervals.
  11. What does the alpha aesthetic do?

Submit a Word document by Sunday at midnight with screen shots of your work and text. Explain what each image is.

Note:

  • Only for knowledge gain and helping to the students(who are facing difficulties when solving to the Assessments/ Home works) with their course support.

Contact Us: