Replies: 1 comment
-
Hi - this is because the Kalman filter uses a first-order approximate
solution. Your function creates a nonlinearity. Assuming that profit>0 in
steady state, the linear version of the equation is obviously y = profit
and that is it. Best Jaromir
…On Fri, Dec 9, 2022 at 3:00 PM mia ***@***.***> wrote:
Hello,
I have a somewhat strange question... As far as I know, it is possible to
create a several versions of the model code using the "if" function in the
model file. If I understand correctly, a parameter that is already included
in the database should be used as a condition . However, I want the
exogenous/endogenous variable to be a condition.
I tried to experiment with this. I added an equation to the model that
depend on own created function:
Tr_NGDP = remitances(P_NGDP);
where remitances is:
function y = remitances(profit)
for i=1:length(profit)
if profit(i)<=0
y(i) = 0;
else
y(i) = profit(i)*0.8;
end
end
end
The model is solved, but the filtration does not work properly.
So the question is the following, is it possible to use a variable in the
condition?
Thank you!
—
Reply to this email directly, view it on GitHub
<#358>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGCVKKVZBHBQLW3MT7JIFVDWMM3PRANCNFSM6AAAAAASZMCZFU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I have a somewhat strange question... As far as I know, it is possible to create a several versions of the model code using the "if" function in the model file. If I understand correctly, a parameter that is already included in the database should be used as a condition . However, I want the exogenous/endogenous variable to be a condition.
I tried to experiment with this. I added an equation to the model that depend on own created function:
Tr_NGDP = remitances(P_NGDP);
where remitances is:
function y = remitances(profit)
for i=1:length(profit)
if profit(i)<=0
y(i) = 0;
else
y(i) = profit(i)*0.8;
end
end
end
The model is solved, but the filtration does not work properly.
So the question is the following, is it possible to use a variable in the condition?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions