Barbas is a large gray hunting dog found along the road outside Falkreath. He is Clavicus Vile's companion, a supernatural creature that usually takes the form of a dog. Barbas cannot be harmed during the course of gameplay, except by the Rueful Axe.
Um if sex can't cause a miscarriage neither can masturbation. I mean your not sticking a coat hanger or razor blades up there... I'm sorry about your miscarriage and get you're grasping at straws but you didn't do anything to cause it and if you're going to have one now there's not anything you can do to prevent it.
All sorts of myths exist around masturbation, most of which were created by religious banter and cultural historical beliefs, and not by true scientific facts and research. To answer your question more specifically, masturbation in fact does not affect significantly the amount of testosterone your body produces.