How to handle factorial or factorial-alike form?
Posted: Tue Oct 05, 2010 6:37 am
I wonder how a factorial or a factorial-alike form could be handled with Dynare.
Just for simplicity, an example is as follows.
y(t)=y(t-1)+x(t)
x(t)=(1+1/1)*(1+1/2)*...* (1+1/t)
I have attempted to transform the factorial into
logx(t)=log(1+1/1)+log(1+1/2)...+log(1+1/t)
In recursive form: log(x(t))=log(x(t-1))+log(1+1/t)
In Dynare
y=y(-1)+x;
log(x)=log(x(-1))+log(1+1/t);
t=t(-1)+1
However, log(1+1/t) is a bit problematic, as t is introduced as a new variable and denotes the same time period to which y and x refer. Besides, I don't know how to assign an initial/a steady state value to the new variable t. How to deal with the scale of t is also a issue.
Thank you for your advance and tips!
Just for simplicity, an example is as follows.
y(t)=y(t-1)+x(t)
x(t)=(1+1/1)*(1+1/2)*...* (1+1/t)
I have attempted to transform the factorial into
logx(t)=log(1+1/1)+log(1+1/2)...+log(1+1/t)
In recursive form: log(x(t))=log(x(t-1))+log(1+1/t)
In Dynare
y=y(-1)+x;
log(x)=log(x(-1))+log(1+1/t);
t=t(-1)+1
However, log(1+1/t) is a bit problematic, as t is introduced as a new variable and denotes the same time period to which y and x refer. Besides, I don't know how to assign an initial/a steady state value to the new variable t. How to deal with the scale of t is also a issue.
Thank you for your advance and tips!