Willing to talk:
RefuseDuration = RefuseToTalk * {20+(80*AIWarSuccess*2/HumanSuccess)}/100
RefuseToTalk is a leader dependent variable (iRefuseToTalkWarThreshold) in the XML, which is 6, 8 or 10 for most leaders. The exceptions are De Gaulle (5) and Sitting Bull (12). I think both AiWarSuccess and HumanSuccess = war success+1 (otherwise you'd be dividing by zero).
Don't remember seeing any easy to read formula for peace deals. If there is one, I'd be very interested in seeing it!