I'm would like to do a linear progression for a recursive relation of a consumption function. Combining my program skills and my sparse knowledge of mathematica, I was thinking about doing it in a while-loop as follows:
While[\[CapitalDelta]Cp < 1,
Cp = 0.4 \[CapitalDelta]Y +
0.407 (0.9 Subscript[Yl, -1] + 0.1 Subscript[Wl, -1] - Subscript[
Cp, -1]) + Subscript[Cp, -1];
\[CapitalDelta]Cp = Cp - Subscript[Cp, -1];
W = Subscript[Wl, -1] + (\[CapitalDelta]Y + Subscript[Yl, -1]) - Cp;
Subscript[Wl, -1] = W;
Subscript[Cp, -1] = Cp;
]
Though, it doesn't work.
EDIT: Clearifying----
I have to functions, one that determines consumption (Cp) and one that determines the fortune (Wp). They are recursive in that I need to determine the consumption before I can determine the fortune.
$$ Cp=0.4\Delta Y+0.407(0.9Y_{-1}+0.1Wp_{-1}-Cp_{-1})\\ Wp=Wp_{-1}+Y-Cp $$
The symbol $_{-1}$ states that the data are lagged meaning that it is last years value.
Initially I append the following data to the variables in order for the loop to start, since I would like to project the value of Cp and Wp ten year ahead.
$$ Y_{-1}=1\\ Wp_{-1}=1\\ Cp_{-1}=1\\ \Delta Y=1\\ $$
Then I would like to make a loop that iterates through the functions 10 times, whereas they after each iteration automatically assign the newly calculated value to the lagged variables, being:
$$ Y_{-1}=Y\\ Wp_{-1}=Wp\\ \vdots $$
I would like for $\Delta Y$ to increment by 1% each year automatically as well. How is this possible? Please ask if the question is still unclear.
OBJECTIVE
The purpose of this whole head-ache of mine is to make a prototype of a consumption model of a given society. Therefore, I would like to be able to write the acquired data in a graph, with the percentage of change in the different variables on the Y-axis and the years of projection on the X-axis (i.e. 1, 2, 3, ... 10).
In short, the consumption equation is defined as: $$ dlog(C)=0.4 dlog(Y)+0.407(log(Y_{-1}^{0.9} W_{-1}^{0.1})-0.200 log(C_{-1}))+0.011 $$ Whilst the fortune equation corresponds to: $$ W=W_{-1}+Y+C $$
The reason I've used the above annotation is because I wanted to linearize the consumption equation with the purpose of placing both of the equation in a matrix system (correspondingly $dlog(C)=log(C)-log(C_1)=\Delta C_l,\text{where}C_l=log(C)$). Firstly, though, I wanted to get it to work.
The initial values of the lagged variables are set to 1. In my first example I left out the parameters to simplify the projection. Then, when the system worked, I wanted to add them. Hope it clarifies it well enough.
OBJECTIVE END
----EDIT END
How can I solve this? Best regards, Brinck10