BaiPerron (BaiPerron breakpoint test  Requires R)
Moderators: EViews Gareth, EViews Moderator, EViews Esther
Re: BaiPerron (BaiPerron breakpoint test  Requires R)
Thanks it worked after removing the dummy.

 Posts: 3
 Joined: Fri Apr 08, 2011 8:08 am
Re: BaiPerron (BaiPerron breakpoint test  Requires R)
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 timeseries of stock data, I want to test for structural breaks that would invalidate unit root tests and found the 'baiperron' addin. 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 addin? Stupid question no doubt, but the Proc>Addin option is empty and I can't see any other references to addins?
When I click on the Addins > Manage Addins I can see baiperron (it's the only addin 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.
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 timeseries of stock data, I want to test for structural breaks that would invalidate unit root tests and found the 'baiperron' addin. 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 addin? Stupid question no doubt, but the Proc>Addin option is empty and I can't see any other references to addins?
When I click on the Addins > Manage Addins I can see baiperron (it's the only addin 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.

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 12940
 Joined: Tue Sep 16, 2008 5:38 pm
Re: BaiPerron (BaiPerron breakpoint test  Requires R)
The BaiPerron addin is an equation Addin. That means it only appears on the Addin menu when you have an equation object open.
Follow us on Twitter @IHSEViews

 Posts: 3
 Joined: Fri Apr 08, 2011 8:08 am
Re: BaiPerron (BaiPerron breakpoint test  Requires R)
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.
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.

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 12940
 Joined: Tue Sep 16, 2008 5:38 pm
Re: BaiPerron (BaiPerron breakpoint test  Requires R)
The BaiPerron 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 addin menu to see the Bai Perron test.
Follow us on Twitter @IHSEViews

 Posts: 3
 Joined: Fri Apr 08, 2011 8:08 am
Re: BaiPerron (BaiPerron breakpoint test  Requires R)
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 addin in Eviews? Will Eviews automatically detect it?)
Thanks again for your help!
Adam.
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 addin in Eviews? Will Eviews automatically detect it?)
Thanks again for your help!
Adam.

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 12940
 Joined: Tue Sep 16, 2008 5:38 pm
BaiPerron (BaiPerron breakpoint test  Requires R)
See the manual for details on using R
Follow us on Twitter @IHSEViews
Re: BaiPerron (BaiPerron breakpoint test  Requires R)
Hi,
I'm facing some problem with this addin. 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 (64bit), R (64bit) and Eviews 7.2 (32bit). I've also tried with R (32bit) but still get the same error message. Programs are installed in the Program Files directories/directory (default settings). Any ideas?
Thanks
Vasilis
I'm facing some problem with this addin. 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 (64bit), R (64bit) and Eviews 7.2 (32bit). I've also tried with R (32bit) but still get the same error message. Programs are installed in the Program Files directories/directory (default settings). Any ideas?
Thanks
Vasilis

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 12940
 Joined: Tue Sep 16, 2008 5:38 pm
Re: BaiPerron (BaiPerron breakpoint test  Requires R)
Have you installed StatConnector etc...?
Follow us on Twitter @IHSEViews
Re: BaiPerron (BaiPerron breakpoint test  Requires R)
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
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
Re: BaiPerron (BaiPerron breakpoint test  Requires R)
Hi Gareth,
OK I got it, I found the necessary components and now it runs fine
Thanks
Vasilis
OK I got it, I found the necessary components and now it runs fine
Thanks
Vasilis
Re: BaiPerron (BaiPerron breakpoint test  Requires R)
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 ?
Is it possible to change this value so that the maximum number of breaks are 4,3,2 or,1 ?

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 12940
 Joined: Tue Sep 16, 2008 5:38 pm
Re: BaiPerron (BaiPerron breakpoint test  Requires R)
There's nothing in the Addin that will do it, however if you look at the R documentation, you'll see that they do, sort of, support such an option:
So, you could always edit the addin code that calls the R routine, and add a "breaks=" 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 addin code that calls the R routine, and add a "breaks=" option.
Follow us on Twitter @IHSEViews
Re: BaiPerron (BaiPerron breakpoint test  Requires R)
Thanks, changing the Rcode 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 BaiPerron 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 BaiPerron routine by a command rather than by using the menu?
Thanks for your help!
*** 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 BaiPerron 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 BaiPerron 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, 551563. 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, 27835.
Thanks for your help!
Re: BaiPerron (BaiPerron breakpoint test  Requires R)
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
LogLik 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, LogLik, and RSS statistics corresponding to that break, but this doesn't help when it comes to calculating the appropriate F test statistics. The BaiPerron paper calculates a series of Ftest 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.
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
LogLik 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, LogLik, and RSS statistics corresponding to that break, but this doesn't help when it comes to calculating the appropriate F test statistics. The BaiPerron paper calculates a series of Ftest 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.
Who is online
Users browsing this forum: No registered users and 2 guests