Empathy can be defined as the ability to perceive and understand others' emotional states. Neuropsychological evidence has shown that humans empathize with each other to different degrees depending on factors such as their mood, personality, and social relationships. Although artificial agents have been endowed with features such as affect, personality, and the ability to build social relationships, little attention has been devoted to the role of such features as factors that can modulate their empathic behavior. In this paper, we present and discuss the results of an empirical evaluation of a computational model of empathy which allows a virtual human to exhibit different degrees of empathy. Our model is supported by psychological models of empathy and is applied and evaluated in the context of a conversational agent scenario.