I'm using Eviews 8. Is there any workaround available to use auto updating calculations in a dynamic way? Just to give the simplest example, if we want to assume some quarter-on-quarter rates of change for GDP, is it possible to play with these assumptions while observing their result on GDP level? I know that this would be trivial if the calculation were not dynamic, but what about when GDP (t+2) has to be calculated dynamically after GDP(t+1) has first been calculated etc etc?
Of course, I can do this by setting appropriate smpl and running the command GDP=GDP(-1)*growth rate every time I make a change. But I was looking for a way to do this using auto updating series so that I can change the growth rate assumptions and see a spreadsheet-like immediate visual feedback on the entire future. Is this possible?
Dynamic auto-updating series possible?
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13584
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Dynamic auto-updating series possible?
You want a frml object.
X will change whenever y or gr change.
Code: Select all
frml x = y*gr
Re: Dynamic auto-updating series possible?
Thanks Gareth. Yes I know frml as the command to produce auto updating series. But, how would I overcome the circular definition problem of frml objects? I could not enter GDP=GDP(-1)*growth in an frml object –- it would give me a circular definition error.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13584
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Dynamic auto-updating series possible?
I'm not 100% certain I understand what you're trying to do.
But, I think you have a series containing a growth rate, and you have then a base value for GDP (let's call it 100). You then want to modify the growth rate and see how the whole trajectory of GDP changes based upon the growth rate and that base value. And you want it autoupdating. I think you can do that with the @cumprod function:
But, I think you have a series containing a growth rate, and you have then a base value for GDP (let's call it 100). You then want to modify the growth rate and see how the whole trajectory of GDP changes based upon the growth rate and that base value. And you want it autoupdating. I think you can do that with the @cumprod function:
Code: Select all
create u 100
smpl 1 1
series y=100
series gr = 1
smpl 2 @last
series gr = rnd+1
y = y(-1)*(gr)
frml y2= @cumprod(gr)*100
show y y2
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3796
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Dynamic auto-updating series possible?
There's really a separate point here. In principle, a frml should be able to access a lag recursively without the circular reference error. I imagine that would be hard to implement though.
Re: Dynamic auto-updating series possible?
Many thanks Gareth. Will try this right away and report back. I was looking for just this kind of workaround idea. In future, would it make sense to allow an frml object to have different formula definitions over different smpl's? In that case, we could allow it to have a base value at t=1, then a formula for t=2,3,…,n which would depend on that base value….
Re: Dynamic auto-updating series possible?
Gareth, thanks again. This works in my example –- but just about; if I have minor variations, it may fail. E.g. in a real life situation, we would need to define one workfile and study several series; some may have NA values at the beginning. Or, we may have to use the formula y=y(-4)*gr if we are dealing with quarterly data and have to use year-on-year growth rate. The better solution would be if an frml object could hold static values for part of the smpl range (where actual data are available) and use a formula for the future periods…. or different formulas for different parts of the smpl….
Re: Dynamic auto-updating series possible?
Ok, after designing my workfile following this discussion, I found that the ability to choose the range of observations in the @cumprod command solved most of my problems regarding NA values. I ended up using a formula like
frml f_gdp=@cumprod(1+gr*.01,"1995q2 @last")*@elem(gdp,"1995q1")
while also using @recode to splice together historical values for gr with future assumptions for gr within one frml series to use the cumulative product on. So, thanks again to Gareth for the relevant pointers.
frml f_gdp=@cumprod(1+gr*.01,"1995q2 @last")*@elem(gdp,"1995q1")
while also using @recode to splice together historical values for gr with future assumptions for gr within one frml series to use the cumulative product on. So, thanks again to Gareth for the relevant pointers.
Who is online
Users browsing this forum: No registered users and 0 guests
