Running is based on your Agility vs the enemy's Agility. Each time you try to run from a battle and fail, your chance of escaping on your next attempt increases by about 20% for the duration of the encounter.