In previouslyindependent individuals , cognitive impairment was common 3months after stroke and related to increasing age , stroke severity , hypertension , atrial fibrillation , and cerebral atrophy on brain scanning .