Wars begin, continue and end for a whole host of different reasons, but the personalities of the people in charge have a role to play. According to a new study there's an intriguing link between the characters of past US presidents and the length of time they went to war for.

Based on an analysis of the 19 presidents who served between 1897 and 2009 (from William McKinley to George W. Bush), the degree to which a commander in chief exhibited grandiose narcissistic personality traits is correlated with the duration of any wars they presided over.

With conflicts continuing to rage across the world today, the findings could be useful for politicians, analysts and military commanders in understanding how wars might play out. Before now, how the personalities of leaders influence war hasn't been fully explored.

"More narcissistic presidents tend to only exit wars if they can say they won, and they will extend wars to find a way to declare some kind of victory," says political scientist John P. Harden, from The Ohio State University.

"They want to look heroic and strong and competent – even if it means fighting the war beyond what is reasonable."

Harden used data pulled from the Correlates of War database, which tracks conflicts involving at least 1,000 deaths in battle within a one-year period – so 11 operations for the US during the study period.

This was cross-referenced with previous research that analyzed the characters of US presidents, in part through their biographers. High levels of assertiveness and excitement-seeking, and low levels of modesty, compliance and straightforwardness were used to measure narcissistic tendencies.

US chiefs who scored lower on narcissism, including McKinley and Eisenhower, tended to put the interests of the state first. Wars were pursued only as a last resort, and were ended as quickly as possible – see Eisenhower's quick exit from the Korean War, for example.

Those presidents who ranked higher for narcissism, such as Roosevelt and Nixon, were less likely to separate personal and state interests, carrying on conflicts for longer. For example, Nixon inherited the Vietnam War, and continued it for another four years.

Overall, the eight leaders who scored above average for narcissism (headed by Johnson and Roosevelt) spent an average of 613 days at war, as opposed to 136 days for the 11 presidents who were below average on narcissism (McKinley and Howard Taft scored the lowest in the test).

The relationship still holds, the study shows, even when other factors are taken into account – including the political climate in the US, the terrain the war is being fought on, the balance of power between combatants, and whether or not the president himself has prior military experience.

"What I found is that the traditional way political scientists have looked at war dynamics doesn't capture the whole story," says Harden.

"Presidents don't always look rationally at the evidence to make their wartime decisions. Many presidents have done that, but others are more interested in their own self-interest than the interest of the state."

Harden puts forward several suggestions for why narcissism might lead to presidents staying in conflicts for longer. They potentially have grander aims, and have higher expectations in terms of the end results of conflicts, for example.

They might also be overconfident in their strategies, leading to a lack of effectiveness in battle and periods of combat that go on for longer than they need to. Narcissists are also known to make mistakes when stressed, and tend not to adapt to failure as well.

Of course, there's no end to the number of influences on war – from the weather to the number of countries involved to the spirit of the troops – but the disposition of the person in charge could be a more important factor than previously thought.

"Narcissistic presidents spend more time worrying about their image than other presidents," says Harden.

"These motivations, especially their desire to protect their inflated self-image, cause them to drag out wars longer than needed."

The research has been published in the Journal of Conflict Resolution.