Framework for risk analysis