未調整的先驗
現在來指定一個不使用調整後尺度(adjusted scales)的先驗分配模型,以改變 rstanarm 的預設行為。這能讓你更直接地掌控投入估計的資訊。songs 資料已經載入。
本練習屬於課程
使用 rstanarm 的貝葉斯迴歸建模
練習說明
- 以
song_age預測popularity - 指示
rstanarm不要自動調整參數尺度(autoscale) - 列印先驗摘要,以確認沒有進行任何調整
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Estimate the model with unadjusted scales
no_scale <- stan_glm(popularity ~ song_age, data = songs,
___ = normal(___ = FALSE),
___ = normal(___ = FALSE),
___ = exponential(___ = FALSE)
)
# Print the prior summary
___(no_scale)