Depression is often accompanied by slowing of thought and difficulty in maintaining attention.  This can also be in part due to lack of interest.   This often leads to a misdiagnosis of dementia in the older person.