ComeçarComece de graça

Scatter and points

An ideal way to start assessing the data for a regression is creating a scatter plot.

A company has gathered the amount of time users of their website spend checking out items, Time and are interested in how this impacts the amount of time their users search on the site each day, TimeSearching, with a particular interest in knowing how much time a user spends on the site when they spent 17 minutes checking out items.

The webdata dataset has been loaded for you.

Este exercício faz parte do curso

A/B Testing in R

Ver curso

Instruções do exercício

  • Load the ggplot2 package to create plots.
  • Use the regression line formula to determine and store the amount of time spent on the site daily when a user spends 17 minutes on the Internet daily as yhat given a y-intercept of 14.97 and slope of 0.42.
  • Create a scatter plot fitting for assessing the impact of Time on TimeSearching, including intersecting lines at 17 time and the predicted amount of time spent on the site daily.

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

# Call the ggplot package
___

# Derive predicted value
yhat <- ___

# Create the scatter plot
ggplot(___) + 
    ___ + 
    ___ + 
    ___
Editar e executar o código