НачатьНачать бесплатно

Fitting a Bayesian linear regression

Practice fitting a Bayesian model. This is the same model we already estimated with frequentist methods, so we'll be able to compare the parameter outputs later. The songs data is already loaded.

Это упражнение является частью курса

Bayesian Regression Modeling with rstanarm

Посмотреть курс

Инструкции к упражнению

  • Create a Bayesian linear model, stan_model, that predicts song popularity from song age
  • Print a summary of the Bayesian linear model

Интерактивное практическое упражнение

Попробуйте выполнить это упражнение, дополнив этот пример кода.

# Create the model here
stan_model <- ___(___ ~ ___, data = songs)

# Produce the summary
___(stan_model)

# Print a tidy summary of the coefficients
___(stan_model)
Редактировать и запускать код