I usually ride at about the same distance from the kerb as my nearside wheels would be if I was driving. Keeps me out of the muck and in a position to move either way if road surface dictates.
That's a good rule of thumb - gives you a bit of wiggle room if there's a close pass and makes it easier to take the lane at a pinch point, move out a bit for better visibility at a junction, or move to the middle for a right turn.