survey_data$high_satisfaction <- as.integer(survey_data$life_satisfaction > 3)
result <- logistic_regression(survey_data, high_satisfaction ~ age + income)
result # compact one-line overview
summary(result) # full detailed output
Run the code above in your browser using DataLab