Relationship between cognitive ability, health-related quality of life, and mood states in elderly people