判定先驗分配
現在來探索貝氏模型的先驗分配,了解 rstanarm 如何處理先驗。先驗會對模型結果產生很大的影響,因此知道在已估計的模型中用了哪些先驗分配很重要。songs 資料集已經載入。
本練習屬於課程
使用 rstanarm 的貝葉斯迴歸建模
練習說明
- 估計一個以
song_age預測popularity的模型。 - 在畫面上列印先驗分配的摘要。
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Estimate the model
stan_model <- ___(___ ~ ___, data = songs)
# Print a summary of the prior distributions
___(stan_model)