Fit, Simulate and Diagnose Exponential-Family Models for