Conditional Compilation in Models
Posted: Wed May 21, 2008 11:18 pm
Hi,
I using Dynare in conjunction with Matlab and am trying create a model which uses equations, conditional on the results from a previous iteration.
For example, if y in the previous period is less than some value use equation 1 if not then use equation 2.
I have been attempting to do this procedure using conditional compilation with a statement like:
@if yt-1 <100
eq1
@else
eq2
@end
but have not had any luck. Can anyone point me in the right direction?
Thanks.
I using Dynare in conjunction with Matlab and am trying create a model which uses equations, conditional on the results from a previous iteration.
For example, if y in the previous period is less than some value use equation 1 if not then use equation 2.
I have been attempting to do this procedure using conditional compilation with a statement like:
@if yt-1 <100
eq1
@else
eq2
@end
but have not had any luck. Can anyone point me in the right direction?
Thanks.