A model for the analysis of the temperature effects on mortality