Mental health and cognitive function in adults aged 18 to 92 years.