Die LOO-Schätzung berechnen
Üben wir jetzt die Verwendung des loo-Pakets an unserem Spotify-Modell, um herauszufinden, welches Modell am besten zu unseren Daten passt. Der Datensatz songs ist bereits geladen.
Diese Übung ist Teil des Kurses
<Kurs>Bayesianische Regressionsmodellierung mit rstanarm</Kurs>Übungsanweisungen
- Schätze ein Modell, das
popularityaussong_agevorhersagt - Gib die LOO-Approximation für dieses Modell mit 1 Prädiktor aus
- Schätze ein Modell, das
popularityaussong_age,artist_nameund ihrer Interaktion vorhersagt - Gib die LOO-Approximation für dieses Modell mit 2 unabhängigen Variablen aus
Interaktive praktische Übung
Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.
# 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)