Hi there Gareth,
Is there are program out there that does this with Eviews 9.5?
I have 170 countries with a time series of 26 years, it's messy but has to be done.
Really appreciate some help.
Thanks,
Coconut
Rolling regression for Pool
Moderators: EViews Gareth, EViews Moderator
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Rolling regression for Pool
I don't know of any, but it should be relatively trivial to change one of the many rolling regression examples to work on a pool object rather than an equation object.
Re: Rolling regression for Pool
Gareth,
Cheers for your speedy reply. If it is so easy do you want give me an example? Not being funny but we are a small company and chose Eviews over other software as we thought it had a friendly interactive space, but there are things which may be obvious to you but not to me. The gesture of an example would be nice.
Cheers for your speedy reply. If it is so easy do you want give me an example? Not being funny but we are a small company and chose Eviews over other software as we thought it had a friendly interactive space, but there are things which may be obvious to you but not to me. The gesture of an example would be nice.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Rolling regression for Pool
Sure:
http://forums.eviews.com/viewtopic.php?f=15&t=878
http://forums.eviews.com/viewtopic.php? ... 01&p=38949
http://forums.eviews.com/viewtopic.php?f=5&t=12138
http://forums.eviews.com/viewtopic.php?t=8456&f=5
Also:
Go to: Help/Quick Reference/Sample Programs & Data/ then click the roll link for detailed examples.
http://forums.eviews.com/viewtopic.php?f=15&t=878
http://forums.eviews.com/viewtopic.php? ... 01&p=38949
http://forums.eviews.com/viewtopic.php?f=5&t=12138
http://forums.eviews.com/viewtopic.php?t=8456&f=5
Also:
Go to: Help/Quick Reference/Sample Programs & Data/ then click the roll link for detailed examples.
Re: Rolling regression for Pool
Thanks Gareth really helpful programs. If I get stuck will let you know I am afraid
Rolling out of sample forecasts with pool
Hi Gareth,
I actually don't think what you have trivialised as easy is easy. I want out of sample forecasts with confidence intervals for over 145 countries. While I am aware that it is not your job to write programs I feel a bit of help and not trivialising a problem would be helpful. A few lines to convert a rolling program for an equation into a pool rolling would be very good PR. I am using Eviews and would like to recommend Eviews to my clients. Eviews is not only used by students and academics but should be used by businesses more.
I actually don't think what you have trivialised as easy is easy. I want out of sample forecasts with confidence intervals for over 145 countries. While I am aware that it is not your job to write programs I feel a bit of help and not trivialising a problem would be helpful. A few lines to convert a rolling program for an equation into a pool rolling would be very good PR. I am using Eviews and would like to recommend Eviews to my clients. Eviews is not only used by students and academics but should be used by businesses more.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Rolling regression for Pool
Here's the first example given:
Here's that same example changed to be based on a pool:
As you can see, the changes really are quite trivial.
As an aside, the vast majority of our business is from the business world; academics are the minority.
Code: Select all
'create some data
create u 800
series y=nrnd
series x1=nrnd
series x2=nrnd
series z=nrnd
'-------------------------------------------------------------------------------------
'run rolling regression
' set window size
!window = 20
' set step size
!step = 40
' get size of workfile
!length = @obsrange
' declare equation for estimation
equation eq1
'calculate number of rolls
!nrolls = @round((!length-!window)/!step)
'matrix to store coefficient estimates
matrix(3,!nrolls) coefmat ' where 3 is the number of coefficients
'variable keeping track of how many rolls we've done
!j=0
' move sample !step obs at a time
for !i = 1 to !length-!window+1-!step step !step
!j=!j+1
' set sample to estimation period
smpl @first+!i-1 @first+!i+!window-2
' estimate equation - where the equation is y=c(1) + c(2)*x1 + c(3)*x2
eq1.ls y c x1 x2
'store coefficients
colplace(coefmat,eq1.@coefs,!j)
next
show coefmat
Here's that same example changed to be based on a pool:
Code: Select all
'create some data
create u 800
for %i uk us ger fra jpn
series y_{%i}=nrnd
series x1_{%i}=nrnd
series x2_{%i}=nrnd
series z_{%i}=nrnd
next
'-------------------------------------------------------------------------------------
'run rolling regression
' set window size
!window = 20
' set step size
!step = 40
' get size of workfile
!length = @obsrange
' declare equation for estimation
pool eq1 uk us ger jpn fra
'calculate number of rolls
!nrolls = @round((!length-!window)/!step)
'matrix to store coefficient estimates
matrix(3,!nrolls) coefmat ' where 3 is the number of coefficients
'variable keeping track of how many rolls we've done
!j=0
' move sample !step obs at a time
for !i = 1 to !length-!window+1-!step step !step
!j=!j+1
' set sample to estimation period
smpl @first+!i-1 @first+!i+!window-2
' estimate equation - where the equation is y=c(1) + c(2)*x1 + c(3)*x2
eq1.ls y_? c x1_? x2_?
'store coefficients
colplace(coefmat,eq1.@coefs,!j)
next
show coefmatAs an aside, the vast majority of our business is from the business world; academics are the minority.
Re: Rolling regression for Pool
Thanks Gareth,
You do a big service to Eview's PR with your surliness. Putting people down to make a point is really unprofessional. Well done Eviews!
You do a big service to Eview's PR with your surliness. Putting people down to make a point is really unprofessional. Well done Eviews!
Re: Rolling regression for Pool
Your frustration at not being able to modify the code is understandable, but it is quite an unfair judgment against Gareth, who have posted nearly 10,000 replies to help requests of various users like yourself. I think you would appreciate the fact that the forum consists of a large community and is used very actively, which makes it virtually impossible for EViews' developers to meet all the demands in full. You can always do your own search in the forum and ask for help from other users.
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3797
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Rolling regression for Pool
The EViews team goes well above and beyond the call of duty. Unfortunately, the sometimes leads users to expect that tech support will do the users' jobs for them.
Re: Rolling regression for Pool
Your replies are as expected but thank you. And frankly I am happy not to use this blog an further. From my experiences I won't recommend eviews but that's my personal view which I am entitled to.
Who is online
Users browsing this forum: No registered users and 2 guests
