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

Calculating the LOO estimate

Now let's practice using the loo package on our Spotify model so that we can determine which model provides the best fit to our data. The songs dataset is already loaded.

Bu egzersiz

Bayesian Regression Modeling with rstanarm

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

Egzersiz talimatları

  • Estimate a model predicting popularity from song_age
  • Print the LOO approximation for this model with 1 predictor
  • Estimate a model predicting popularity from song_age, artist_name, and their interaction
  • Print the LOO approximation for this model with 2 independent variables

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Estimate the model with 1 predictor
model_1pred <- ___(___ ~ ___, data = songs)

# Print the LOO estimate for the 1 predictor model
___(model_1pred)

# Estimate the model with both predictors
model_2pred <- ___(___ ~ ___ * ___, data = songs)

# Print the LOO estimates for the 2 predictor model
___(model_2pred)
Kodu Düzenle ve Çalıştır