Parameter stability testing for Austria

Dear all,
I am having a major issue at testing for parameter stability, using ESS procedure, developed by Inoue and Rossi. For Slovenia and Italy, I obtain perfect result, a positive SupLR value, that is result of Andrews (1993) QLR test. However, for Austria, the value is negative! If I make a modification to the formula for Chow test, than the SupLR value becomes positive, however, I can't change the methodology for consistency reasons.
Does anyone have any idea what is wrong with Austria?
Thank you so much!
Here is the formula, line 53 in attached file:
  1. original with minus in the beginning:
chow=-2* (L-(L1*(t2/T)+(1-t2/T)*L2));
2. modified without minus in the beginning:
chow=2* (L-(L1*(t2/T)+(1-t2/T)*L2));

Respuestas (1)

dpb
dpb hace alrededor de 2 horas
Editada: dpb hace 14 minutos
No way anybody can tell other than by going back to the beginning for the specific data set.
But, the problem is that the quantity
(L1*(t2/T)+(1-t2/T)*L2)
is less than L while it must be greater than L in order for -2 times the difference to be positive.
We, of course, have no idea of what any of those terms are nor how they're obtained but something went awry long before now it would appear.
Although the t1,12 over T terms are weighting L1, L2 by a fractional time duration over the total; possibly a not-too-bad problem might be the time frames provided aren't consistent? That should be relatively easy to check and if were to be a problem, relatively easy fix. More than that that there's something bum about the L values is probably a lot more trouble to debug.
The above would be somewhat simpler to read if the terms were written consistently as
chow=-2*(L-(L1*(t2/T) + L2*(1-t2/T)));
NOTA BENE that t2/T + (1-t2/T) --> 1 + t2/T -t2/T --> 1
Consequently, for the end result to be positive we've already noted that the whole expression in L must be negative. That also then implies that (L1 + L2) must be > L.
This is undoubtedly more iffy code full of all the previously identified issues, but let's see what it looks like.
It would have been MUCH simpler/better to have provided the code where could be read, btw...
L=readlines('test.m'); % load the m-file
L=L(strlength(L)>0); % get rid of the zillion blank lines
ix=find(startsWith(L,'load')); % beginning of useful code by inspection
L([1:11 ix:end]) % display without extended header comment section
ans = 103×1 string array
"% test.m: This file performs the ESS (Estimate of Set of Stable parameters)" "% procedure developed by Inoue and Rossi (2011), that allows to identify " "% the subset of parameters of a model that are stable over time." "%" "%" "% Step 1: Test the joint null hypothesis that all parameters of the NKM " "% model are stable, using Andrews'(1993) QLR stability test." "%" "% Step 2: In case a break is identified, the ESS procedure developed by " "% Inoue and Rossi (2011) is conducted." "%" "load pvqlrsb.txt;" "T=114; " "result=est(1:1:T); " "L=result.likelihood; " "param=result.param;" "t2v=round(T*0.15):1:round(T*0.85); " "Andrews=zeros(length(t2v),1); " "AP=0; " "Nyb=0; " "AP0=0;" " for t2=t2v; t2," " vecdates=1:1:t2; result=est(vecdates); L1=result.likelihood; " " vecdates=t2+1:1:T; result=est(vecdates); L2=result.likelihood;" " chow=-2* (L-(L1*(t2/T)+(1-t2/T)*L2)); " " Andrews(t2-round(T*0.15)+1,1)=chow; " " end;" " " " Jinv=1/length(t2v);" " "
And, indeed -- this shows us a possible problem with T being a hardcoded number
T=114;
We've now way to know what this actually represents (although guessing from prior code it's an expected number of elements in a time series). This number may match up with the other data sets; is it the right number for this data set as well?
Again, have to read the code and make sure it has been modified everywhere it needs to be for a different data set than what was developed for -- hardcoding in magic numbers like this is extremely risky.
If you're lucky, it may be as simple as fixing that...

Productos

Versión

R2025b

Preguntada:

hace alrededor de 3 horas

Editada:

dpb
hace 18 minutos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by