BaşlayınÜcretsiz Başlayın

What 's the value added?

The problem of bad model predictions is still an open issue. This time, you investigate the relation between log(SALES) and PRICE. The corresponding scatterplot is created using the formula argument log(SALES) ~ PRICE in the plot() function. Again, the model predictions obtained from the log.model are graphed using the abline() function. The abline() function adds a straight line specified in log-sales intercept/ price slope form when applied to the log.model object .

Bu egzersiz

Building Response Models in R

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Display the relation between log(SALES) and PRICE in a simple scatterplot.
  • Again, explain log(SALES) by PRICE and assign the result to an object named log.model.
  • Add the model predictions by applying the function abline() to the log.model object.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Plot log(SALES) against PRICE
___(___, data = sales.data)

# Explain log(SALES) by PRICE
log.model <- ___(___, data = sales.data)

# Add the model predictions
Kodu Düzenle ve Çalıştır