There is no formula as such, Ecco. You have to figure out how to compensate through trial and error, so to speak. Different players have different ways they have developed and you'll need to do the same. I can give you a starting point that is fairly consistent. In fact, it's what I use to this day for the most part.
In 20-25% rough add 1/2 club to whatever the caddie suggests. In 30-40 add 1 club and in 40-50 add 2 with a 75% swing. This isn't empirical by any means but it will get you close enough to figure out how to handle the lies.
Over 50% lies mean you're in trouble and should probably be thinking get back into play. Punching works well there. Keep in mind the ball out of rough lies will run a lot on landing so expect it.
On bunker shots I started out taking 2 clubs over what the caddie says but there are a lot of different shots to use so you have to be careful. These starting points use whatever the game suggests as a base to add to so trust it at first, just to see what happens. I think you'll catch on fast. GL