Chow test + error message with the Andrews-Quandt test

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

maragloria
Posts: 105
Joined: Tue Jun 29, 2010 7:09 am

Chow test + error message with the Andrews-Quandt test

Postby maragloria » Mon Nov 22, 2010 1:11 pm

Hi There,

I am using EViews 7 and I have a question about implementing the Andrews-Quandt test for unknown breakpoint with my own code.

I am following the instructions on the book by Stock & Watson (Introduction to econometrics, 2003 edition). The authors call the “Quandt Likelihood Ratio (QLR) statistic”.

The way I am doing with EViews is:
- Do the 15% trimming
- Run OLS regressions on the subsamples along with the Chow test (I am using a for loop)
- Save the resulting Wald statistics in a series
- Divide the W statistics by the number of restrictions (in my case, 3) to get the F-statistics
- Use the critical values provided by Stock & Watson to decide what is the date of the breakpoint (the date at which the F-statistic is at a maximum – and above the 5% critical level)

My first question is: If I implement the Chow test this way would I get the same results (in terms of the date of the breakpoint) as with Eviews’s Andrews-Quandt test? (Please see my code below)

The reason why I am doing this myself is because I am getting the error message from Eviews when I do the Andrews-Quandt test: “Specification leads to zero or invalid breakpoints". Why would that happen ?

Thanks for your help,

Mara

Code: Select all

smpl 1981Q1 2010Q3 for %pays au ca nz nw ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' CHOW TEST (my own QLR implemtation) ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' series chow_{%pays} for !i=18 to 101 '#18 = 1985Q1, #101 = 2005Q4 %obs = @otod(!i) 'least-square regression equation ols_{%pays}.ls(cov=hac) qss_{%pays} c pln_nonen pln_oil 'obtaining the F-statistic freeze(mode=overwrite, chowtab) ols_{%pays}.chow %obs chow_{%pays}(!i) = @val(chowtab(6,2)) next series chow_f_{%pays} = chow_{%pays} / 3 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Andrews-Quandt TEST (EViews' QLR implemtation) ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'obtaining the F-statistic 'Andrews-Quandt test for unknown breakpoint, 15% trimming ols_{%pays}.ubreak(wfname = chow_{%pays}_evw) 15 next delete chowtab

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

Chow test + error message with the Andrews-Quandt test

Postby EViews Gareth » Mon Nov 22, 2010 1:53 pm

That appears to be the correct way to do it. Hard to tell what could cause the error without seeing the data

maragloria
Posts: 105
Joined: Tue Jun 29, 2010 7:09 am

Re: Chow test + error message with the Andrews-Quandt test

Postby maragloria » Tue Nov 23, 2010 7:13 am

Hi Gareth,

Thanks for your reply. Please find attached the data I am using for one country. The error message is the same for the remaining 3 countries.

- qss_au is the natural log of the real exchange rate for Australia. It's normalised by subtracting its mean and dividing by its standard deviation.
- pln_nonen is the natural log of non-energy commodity prices (real values, using CPI from US)
- pln_oil is the natural log of oil prices (real values, using CPI from US)

Regards,

Mara
Attachments
data_aq.xls
(24 KiB) Downloaded 394 times

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

Re: Chow test + error message with the Andrews-Quandt test

Postby EViews Gareth » Tue Nov 23, 2010 9:27 am

Is your copy of EViews 7 up to date? I was able to run the test just fine on that data.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 1 guest