Ken makes some good points.

For a war of choice - like Iraq or Grenada- the two relevant questions are:

What's the worst case scenario?
Are you prepared for the worst scenario?

When you're attacked, pride pretty much demands that you respond.

Complicated analysis is only required when you get in a game of chicken: Iran. Diplomatic factors must be considered too. Since the cost of war is high, there is almost always a deal that is better for both sides than war, but obviously some governments are too stupid or too egomanical or too deluded about their military abilities or too idealogical or have other agendas, to take it.