# Example 1: Severe Depression
# All items scored 4 or 5
major_depression_index(5, 5, 4, 4, 5, 2, 4, 5, 0, 4, 0, 5)
# Example 2: Mild Depression
# Scores around 2 or 3
major_depression_index(2, 3, 2, 2, 1, 0, 2, 2, 0, 3, 3, 0)
Run the code above in your browser using DataLab