More people are dying alone than ever before, and sociologists say widespread loneliness is to blame. A new study, published Tuesday in the Journal of Neurology, Neurosurgery & Psychiatry, doubles down on the perils of being alone in old age, showing that widowers and lifelong singletons are at a higher risk of developing dementia — the progressive, debilitating decline in memory and cognitive skills — than married people.

The team of United Kingdom scientists behind the paper draw their discouraging conclusion after analyzing 15 studies that examined self-reported health and relationship data from 812,047 participants. This diverse pool included married, widowed, divorced, and single people from Europe, North and South America, and Asia.

According to the study, lifelong singletons are 42 percent more likely to develop dementia compared to people who are married. Widowed people, meanwhile, are 20 percent more likely to develop dementia than married people, but the strength of this association decreases when widowers have higher levels of education.

The dementia risks of divorced people, in contrast, isn’t any different from that of married people.

New study says single people are more likely to develop dementia than married people.

Despite these depressing numbers, the authors point out that things could be a lot worse. The risk of dementia for lifelong single people has actually decreased over time, with more recent studies finding smaller associations between being single and dementia.

Scientists don’t really have a good explanation for why married couples have a lower chance of developing dementia, but the study authors hypothesize that marriage leads couples to live healthier lifestyles, complete with better diets and more exercise.

“Marital status has potential to affect dementia risk by increasing daily social interaction,” the researchers write.

“This may improve cognitive reserve, meaning that an individual has a greater ability to cope with neuropathological damage by using compensatory cognitive approaches from a physically more resilient brain to maintain cognitive ability and daily function.”

Marriage may result in more social contact, says a new study, which is associated with reduced dementia risk.

The increased likelihood of developing dementia among widows, in contrast, may be a result of their grief. Bereavement, understandably, boosts stress levels, which in turn impairs nerve signaling and cognitive abilities. Previous research has determined that widowhood is more stressful than divorce, so this perhaps explains why dementia risk is higher among widowed people rather than divorced people.

Fortunately, not all studies find that married people are healthier than single people. A 2017 analysis of a 16-year survey of 11,000 Swiss adults, described by The New York Times as “perhaps the most definitive research ever conducted on the health implications of marriage,” showed that married people had slightly worse health than single people — and grew unhealthier with age. When it came to illnesses, people who were married were no more or less likely to become ill than single people.

Additionally, a 2015 study pointed out that single people are more likely to stay in touch with and provide help to friends and family than their married counterparts, boosting their social lives and calling into question the idea that they develop dementia out of loneliness.

Whether or not actually having a romantic partner in old age makes a difference in whether you’ll develop dementia, the study authors note that the role of three factors — education, physical health, and social engagements — deserves a closer look. The old adage “happy wife, happy life” may have some truth to it, but there are a lot of other things that can make you happy, too.