# Decompose growth of variable

This is probably an elementary question. Let's see.

Say variable $y_t$ depends on two other processes, as follows:

$$y_t=x_tz_t$$

I observe these variables in period 0 and period 1. I want to evaluate how much did $x$ and $z$ contribute to the change in $y$. For any variable $w$, we can define:

$$\frac{w_1}{w_0} = 1+g_w$$

where $g_w$ is the growth rate of $w$ over the period. Using the above, it is trivial to show that:

$$g_y = g_x + g_z + g_xg_z$$

This however is not entirely helpful, because the contribution of $x$ and $z$ to $y$ cannot be disentangled. I fear there is simply no way around this. Is there?

I have seen decompositions of trend, cycle and seasonality, but in my case $x$ and $z$ do not represent such sharp differentiations. Any ideas? Can we ever say something like C% of the change in $y$ is due to $x$? If not, what is the best alternative?

Notice that in the economic literature there is something called the "growth accounting" method, whereby the components of economic growth are decomposed into factors like labour, capital and technological change, based on a multiplicative production function. This uses the same decomposition as above, but under the assumption that multiplicative growth rate terms are very small (and thus it works only when components grow at a small rate). Thus, this method uses:

$$g_y \approx g_x + g_z$$

This is surely sufficient in settings of low change, but on other ones it is not.

In order to find the percent contribution of an independent variable $g_{x,z}$ on a dependent variable $g_y$ where $g$ is a difference representing growth, or segment, calculate the "squared structure coefficient," $r_s^2$, such that $$r_{s_{g_{x,z}\cdot g_y}}^2=\frac{r_{g_{x,z}\cdot g_y}^2}{R^2_{g_x,g_z\cdot g_y}}$$ The R function yhat::calc.yhat calculates structure coefficients, among other related parameters. Remember to test for autocorrelation.

# A

One way to do this is through log-transform: $$\ln y_t=\ln x_t +\ln z_t$$ This can be seen as an approximation of percentage changes: $$\Delta y_t/y_t\approx\Delta x_t/x_t+\Delta z_t/z_t$$

# B

Another way is through stochastic calculus-type of approach: $$\Delta y_t=y_t-y_{t-\Delta t}=x_{t-\Delta t}\Delta z_t+ z_t\Delta x_t$$

So, suppose the cost of basket is $$y_t$$ equal to the product of number of items $$x_t$$ and their prices $$z_t$$, where both number of items and the prices are stochastic. In this case the change in the cost of a basket is equal to a product of change in prices of items while holding the number of items constant PLUS a product of rearranging the numbers of items at new prices. Re-arranging means selling or buying items to get to the new composition of the basket, again, done at new prices.

Btw, when $$\Delta t\to 0$$ in continuous time limit this can be seen as Ito's differential: $$dy_t=x_tdz_t+z_tdx_t+dx_tdz_t$$