Researchers from University of Nottingham in the UK examined several psychological and behavioural factors that have been shown to affect how well vaccinations work.
"We have known for many years that a number of psychological and behavioural factors such as stress and diet influence how well the immune system works and these factors have also been shown to influence how well vaccines protect against disease," said Kavita Vedhara, professor at University of Nottingham.
The team measured negative mood, positive mood, physical activity, diet and sleep three times a week over a six week period in a group of 138 older people due to have their flu jab.
Researchers found that of all the factors measured, only positive mood over the six week observational period predicted how well the jab worked - with good mood associated with higher levels of antibody.
More From This Section
When looking at influences on the day of vaccination itself, the study, published in the journal Brain, Behavior and Immunity, found an even greater effect on how well good mood worked, accounting for between eight and 14 per cent of the variability in antibody levels.
People with less effective immune systems, such as the elderly, may find vaccines do not work as well for them as they do in the young, they added.