A general framework to model statistically