Finite sum
Posted:
Tue Feb 09, 2010 3:37 pm
by ewoudq
Hi everyone
I would like to enter a finite sum in a dynare .mod file, but I don't now the syntax. I've enclosed the formula I want to use. Can anyone help me?
Thanks in advance
Ewoud
Re: Finite sum
Posted:
Wed Feb 10, 2010 7:57 am
by AssiaEzzeroug
Hi,
u can use the dynare macro language for that, try the following syntax
- Code: Select all
//at the beginning of the mod-file
@# define k = 1
@# define K = NumberofLags
//inside the block model
...=1/H*(
@#for k in 1: K
+ omega_@{k}*(p(@{-k})-px(@{-k}))^2
@#endfor
)
;
Hope this helps,
Best
Re: Finite sum
Posted:
Fri Feb 19, 2010 7:55 pm
by ewoudq
Thank you!
The model works now, but only partially because not all variables have the expected values.
For instance "etax" en "etaf" take on the value zero for all time periods, while they should alway sum up to one. Can someone help me with this? Any suggestions?
With Regards