推定設定を変更する
ここでは、発生しうるエラーに対処できるよう、推定のオプションを変更してみます。こうしたエラーが出た場合は、妥当な推論ができていることを確認するためにも解消することが重要です。songs データはすでに読み込まれています。
この演習はコースの一部です
rstanarm で学ぶベイズ回帰モデリング
演習の手順
song_ageからpopularityを予測するモデルを2つ推定します- 1つ目のモデルでは、
adapt_deltaを 0.99 に設定します - 2つ目のモデルでは、
max_treedepthを 15 に設定します - 各モデルのサマリーを表示します
実践的なインタラクティブ演習
このサンプルコードを完成させて、この演習に挑戦してみましょう。
# Estimate the model with a new `adapt_delta`
adapt_model <- ___(popularity ~ song_age, data = songs,
___ = list(___ = ___))
# View summary
___(adapt_model)
# Estimate the model with a new `max_treedepth`
tree_model <- ___(popularity ~ song_age, data = songs,
___ = list(___ = ___))
# View summary
___(tree_model)