Calcularea estimării LOO
Acum hai să exersăm utilizarea pachetului loo pe modelul nostru Spotify, pentru a determina care model se potrivește cel mai bine datelor noastre. Setul de date songs este deja încărcat.
Acest exercițiu face parte din cursul
Modelare de regresie bayesiană cu rstanarm
Instrucțiuni pentru exercițiu
- Estimează un model care prezice
popularitype bazasong_age - Afișează aproximarea LOO pentru acest model cu 1 predictor
- Estimează un model care prezice
popularitype bazasong_age,artist_nameși interacțiunea dintre ele - Afișează aproximarea LOO pentru acest model cu 2 variabile independente
Exercițiu interactiv practic
Încearcă acest exercițiu completând acest cod de exemplu.
# 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)