Danger increases with proximity.
It seems a tad more complex than that, at ranges where enemy spread is smaller than your body, it makes more sense to be closer in, so that they have to move their sight more and re-aim more often because of you running circles round them, also when you cover weave, at shorter ranges they have a larger area of the screen to watch for places you could come out.
Personally, I'm much better at predicting movement and dogding than I am at aiming, so I tend to go for short range battles.