/****************************break_fh.txt**********************************************/
/* txt file for break tests*/
new;
format /ld 6,4;
cls;
/*—————————————————–*/
/* Read Pakistan data from file as a matrix named mat, then get the variables from the columns of this matrix */
load mat[36, 6] = "Pakistan_data.txt";
Year = mat[.,1];
CO = mat[.,2]; GI = mat[.,3]; LY = mat[.,4]; EC = mat[.,5];
GL = mat[.,6];
bigt = rows(mat);
/* Define the dependent variable ( denoted y below) and independent variables (collected in matrix ZZ) for regression */
/* Here the dependent is YY and the independent variables are FD, K, L and GL,
collected in the matrix ZZ = [FD, K, L, GL] */
y = CO;
/* Change Y and ZZ according to what you want to test */
ZZ = GI~LY~EC~GL; /* do not include (or add) a column of ones in ZZ matrix */
z = ZZ; /* Here, I select the first column of ZZ as a regressor to test the code as it is,
change the definition of z according to your needs */
x = 0;
q = 4; /* number of regressors whose coefficients are allowed to change: the intercept and slope */
p = 2; /* number of first differenced regressors used for DOLS estimation */
m = 3; /* maximum number of structural changes allowed */
eps1 = 0.15; /* Value of the trimming (in percentage) for the construction and critical values of the sup type tests */
h = int(eps1*(bigt-5)); /* minimal length of a segment (h >= q) */
/*
the following are options if p > 0.
———————————– */
fixb = 0; /* set to 1 if use fixed initial values for beta */
betaini = 0; /* if fixb=1, load the initial value of beta. */
maxi = 20; /* maximum number of iterations for the nonlinear procedure to
obtain global minimizers. */
printd = 0; /* set to 1 if want the output from the iterationsto be printed. */
eps = 0.001; /* criterion for the convergence. */
dotesting = 1;
call pbreak(bigt,y,z,q,m,h,eps1,p,dotesting,fixb,x,q,eps,maxi,fixb,betaini,printd);
/* —– Uncomment one of the following lines to perform the desired test —- */
/* #include C:\gauss10\break_tests1.src */
/* #include C:\gauss10\break_tests2.src */
@ #include C:\gauss10\break_tests2.src @
#include break_tests2.src @set the path to where you store the file@
end;