Hi Gareth,
Sorry, I am not sure if I fully understand what you meant. Maybe I should illustrate my question better:
Below is my rollcoefs table generated from performing a rolling regression. For each observation, say, 2001M01, the rolling regression (with a 12 observation window, 1 observation step, which is why all observations prior to 2001M01 do not have coefficients) would generate a series of coefficients for each variable (w,x,y,z and constant c)
I thought the fitted / estimated value for that observation (using 2001M01 as an example) is calculated by multiplying that observation's calculated coefficients (in the below example, 2001M01 -1.431364, -0.616759, 0.823025, 0.223771, and 7.226813) with the actual variables of that observation (input file).
When you say "For each roll (set of coefficient) there is a complete series of Y values", are you saying there is a table such that it contains rows of observations, with a single column that consists of sum of products between coefficients and variables (rollcoeff_w * w + rollcoeff_x * x... + rollcoeff_y * y)? Or, am I taking the wrong approach and confused?
obs ROLLCOEFS_W ROLLCOEFS_X ROLLCOEFS_Y ROLLCOEFS_Z ROLLCOEFS_C
2000M01 NA NA NA NA NA
2000M02 NA NA NA NA NA
2000M03 NA NA NA NA NA
2000M04 NA NA NA NA NA
2000M05 NA NA NA NA NA
2000M06 NA NA NA NA NA
2000M07 NA NA NA NA NA
2000M08 NA NA NA NA NA
2000M09 NA NA NA NA NA
2000M10 NA NA NA NA NA
2000M11 NA NA NA NA NA
2000M12 NA NA NA NA NA
2001M01 -1.431364 -0.616759 0.823025 0.223771 7.226813
2001M02 -1.480654 -0.624711 0.748843 0.204403 7.391734
2001M03 -1.747859 -0.462728 0.632914 0.445469 7.530357
2001M04 -1.100580 -0.544855 0.194759 0.425805 6.120864
Roll Add-in
Moderators: EViews Gareth, EViews Moderator, EViews Esther
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13319
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Roll Add-in
You're confusing what you're doing.
With a 12 observation window, you have 12 observations. Thus you can calculate the dependent variable, Y2, for each of those 12 observations. Or you could calculate it over all of the observations in your workfile. Or you could calculate it for the first observation of those 12. Or you could calculate it for the last observation of those 12. Or you could calculate it for the observation following the 12 observations in the roll (i.e. do a one period forecast), or you could do an N period forecast.
Note that in your rollcoefs table, although the row corresponding to 2001M01 has values in it, those values actually correspond to the 12 observations running from 2000M02-2001M01. It was just arbitrary that we chose to put them in the 2001M01 row. It could, equally, have gone into the 2000M02 row, or any of those rows.
With a 12 observation window, you have 12 observations. Thus you can calculate the dependent variable, Y2, for each of those 12 observations. Or you could calculate it over all of the observations in your workfile. Or you could calculate it for the first observation of those 12. Or you could calculate it for the last observation of those 12. Or you could calculate it for the observation following the 12 observations in the roll (i.e. do a one period forecast), or you could do an N period forecast.
Note that in your rollcoefs table, although the row corresponding to 2001M01 has values in it, those values actually correspond to the 12 observations running from 2000M02-2001M01. It was just arbitrary that we chose to put them in the 2001M01 row. It could, equally, have gone into the 2000M02 row, or any of those rows.
Follow us on Twitter @IHSEViews
Re: Roll Add-in
Thanks for the explanations!
For the rolling 12 observation windows, I plan to calculate the dependent variable for the last observation. For example, the 2000M02 - 2001M01 window will be used to calculate the dependent variable for the 2001M01 observation.
In this case, what is the recommended approach to calculate dependent variables? I will have to calculate a dependent variable for each observations starting from 2001M01, using it and 11 rolling prior observations.
Victor
For the rolling 12 observation windows, I plan to calculate the dependent variable for the last observation. For example, the 2000M02 - 2001M01 window will be used to calculate the dependent variable for the 2001M01 observation.
In this case, what is the recommended approach to calculate dependent variables? I will have to calculate a dependent variable for each observations starting from 2001M01, using it and 11 rolling prior observations.
Victor
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13319
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Roll Add-in
In that case, yes, you're best off just doing something like:
Code: Select all
series y2 = rollcoefs_w*w + rollcoefs_x*x + rollcoefs_y*y +rollcoefs_z*z + rollcoefs_c
Follow us on Twitter @IHSEViews
Re: Roll Add-in
Thanks Gareth! I will proceed as suggested.
Who is online
Users browsing this forum: No registered users and 30 guests