Example: GAUSS Sbreak procedure
This example follows the empirical application of Bai and Perron (2003). Below we use the
GAUSS sbreak procedure to estimate breaks in the mean of the US expost real interest rate. The first step is to directly load the quarterly series of the three-month treasury bill provided in the file
real.dat:
| |
| library tsmt; |
| |
| |
| load y[] = real.dat; |
| |
| |
| |
| z = ones(rows(y),1); |
| |
| |
| x = 0; |
Next we declare and initialize the structural break control structure and set model specific parameters:
| |
| struct sbControl sbc0; |
| |
| |
| sbc0 = sbControlCreate(); |
Then we specify the model parameters:
| |
| sbc0.q = 1; |
| |
| |
| sbc0.m = 5; |
| |
| |
| sbc0.trim = 0.15; |
| |
| |
| sbc0.h = 0; |
| |
| |
| sbc0.printOutput = 1; |
| |
| |
| sbc0.maxIters = 40; |
Finally we declare the output structure and call the
sbreak procedure:
| |
| struct sbOut SBout; |
| |
| |
| SBout = sbreak(y,z,x,sbc0); |
Which prints out the following report.
| Global optimization of structural change model |
| |
| The model with 1 breaks has SSR : 644.99552 |
| The dates of the breaks are: |
| 79 |
| |
| The model with 2 breaks has SSR : 455.95018 |
| The dates of the breaks are: |
| 47 |
| 79 |
| |
| The model with 3 breaks has SSR : 445.18186 |
| The dates of the breaks are: |
| 24 |
| 47 |
| 79 |
| |
| The model with 4 breaks has SSR : 444.87975 |
| The dates of the breaks are: |
| 24 |
| 47 |
| 64 |
| 79 |
| |
| The model with 5 breaks has SSR : 449.63949 |
| The dates of the breaks are: |
| 16 |
| 31 |
| 47 |
| 64 |
| 79 |