BaiPerron (Bai-Perron breakpoint test - Requires R)

For questions about EViews Add-ins available from the EViews Add-ins webpage. Note each add-in available on our webpage will have its own individual thread.

Moderators: EViews Gareth, EViews Moderator, EViews Esther

inaiya
Posts: 3
Joined: Tue Feb 22, 2011 3:44 am

Re: BaiPerron (Bai-Perron breakpoint test - Requires R)

Postby inaiya » Sun Mar 06, 2011 7:40 am

Thanks it worked after removing the dummy.

adamdynamic
Posts: 3
Joined: Fri Apr 08, 2011 8:08 am

Re: BaiPerron (Bai-Perron breakpoint test - Requires R)

Postby adamdynamic » Fri Apr 08, 2011 8:18 am

Hey,

I'm a (postgrad) student studying an introductory course to econometrics, we are taught to use PCGive (not Eviews) so if this sounds like a stupid/obvious question please forgive me!

I am studying a time-series of stock data, I want to test for structural breaks that would invalidate unit root tests and found the 'baiperron' add-in. My progress so far:

1) I've created a workfile with my price data in
2) I've downloaded (and installed) the baiperron plug in found here: http://www.eviews.com/Addins/addins.shtml
3) I am running Eviews 7.1 and the same computer has R loaded onto it (which I also have also started but done entered nothing into it)

At this point I'm stuck - how exactly do I run the add-in? Stupid question no doubt, but the Proc>Add-in option is empty and I can't see any other references to add-ins?

When I click on the Add-ins > Manage Add-ins I can see baiperron (it's the only add-in installed) but apart from that I've no idea where to go?

Apologies for the very general question, I've been going round in circles with this for about 5 hours now though so any help would be appreciated!

Many thanks,

Adam.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 12940
Joined: Tue Sep 16, 2008 5:38 pm

Re: BaiPerron (Bai-Perron breakpoint test - Requires R)

Postby EViews Gareth » Fri Apr 08, 2011 8:23 am

The Bai-Perron add-in is an equation Add-in. That means it only appears on the Add-in menu when you have an equation object open.
Follow us on Twitter @IHSEViews

adamdynamic
Posts: 3
Joined: Fri Apr 08, 2011 8:08 am

Re: BaiPerron (Bai-Perron breakpoint test - Requires R)

Postby adamdynamic » Fri Apr 08, 2011 8:26 am

Hey,

Thanks a lot for your quick response!

I guess it doesn't bode well for me that I've no idea what an 'equation object' is?

If it's an easy explanation and you could provide it that would be appreciated (or point me in the direction of one), otherwise I'm going to have to find an online manual or something and start from basics... :|

Thanks again!

Adam.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 12940
Joined: Tue Sep 16, 2008 5:38 pm

Re: BaiPerron (Bai-Perron breakpoint test - Requires R)

Postby EViews Gareth » Fri Apr 08, 2011 9:12 am

The Bai-Perron test is a breakpoint test for the coefficients in an equation. i.e. you run a least squares regression, then test whether the coefficients of that regression change through time. In EViews you run regressions by creating an equation object. The simplest way to do that is to use Quick->Estimate Equation. Once you've estimated your equation and are looking at the regression results, you should be able to click on the add-in menu to see the Bai Perron test.
Follow us on Twitter @IHSEViews

adamdynamic
Posts: 3
Joined: Fri Apr 08, 2011 8:08 am

Re: BaiPerron (Bai-Perron breakpoint test - Requires R)

Postby adamdynamic » Sat Apr 09, 2011 12:15 am

Hey,

Ok I'll try that, thanks a lot for your help!

(On another note, before I try and potentially fail, is it enough to have R loaded onto the computer? Do I need to have it running when I run the add-in in Eviews? Will Eviews automatically detect it?)

Thanks again for your help!

Adam.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 12940
Joined: Tue Sep 16, 2008 5:38 pm

BaiPerron (Bai-Perron breakpoint test - Requires R)

Postby EViews Gareth » Sat Apr 09, 2011 1:18 am

See the manual for details on using R
Follow us on Twitter @IHSEViews

Vasilis
Posts: 3
Joined: Thu Jun 09, 2011 6:55 am

Re: BaiPerron (Bai-Perron breakpoint test - Requires R)

Postby Vasilis » Thu Jun 09, 2011 7:22 am

Hi,

I'm facing some problem with this add-in. R with strucchange is installed and working but when I try to run the BP test I get an error message that R is not installed. I'm currently running 7 (64-bit), R (64-bit) and Eviews 7.2 (32-bit). I've also tried with R (32-bit) but still get the same error message. Programs are installed in the Program Files directories/directory (default settings). Any ideas?

Thanks
Vasilis

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 12940
Joined: Tue Sep 16, 2008 5:38 pm

Re: BaiPerron (Bai-Perron breakpoint test - Requires R)

Postby EViews Gareth » Thu Jun 09, 2011 8:22 am

Have you installed StatConnector etc...?
Follow us on Twitter @IHSEViews

Vasilis
Posts: 3
Joined: Thu Jun 09, 2011 6:55 am

Re: BaiPerron (Bai-Perron breakpoint test - Requires R)

Postby Vasilis » Fri Jun 10, 2011 1:55 am

Hi Gareth,

No, I don't even know what this is. I checked in R's packages though and it doesn't appear. Is it some other software?

Thanks
Vasilis

Vasilis
Posts: 3
Joined: Thu Jun 09, 2011 6:55 am

Re: BaiPerron (Bai-Perron breakpoint test - Requires R)

Postby Vasilis » Fri Jun 10, 2011 3:26 am

Hi Gareth,

OK I got it, I found the necessary components and now it runs fine

Thanks
Vasilis

Kavorka
Posts: 47
Joined: Mon Nov 30, 2009 6:06 am

Re: BaiPerron (Bai-Perron breakpoint test - Requires R)

Postby Kavorka » Tue Jul 12, 2011 5:40 pm

Right now the maximum number of breaks are 5.

Is it possible to change this value so that the maximum number of breaks are 4,3,2 or,1 ?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 12940
Joined: Tue Sep 16, 2008 5:38 pm

Re: BaiPerron (Bai-Perron breakpoint test - Requires R)

Postby EViews Gareth » Tue Jul 12, 2011 6:55 pm

There's nothing in the Add-in that will do it, however if you look at the R documentation, you'll see that they do, sort of, support such an option:

Code: Select all

h - minimal segment size either given as fraction relative to the sample size or as an
integer giving the minimal number of observations in each segment.

breaks - integer specifying the maximal number of breaks to be calculated. By default
the maximal number allowed by h is used.


So, you could always edit the add-in code that calls the R routine, and add a "breaks=" option.
Follow us on Twitter @IHSEViews

Kavorka
Posts: 47
Joined: Mon Nov 30, 2009 6:06 am

Re: BaiPerron (Bai-Perron breakpoint test - Requires R)

Postby Kavorka » Wed Jul 13, 2011 7:46 pm

Thanks, changing the R-code to breaks=1 or any other number worked fine. I have two more questions:

*** My first question is more an econometrics question than an EViews question -- if I understand Glenn's statement correctly (see the quote below) this means that it is not possible to test for a structural break for the model LS Y1 C @TREND (to implicitly test whether there is a break in Y1) and it cannot be used for LS Y1 C AR(1) but it can be used for LS Y1 C Y1(-1) ? Do you have any suggestions for how to make a significance test if I am only interested to see whether there are structural breaks in a large amount of series (Y1, Y2, Y3, ...)... yes this is very atheoretical since there is no model but I want to get an idea about many variables. The natural way would be to use LS Y1 C @TREND, but if I would use the Bai-Perron test for LS Y1 C without a trend would that be the proper way to test for structual breaks or would that be meaningless since I am just modelling against a constant? (I realize that this method is intended to be used to test for structural breaks in various regression models, but assume that I just want to use the test to test if there are structural breaks in a single variable). Can the procedure be used in that way? How should I use if for that purpose?

*** Now, to my EViews questions -- Is is possible to access this Bai-Perron routine by a command rather than by using the menu?

EViews Glenn wrote:Simple trends violate the regularity conditions. Polynomial trends of a particular form are allowed.

See Bai, J., 1997a. Estimation of a change point in multiple regression models. Review of Economic and Statistics 79, 551-563. There is also a discussion in Perron's survey article "Dealing with Structural Breaks", Palgrave Handbook of Econometrics, Vol. 1: Econometric Theory, K. Patterson and T.C. Mills (eds.), Palgrave Macmillan, 2006, 278-35.



Thanks for your help!

herzogrw
Posts: 4
Joined: Sat Aug 06, 2011 2:10 pm

Re: BaiPerron (Bai-Perron breakpoint test - Requires R)

Postby herzogrw » Sat Aug 06, 2011 2:22 pm

It seems this question has been asked before, but I'm struggling to fully understand the output BaiPerron reports in eViews. Here's my output:

Breakpoints 0 1 2 3 4 5 6 7 8 9 10
BIC -285.4917 -320.6389 -320.5774 -313.0516 -307.9650 -302.9696 -299.7262 -293.8805 -282.3388 -270.0135 -254.8967
Log-Lik 148.8622 172.5521 178.6376 180.9910 184.5641 188.1826 192.6773 195.8707 196.2162 196.1698 194.7277
RSS 0.022226 0.009956 0.008100 0.007479 0.006626 0.005861 0.005033 0.004516 0.004464 0.004471 0.004695
N. Coefs 3.000000 6.000000 9.000000 12.00000 15.00000 18.00000 21.00000 24.00000 27.00000 30.00000 33.00000

Chosen number of breaks: 1
Breaks : 1955

Yes, I know it shows there is one significant break in 1955. I understand the table is reporting the BIC, Log-Lik, and RSS statistics corresponding to that break, but this doesn't help when it comes to calculating the appropriate F test statistics. The Bai-Perron paper calculates a series of F-test statistics and provides the tables to determine the appropriate level of significance. Is my break significant at the .90, .95, .975, or .99 level? I want to know the level of significance, the supF, aveF, and expF statistic that are provided in the strucchange program in R. So I guess, am I better off programming everything in R or Stata? There doesn't seem to be a lot of useful information in the table above.


Return to “Add-in Support”

Who is online

Users browsing this forum: No registered users and 2 guests