Being happy is nice and all, but don't count on happiness to add years to your life — a new study finds that how happy you are doesn't seem to affect your risk of dying early.

The study did find that being unhappy was linked with an increased risk of early death, but it turned out that this was actually because people in poor health also tend to be unhappy. In other words, poor health, and not unhappiness, was the true cause of early death, the researchers said.

"Illness makes you unhappy, but unhappiness itself doesn't make you ill," study researcher Bette Liu, of the University of New South Wales in Australia, said in a statement. "We found no direct effect of unhappiness or stress on mortality." [7 Things That Will Make You Happy]

For the study, the researchers analyzed information from more than 700,000 U.K. women whose average age was 59. The researchers asked the women to rate their happiness, and then followed up with them for 10 years.

The researchers found that 39 percent of the women said they were happy most of the time, 44 percent said they were usually happy and 17 percent said they were usually unhappy.

The women who were unhappy were 29 percent more likely to die over the 10-year period, compared with the women who were happy most of the time.

However, poor health at the start of the study was strongly associated with unhappiness, and the researchers found that, after they took into account the women's health, the link between unhappiness and early death went away.

The study also found that some unhealthy habits, such as smoking, were linked with unhappiness, which also partly explained the link between unhappiness and early death.

"Many still believe that stress or unhappiness can directly cause disease, but they are simply confusing cause and effect," Richard Peto, a co-author of the study and a professor ofmedical statistics and epidemiology at the University of Oxford in the United Kingdom, said in a statement. The new study "shows that happiness and unhappiness do not themselves have any direct effect on death rates."

Because the study included only women, it's not clear whether the results apply to men as well. In fact, previous studies suggested that men and women may define happiness differently and that it's possible that happiness may be linked more strongly with an early death among men, Philipe de Souto Barreto and Yves Rolland, of the Institute of Ageing at University Hospital of Toulouse in France, wrote in an editorial accompanying the study in the journal.

More research is needed in both men and women, as well as in children and older adults, to examine the link between happiness and health, they said.

Follow Rachael Rettner @RachaelRettner. Follow Live Science @livescience, Facebook & Google+. Original article on Live Science.