Hi,
I have a programming problem in Eviews. I want to forecast a series, called y, from an equation, generating a series called y1. Then I want to control the growth rate of y1, for example, the highest growth rate is set to 2%. A pseudo program code could look like the following
growth_rate = 0.02
if (y1(t) - y1(t-1))/y(t-1) > grow_rate
y1(t) = y1(t-1) * (1 + grow_rate)
end
How can I realize it in Eviews? Thanks
Zheng
how to forecast a series with a upper bound of growth rate
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13583
- Joined: Tue Sep 16, 2008 5:38 pm
Re: how to forecast a series with a upper bound of growth ra
Code: Select all
!gr = 0.02
series yf = @recode((y1 - y1(-1))/y1(-1) > !gr, y1, y1(-1)*(1+!gr))
Re: how to forecast a series with a upper bound of growth ra
Thanks!. That's neat!Code: Select all
!gr = 0.02 series yf = @recode((y1 - y1(-1))/y1(-1) > !gr, y1, y1(-1)*(1+!gr))
Zheng
Who is online
Users browsing this forum: No registered users and 2 guests
