smooth approximation max function
Posted: Mon Oct 22, 2012 10:07 am
Hello everyone,
i need to use the max()-function for my model. From this forum i learned that the max-function is only supported in a deterministic setup, so it is of little help for me. The obvious alternative is a smooth approximation to the max function, which has no kinks and therefore allows the model to be solved by standard pertubation methods. The one I used is the following (for max(0,variable) )
ABS= ( sqrt(VARIABLE^2) + VARIABLE) / 2 ;
The problem i am now encountering is that dynare somehow ignores the square on my VARIABLE^2. Even if i define a variable like
TEST = VARIABLE^2 , this variable becomes negative on the adjustment path.
Is there any reason for this?
The alternative would be to use the extended-path method, but i am not sure about this as i know little about it.
Many thanks!
Simon
i need to use the max()-function for my model. From this forum i learned that the max-function is only supported in a deterministic setup, so it is of little help for me. The obvious alternative is a smooth approximation to the max function, which has no kinks and therefore allows the model to be solved by standard pertubation methods. The one I used is the following (for max(0,variable) )
ABS= ( sqrt(VARIABLE^2) + VARIABLE) / 2 ;
The problem i am now encountering is that dynare somehow ignores the square on my VARIABLE^2. Even if i define a variable like
TEST = VARIABLE^2 , this variable becomes negative on the adjustment path.
Is there any reason for this?
The alternative would be to use the extended-path method, but i am not sure about this as i know little about it.
Many thanks!
Simon