Contribution to the growth rate of an agregate in chained prices
cont=contrichution(xvol_lower,xvol_upper,xval_lower,xval_upper)
* xvol_lower = a ts, the series in volume whose contribution is to be calualted
* xvol_upper = a ts, the aggregate in volume
* xval_lower = a ts, the values of the series whose contribution is to be calualted
* xval_upper = a ts, the values of the aggregate
* cont = a ts, the contribution
// load the quarterly data on French consumption published in Februray 2022 by Insee global GROCERDIR ; load(GROCERDIR+'\data\fra_cons.dat') // calculates the contribution of energy consumption to consumption of industrial products cont_P3M_DE=contrichution(P3M_DE_7CH,P3M_DI_7CH,P3M_DE_3,P3M_DI_3) // calculates the contribution of manufacturing consumption to consumption of industrial products cont_P3M_DIM=contrichution(P3M_DIM_7CH,P3M_DI_7CH,P3M_DIM_3,P3M_DI_3) // shows the growth rate of consumption of industrial products, the contribution of energy consumption // and the contribution of manufacturing consumption (all in %) prtts('100*growthr(P3M_DI_7CH)','100*cont_P3M_DE','100*cont_P3M_DIM') | ![]() | ![]() |