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

Calculating residuals from regression

Your previous model that predicts the log of sales from the log of price along with holiday and promotion effects is saved in the model_MET_hi_full object. Your data frame that has the data that built this model is in the object MET_hi_train. Now let's see where we went wrong.

Bu egzersiz

Forecasting Product Demand in R

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

Egzersiz talimatları

  • Calculate the residuals from the model model_MET_hi_full and save as MET_hi_full_res.
  • Convert these residuals into an xts object. Remember your date index is stored as dates_train.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Calculate the residuals from the model
MET_hi_full_res <- ___(___)

# Convert the residuals to an xts object
MET_hi_full_res <- xts(___, order.by = ___)
Kodu Düzenle ve Çalıştır