If your current Speed is equal to or greater than the enemy, you will always get away (I have never failed to run from a Transformed Ditto). Below that, I'm not sure if it's always the same chance or it varies depending on how much slower you are.
Better rods seem to have a lower chance of catching something, but I haven't formally tested this.
Necrosaro's wild battle lists have a "density" value for how often you will encounter a wild Pokemon in an area. They seem to be a fraction of 256. For example, if the density was 25, then you would have a 9.8% chance of finding a wild Pokemon with each step.
"If you're walking alone in the forest, and a tree falls on you, do you make a sound?"
-- The Confused Philosopher