Alice Thai wrote:Dear The Yoyo, thank you so much, I am making progress on this, I have successfully created the rolling window. However, another problem arises since the result only displays around 250 observations (I have attached an image for the issue, I think this could be my data is pooled panel data so the program can only run smoothly for the 170 observations of the first country.). In addition, I want to estimate the change of the coefficients over the time series, so is there any way to display the year on the x-axis instead of the observations? Thank you for your help.

I think this has to do with the fact that it is panel data. To see this, remove the CX=F and WGT=CXSUR options in the Least Squares estimation. It would result in a Sample Range error. I'd assume this is caused by stepping to the next cross-section, at which point the sample will have an end date which is earlier than the start date.

I never worked with panel data regressions, so I have no clue how to solve this. Perhaps someone else does?

Alice Thai wrote:Dear The Yoyo, thank you so much, I am making progress on this, I have successfully created the rolling window. However, another problem arises since the result only displays around 250 observations (I have attached an image for the issue, I think this could be my data is pooled panel data so the program can only run smoothly for the 170 observations of the first country.). In addition, I want to estimate the change of the coefficients over the time series, so is there any way to display the year on the x-axis instead of the observations? Thank you for your help.

I think this has to do with the fact that it is panel data. To see this, remove the CX=F and WGT=CXSUR options in the Least Squares estimation. It would result in a Sample Range error. I'd assume this is caused by stepping to the next cross-section, at which point the sample will have an end date which is earlier than the start date.

I never worked with panel data regressions, so I have no clue how to solve this. Perhaps someone else does?

Thank you The Yoyo for your help. I hope somebody in the forum can give some advice for this problem soon.

thank you to the entire team for such a wonderful forum. i am doing a 3-period ahead forecast for my series using arima model. my problem is that the program that i run do not give me the same series as the one i would obtain if i would do the entire exercise manually in eviews. can u help??my estimation period is 1984:m1 1996m1 and i want to obtain 3 period ahead forecast from 1996:m4 to 2017:m2. my program is as follows

series y=cpii

'run rolling regression

' set window size!window = 145

' set step size!step = 1

' get size of workfile!length = @obsrange

' declare equation for estimationequation eq2

'calculate number of rolls!nrolls = @floor((!length-!window)/!step)

'matrix to store coefficient estimatesmatrix(3,!nrolls) coefmat ' where 2 is the number of coefficients

Thanks for a quick reply. but then why am i not getting the same values as with manually obtaining the recursive forecasts. if the algorithms are the same then same software should be giving similar values. Or do u suggest that i should do this exercise maually?i am using eviews 9

Having the program and data doesn't help identify what you're doing wrong when you do it manually.

But if I take your equation eq2 and estimate it until 2016m11, then forecast it 3 month (2016m12 2017m2), the compare the forecasted value for 2017m2 with the one generated by the program, they are identical. Which would suggest the program is doing what you want it to.

The manual procedure that i am following is right according to what you have suggested. But if i see the coefficient matrix i m getting 252nd equation which is not desired as it is doing estimation upto 2016m12 whereas the loop should exit after 251th equation only. am i right??

sorry for troubling but one more question. for a 6-period ahead forecast how will the program change?will it be ' 6-period-ahead forecast%6pers = @otod(@dtoo(%start)+!i+!window-1) 'start point%6pere = @otod(@dtoo(%start)+!i+!window+4) 'end point

if @dtoo(%end) < @dtoo(%6pere) then 'check whether the forecast end point is greater than the workfile end point exitloop endif