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

Fitting a frequentist linear regression

Practice creating a linear model using data on songs from Spotify. This will give us base line to compare our Bayesian model to. The songs dataset is already loaded for you.

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

Bayesian Regression Modeling with rstanarm

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

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

  • Create a linear model, lm_model, that predicts song popularity from song age.
  • Print a summary of the linear model.
  • Use the broom package to view only the coefficients.

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

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

# Create the model here
lm_model <- lm(___ ~ ___, data = ___)

# Produce the summary
___(lm_model)

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