Page 1 of 1

Exporting CUSUM Data

Posted: Thu Nov 12, 2009 8:15 pm
by brennan6738
Does anyone know if there is a way to export the actual data from a CUSUM stability test? I need to chart it in Excel and I can't just export the chart from Eviews.

Re: Exporting CUSUM Data

Posted: Fri Nov 13, 2009 3:53 am
by trubador
I am not sure if it can be done via a single command. However, the following piece of code should be doing what you want:

Code: Select all

call cusum("eq01") 'Please enter the name of your equation in double quotes. subroutine cusum(string %eq) !nobs = {%eq}.@regobs !ncoef = {%eq}.@ncoef !df=!nobs-!ncoef {%eq}.rls(q,s) series cusum=@cumsum(r_res/{%eq}.@se) smpl @first + !ncoef @last series ubound = .948*@sqrt(!df)*(1+2*(@trend-!ncoef+1)/!df) series lbound = -ubound smpl @all endsub

Re: Exporting CUSUM Data

Posted: Mon Nov 16, 2009 7:11 pm
by brennan6738
Data and program.

Re: Exporting CUSUM Data

Posted: Tue Nov 17, 2009 6:32 pm
by trubador
You must not change any part of the subroutine. And there has to be a line in the program window, which calls the subroutine. The correct way is as follows:

Code: Select all

call cusum("multivariate") subroutine cusum(string %eq) ... endsub
Please do not hesitate to refer to programming manual or users guide for additional information...

Re: Exporting CUSUM Data

Posted: Wed Nov 18, 2009 8:52 pm
by tcfoon
Dear Trubador,

I am interested with the CUSUM programme you posted to the forum. Could you please share with me the programme for CUSUM of Squares (CUSUMSQ) because I intent to change the significant level from 5 to 10 per cent. You are using 0.948 as 5% why not 0.95, while if I wish to use 10 per cent does it mean that I should you 0.90 or 0.898?

Please advice..

Thank you,

Re: Exporting CUSUM Data

Posted: Fri Nov 20, 2009 2:41 am
by trubador
The parameter values of CUSUM test should be 1.143, 0.948 and .850 respectively for 1%, 5% and 10% significance levels. For details please see: Brown, R. L., Durbin, J. and Evans, J. M. (1975). "Techniques for Testing the Constancy of Regression Relationships over Time", Journal of the Royal Statistical Society, vol. 37, pp. 149-192.

Calculation of confidence intervals for CUSUM of squares are different than that of CUSUM, since the parameter values also depend on degrees of freedom. At this point, you should refer to original study: Durbin, J. (1969). 'Tests for Serial Correlation in Regression Analysis Based on the Periodogram of Least-Squares Residuals", Biometrica, vol. 56, pp. 1-15.

The CUSUMSQ series can be generated as follows:

Code: Select all

series cusumsq=@cumsum(r_res^2/@sumsq(r_res))

Re: Exporting CUSUM Data

Posted: Wed Jun 27, 2012 12:31 am
by rgarg
I have a question similar to the above. How can the default 5% confidence interval bands for CUSUM Squares be changed to 1% or 10%. What would be the code for it ?

rgarg