预测得分分布
现在让我们练习使用后验预测得分,来查看我们的 Spotify 模型与真实数据的拟合情况。
本练习是课程的一部分
使用 rstanarm 进行贝叶斯回归建模
练习说明
- 计算
stan_model的后验预测得分 - 打印
songs数据中观测到的人气得分摘要 - 将其与第 1 次和第 10 次重复的摘要进行比较
交互式实操练习
通过完成这段示例代码来试试这个练习。
# Calculate posterior predictive scores
predictions <- ___(stan_model)
# Print a summary of the observed data
summary(songs$___)
# Print a summary of the 1st replication
summary(predictions[___,])
# Print a summary of the 10th replication
summary(predictions[___,])