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

stanM
Posts: 2
Joined: Tue Sep 11, 2012 11:38 am

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

Postby stanM » Tue Sep 11, 2012 11:49 am

I am struggling with the BaiPerron breakpoint test because any equation I estimate using LS, even the simplest one regressing e.g. output on prices from 1984Q1 to 2010Q4 gives as an error message: "R(for 'library(strucchange)') returned an error: evaluation stopped because of an error." (min subsample size 0.15, I tried however also others).

I have installed R 2.15, the strucchange package, statconn and then Eview 7.2 and the BaiPerron addin. I have even reinstalled and installed the package to see whether it is correctly installed.

I will appreciate a response! Thank you very much!

JimForest
Posts: 83
Joined: Thu Oct 16, 2008 7:53 pm
Location: MA

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

Postby JimForest » Tue Sep 11, 2012 12:05 pm

You also need StatconnDCOM

Download and install the current R&Friends on this site:

http://rcom.univie.ac.at/download.html

stanM
Posts: 2
Joined: Tue Sep 11, 2012 11:38 am

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

Postby stanM » Tue Sep 11, 2012 2:56 pm

@JimForest: Great! Thank you so much!!! It works now!

This forum is really helpful and I want to thank the admins for their support and the idea with the add ins! I was wondering, why not create an addin conducting a Chow break point test of a VAR system of equations as .e.g in JMulti. Thank you!

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

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

Postby EViews Gareth » Tue Sep 11, 2012 3:32 pm

Should be relatively straight forward to do the LR form of the test, just estimate over the full sample, then over the sub-samples and figure out what the LR statistic is.
Follow us on Twitter @IHSEViews

JimForest
Posts: 83
Joined: Thu Oct 16, 2008 7:53 pm
Location: MA

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

Postby JimForest » Tue Sep 11, 2012 4:48 pm

stanM wrote:@JimForest: Great! Thank you so much!!! It works now!

This forum is really helpful and I want to thank the admins for their support and the idea with the add ins! I was wondering, why not create an addin conducting a Chow break point test of a VAR system of equations as .e.g in JMulti. Thank you!


No problem @stanM. I find this test to be very useful. In fact, I didn't care too much for R. But using the Statcom to interact and bring data back into EViews is a great feature. I've used the com features with Matlab as well and it interacts faster between those two environments (EViews and Matlab).

Chen
Posts: 3
Joined: Tue Oct 30, 2012 8:26 am

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

Postby Chen » Tue Oct 30, 2012 8:50 am

Hey guys,

" Loading StatConnector Server... Done
Initializing R...Function call failed
Code: -2147221485
Text: installation problem: unable to load connector
Releasing StatConnector Server...Done

Test1
Method '~' of object '~' failed "

How I slove this problem? and I have reinstalled R.

Thanks!

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

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

Postby EViews Gareth » Tue Oct 30, 2012 10:22 am

Looks like it is an issue with statconnector. You'll have to contact them.
Follow us on Twitter @IHSEViews

JimForest
Posts: 83
Joined: Thu Oct 16, 2008 7:53 pm
Location: MA

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

Postby JimForest » Tue Oct 30, 2012 1:11 pm

I had that problem the first time I installed stat comm.

I think the best way to address the problem is to install "R and Friends" and the installer should follow the install sequence that enables the process to be activated properly.

Give this a try: http://rcom.univie.ac.at/download.html#ROOo

After using this connector between EViews and R, you should be able to call R directly from EViews programs. This is well documented in the EViews documentation.

I find EViews to be my preferred means of accessing R (and Matlab).

With those three programs, there is little you are unable to do.

Chen
Posts: 3
Joined: Tue Oct 30, 2012 8:26 am

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

Postby Chen » Wed Oct 31, 2012 8:53 pm

Hi Gareth and Jimforest,
Thanks for your help! It works well now.

I have another simple question. If I want to test structure break for a univariate(Y) of time series, what equation should I setting?
Is that "ls Y C "OK? or anything else?

Many thanks!

JimForest
Posts: 83
Joined: Thu Oct 16, 2008 7:53 pm
Location: MA

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

Postby JimForest » Wed Oct 31, 2012 8:58 pm

If you want to test for a structural break in the mean, I would suggest you just regress the dependent variable on a constant.

Chen
Posts: 3
Joined: Tue Oct 30, 2012 8:26 am

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

Postby Chen » Wed Oct 31, 2012 11:39 pm

It is exactly what I am thinking, I will try, thanks!

qn3
Posts: 11
Joined: Thu Aug 23, 2012 12:26 am

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

Postby qn3 » Wed Nov 07, 2012 6:46 pm

Hi all,

Is the BaiPerron only detect the breakpoints? I mean it does not provide unit root test right?

If I need to do unit root test on time series that have one or more than one breaks, what should i do?

Thx!

qn3
Posts: 11
Joined: Thu Aug 23, 2012 12:26 am

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

Postby qn3 » Wed Nov 07, 2012 7:10 pm

JimForest wrote:If you want to test for a structural break in the mean, I would suggest you just regress the dependent variable on a constant.


hi If i want to test for strucutual breaks in trend and constant, can i regress both?

y c @trend ?

JimForest
Posts: 83
Joined: Thu Oct 16, 2008 7:53 pm
Location: MA

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

Postby JimForest » Wed Nov 07, 2012 7:30 pm

Yeah, well you are testing for a structural break in the residuals of a regression of that form.

qn3
Posts: 11
Joined: Thu Aug 23, 2012 12:26 am

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

Postby qn3 » Wed Nov 07, 2012 10:34 pm

JimForest wrote:Yeah, well you are testing for a structural break in the residuals of a regression of that form.


Thank you !
if price series is stock price, do I need to log the series before using this addin?


Return to “Add-in Support”

Who is online

Users browsing this forum: No registered users and 53 guests