R-squared の事後分布
まず、R-squared 統計量の事後分布を求めて、モデルの予測力がどの程度になりそうかを推測できるようにしましょう。Spotify データを用いた stan_model はすでに読み込まれています。
この演習はコースの一部です
rstanarm で学ぶベイズ回帰モデリング
演習の手順
- R-squared 統計量の事後分布を計算します
- R-squared の分布のヒストグラムを作成します
実践的なインタラクティブ演習
このサンプルコードを完成させて、この演習に挑戦してみましょう。
# Calculate the posterior distribution of the R-squared
r2_posterior <- ___(stan_model)
# Make a histogram of the distribution
___(r2_posterior)