Exporting CUSUM Data

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

brennan6738
Posts: 31
Joined: Tue Sep 08, 2009 1:28 pm

Exporting CUSUM Data

Postby brennan6738 » Thu Nov 12, 2009 8:15 pm

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.

trubador
Did you use forum search?
Posts: 1520
Joined: Thu Nov 20, 2008 12:04 pm

Re: Exporting CUSUM Data

Postby trubador » Fri Nov 13, 2009 3:53 am

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

brennan6738
Posts: 31
Joined: Tue Sep 08, 2009 1:28 pm

Re: Exporting CUSUM Data

Postby brennan6738 » Mon Nov 16, 2009 7:11 pm

Data and program.
Attachments
credit.wf1
(27.97 KiB) Downloaded 730 times
cusum.prg
(313 Bytes) Downloaded 946 times

trubador
Did you use forum search?
Posts: 1520
Joined: Thu Nov 20, 2008 12:04 pm

Re: Exporting CUSUM Data

Postby trubador » Tue Nov 17, 2009 6:32 pm

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...

tcfoon
Posts: 54
Joined: Fri May 15, 2009 4:33 am

Re: Exporting CUSUM Data

Postby tcfoon » Wed Nov 18, 2009 8:52 pm

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,

trubador
Did you use forum search?
Posts: 1520
Joined: Thu Nov 20, 2008 12:04 pm

Re: Exporting CUSUM Data

Postby trubador » Fri Nov 20, 2009 2:41 am

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))

rgarg
Posts: 1
Joined: Wed May 30, 2012 3:30 am

Re: Exporting CUSUM Data

Postby rgarg » Wed Jun 27, 2012 12:31 am

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


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests