This project is read-only.

using a function or using ^ inside model files

Topics: IRIS in General, Models
Aug 25, 2014 at 5:33 PM
Hi,

I realized that I can use +,-,/,* in my transition equations inside model files; however, when I tried to use some matlab functions to transform variables or exponentiate certain variables by using ^, it wouldn't work.

Is any other way to do these or is it not possible?
Aug 25, 2014 at 6:04 PM
It is certainly possible. In fact, you can use any operators, Matlab functions, or even your own m-file functions in model files. Could you please post an example of your model file that generated problems? It's most likely some typo, little syntactical error or so that causes the problems.

Best
Jaromir
Sep 5, 2014 at 8:00 PM
for example,

in my model, under transition equation part, I would like to have
(when A and B are my transition variables, Beta1 is a parameter, and A_shk is a transition shock.)


A = B * Beta1 + A_shk;
=> this will work. However,

A = exp(B) * Beta1 + A_shk;
=> when I try this, the model doesn't break. But it won't use exponential values of B.
Sep 17, 2014 at 2:56 PM
Hi all,


I have had similar problems with a linear model. Exp() did not work and original values were used instead.

Best
Mikko