Got the blues? Go to church.

A new study in the Journal of Religion and Health suggests that ― at least for some women of a certain age ― there’s a link between optimism and attendance at religious services.

“We looked at the religious practices of nearly 100,000 women and ― like it or not ― found a strong connection between going to church or synagogue or any other house of worship and a positive outlook on life,” said Eliezer Schnall, clinical associate professor of psychology at Yeshiva University.

Those who attended services frequently were 56 percent more likely to have an optimistic outlook than those who did not, and were 27 percent less likely to be depressed, according to the study.

Schnall’s research, which focused on post-menopausal women, is far from the first to associate church attendance and happiness. But it cements previous work that seems to show that those who engage in communal religious services are better able to cope in life.

Past studies have noted, however, that it seems friendships formed at services, rather than the worship itself, are more strongly correlated with happiness.

In a 2010 study, Chaeyoon Lim, a sociologist at the University of Wisconsin, Madison, found that people who say they go to church every week but say they have no close friends there are not any happier than people who never go to church.