Cognitive impairments predict the behavioral and psychological symptoms of dementia