Within the field of statistics, we define breaks in statistical time series as occurring when a time series abruptly changes at a point in time, perhaps to a change in defining and observing a variable over time. Examples of specific causes of breaks include changes in classifications used and definitions of the variable. These changes in variables could be very difficult to deal with; for example, when interpreting economic events, it is of very high importance to the continuity and consistency of data over time. Thus when these breaks occur, it is important to recognize them and change the analysis to account for them. Within economics, variables such as CPI, GDP, and GNP have all had changes in measurement; thus, it’s important to be able to detect these changes and use them to create a segmented model.
While it’s easy to assume that a data set has breaks, it can be quite difficult to find if we have one or multiple breakpoints when just looking at a data set or regression. Thankfully Bai and Perron (1998) found a “simpler” method. As a quick example, consider the following time series MLS with \(m\) amount of breaks which Bai and Perron discussed in their paper:
\[y_t=x'_t\beta + z'_t\delta_j+u_t \text{ Where } t=(T_{j-1}+1,....,T_j)\]
Where \(y\) is the response variable, \(x_t\) and \(z_t\) are vectors of our explanatory variables and \(\beta\), \(\delta\) are the corresponding coefficients, and finally, \(u_t\) is the error term. Now the index \((T_1,..,T_m)\) are the unknown breakpoints. Now when using this model goal is to figure out the regression coefficients in the presence of these breakpoints. Now while I’m not going to go through the entire proof of showing how we can estimate these breakpoints, using a sum of least squares method, the formula becomes:
\[(\hat{T_1},...,\hat{T_m}) = argmin_{T_1,..,T_m}S_T(T_1,..,T_m)\]
This is where the minimization is taken over all partitions of \((T_1,..,T_m)\) such that \(T_i-T_{i-1}\geq q\) where q is the number of predictor variables. These are global minimizers of the entire regression. Thus regression parameter estimates become functions of the partitions of the number of breaks points thus \(\hat{\beta}(\{\hat{T_j}\}),\hat{\delta}(\{\hat{T_j}\})\).
These global minimizers can take a long time to compute; however, using a triangular matrix of sums of squared residuals and dynamic programming can make it faster. Thankfully R has created a function based on these methods, which can compute the number of breakpoints in regression relationships. Given a number of breaks, the function computes the optimal breakpoints. This can then determine where the model’s SSR and BIC intersect. This paper will show an example of this process and use breaks to estimate the Phillips Curve using data from England between 1947 and 1987.
The Phillips curve is popular in economics which shows the relationship between unemployment and rates of wage rises (inflation) within an economy. For this paper, we’ll be using the expectations-augmented Phillips curve, which is slightly different from the original as this takes expected inflation into account:
\[\Delta w_t = \alpha_1 +\alpha_2 E(\Delta p_t | I_{t-1}) + \alpha_3 \Delta u_t +\alpha_4 u_{t-1} + \xi_t\]
In this expression \(w_t\) is the log of nominal wages, \(p_t\) is the log of the CPI, \(u_t\) is the unemployment rate. This also assumes inflation is an AR(1) which means: \[E(\Delta p_t | I_{t-1}) = \delta_1 + \delta_2\Delta p_{t-1}\] Where \(\delta_1\) is the steady state inflation rate and \(\delta_2\) is the auto regressive term which is interpreted as measuring the persistence of inflation. Thus putting this back into the original Phillips curve gives us: \[\Delta w_t = \gamma_1 + \gamma_2 \Delta p_{t-1} + \gamma_2 \Delta u_t + \gamma_4 u_{t-1} + \xi_t\]
We will be using this model on data collected from the world bank which gives us the log of CPI, log wages, and the unemployment rate. From these variables we’ll calculate the difference and lag terms.
First importing the data and creating both the lag and difference terms to use in our model:
England<- read.table("/Users/kenfritzell/Downloads/bp-data/uk.dat")
colnames(England)[1] = "Year"
colnames(England)[2] = "p"
colnames(England)[3] = "w"
colnames(England)[4] = "u"
#England$DiffCPI <- diff(England$LogCPI, differences = 1)
England = England %>% mutate(dp = p-lag(p))
England = England %>% mutate(dw = w-lag(w))
England = England %>% mutate(du = u-lag(u))
England = England %>% mutate(u1 = lag(u, n=1, order_by=Year))
England = England %>% mutate(dp1 = lag(dp, n=1, order_by=Year))
England = England %>% mutate(Year = ymd(England$Year, truncated = 2L))
head(England)
Again this data is set as national data collected from the world bank, which gives us the log of CPI, log wages, and the unemployment rate from England from 1947-1987. From these variables, we’ll calculate the difference and lag terms. We will use the following notation:
Now with the data imported, we will now use the ts() function, which converts a numeric vector into an R time series object. For this, we will be looking at the first differences in the difference in wage variable, which is our response variable between 1947 and 1987.
tsEngland <-ts(England,start = 1855, end = 1987)
uk <- window(tsEngland,start = 1948)
plot(uk[, "dw"])
From this graph we see that there might be two breaks between 1947 and 1987. Specifically there seems to be a sharp change in the late 1960s and mid to late 1970s. Because we suspect a break we’ll run a test for up to five breaks.
## Phillips curve equation
## estimate breakpoints
bp.pc <- breakpoints(dw ~ dp1 + du + u1, data = uk, h = 5, breaks = 5)
## look at RSS and BIC
plot(bp.pc)
To interpret this graph, we want to choose the number of breakpoints where the BIC and RSS cross. We see that this cross happens around the two-in-a-half mark; however, we only want to choose full breaks, not partial; thus, we’ll continue this analysis assuming two breaks. Now run our Philips curve equation with two breaks.
fac.pc <- breakfactor(bp.pc, breaks = 2, label = "seg")
fm.pc <- lm(dw ~ 0 + fac.pc/dp1 + du + u1, data = uk)
summary(fm.pc)
##
## Call:
## lm(formula = dw ~ 0 + fac.pc/dp1 + du + u1, data = uk)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.041392 -0.011516 0.000089 0.010036 0.044539
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## fac.pcseg1 0.06574 0.01169 5.623 3.24e-06 ***
## fac.pcseg2 0.06231 0.01883 3.310 0.00232 **
## fac.pcseg3 0.18093 0.05388 3.358 0.00204 **
## du -0.14408 0.58218 -0.247 0.80611
## u1 -0.87516 0.37274 -2.348 0.02523 *
## fac.pcseg1:dp1 0.09373 0.24053 0.390 0.69936
## fac.pcseg2:dp1 1.23143 0.20498 6.008 1.06e-06 ***
## fac.pcseg3:dp1 0.01618 0.25667 0.063 0.95013
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.02021 on 32 degrees of freedom
## Multiple R-squared: 0.9655, Adjusted R-squared: 0.9569
## F-statistic: 112 on 8 and 32 DF, p-value: < 2.2e-16
Now the two main variables we’re interested in studying economics are the intercepts representing the steady state inflation rate and \(\gamma_2\), which is the coefficient for the persistence of inflation.
Looking back at our Philips curve equation, we can interpret \(\gamma_1 = \alpha_1 \delta_1\), which are the intercepts. From this output, the “fac.pcseg#” represents this variable for segments one through three. While the intercepts don’t matter in these functions, they represent the steady state inflation rate in this function. In this function, we note that for all segments, the steady state inflation rate is significant with a p-value under .05. Interestingly, we see that in segments one and two, the steady state inflation rate is around the same at .06 but in the third segment it jumps to .18.
The next variable we’ll interpret is the “fac.pcseg#:dp1” from our model; this is expressed as \(\gamma_2 = \alpha_2 \delta_2\), which measures the persistence of inflation. Now what’s interesting is a substantial increase in this coefficient in the first segment from 0.094 to 1.23. In the third segment, \(\gamma_2\) shows a substantial decrease going back to .016. While the only significant persistence of the inflation coefficient is the one for segment two, the difference between the three is important to note.
Now the two variables we don’t care as much about are our \(du\), which is the difference in unemployment, and \(u1\), which is the unemployment lag. We note that the lag factor of unemployment has a negative coefficient at \(u1=-.88\) and is significant with a p-value under the .05 alpha level. This makes sense in economics as we know when demand for labor is low and unemployment is high, workers are willing to start accepting lower wages. Now we note that the difference in unemployment isn’t significant with a .05 cut-off value.
Overall this model does a really good job at fitting the data as we have an adjusted r squared value at \(R^2_{adj}=.96\) which means that 95% of the variability observed in the wage variable is explained by our model.
Now that we’ve figured out the coefficients for this model we want to figure out where the breaks are located:
confint(bp.pc, breaks = 2, het.err = FALSE)
##
## Confidence intervals for breakpoints
## of optimal 3-segment partition:
##
## Call:
## confint.breakpointsfull(object = bp.pc, breaks = 2, het.err = FALSE)
##
## Breakpoints at observation number:
## 2.5 % breakpoints 97.5 %
## 1 19 20 21
## 2 27 28 29
##
## Corresponding to breakdates:
## 2.5 % breakpoints 97.5 %
## 1 1966 1967 1968
## 2 1974 1975 1976
Creating a confidence interval for breakpoints of optimal 3-segment partition, we find that the first break is between 1966 and 1968. Thus we’ll choose the middle value as our first break in 1967. This makes sense looking at history, given this time was the end of the Bretton Woods system was a set of rules for setting the international currency exchange rates. The second break is between 1974 and 1976; thus, we’ll use 1975 as our second break point. We can assume this break is the cause of the ending effects of dropping the Bretton Woods system.
Now the last thing we must check in this data analysis is the model’s assumptions. The three big assumptions in time series we’ll check are:
First, checking autocorrelation, which a degree of similarity between a given time series and a lagged version of itself over successive time intervals. In time series, we want there to be no autocorrelation; which we can test a plot of the autocorrelation of residuals in a time series by lag:
acf(fm.pc$residuals, type = "correlation")
From this graph we want the residuals ACF to be between the two dotted blue lines as the lags increase. We see that this hold except for lag zero which makes sense as it’s expected to be correlated with itself at the start. Thus we’ve met the autocorrelation assumption.
Now the stationary condition assumes that the time series data mean and variance of the response variable, in this case wages, do not vary across time. To test this we can run a Dickey-Fuller Test.
adf.test(uk[,6])
##
## Augmented Dickey-Fuller Test
##
## data: uk[, 6]
## Dickey-Fuller = -0.98671, Lag order = 3, p-value = 0.9276
## alternative hypothesis: stationary
The Dickey-Fuller Test assumes the data is stationary thus we want a p-value greater than our .05 level. From our output we receive a p-value of .93 which tells use that our wage variable of interest is stationary.
Finally we want to check for seasonality which assumes there’s no trends or pattern which occur on a regular basis in our data. We can check this visually by plotting the wage variable across time:
plot(uk[, "dw"])
As we see there doesn’t seem to be any pattern which occurs every year or regularly thus we’ll conclude we don’t have any seasonality issues. Because of that we have checked the three main conditions for this time series model and have passed each signaling we have a good model.
Since we’ve checked all the main model conditions and received a \(R^2_{adj}=.96\), we have created a pretty good model for the Philips curve in England from 1947-1987. Within this model, we needed to use a two-break model and split the data into three segments. These breaks occurred in 1967, dating around the end of the Bretton Woods system, and in 1975, the end of the effects of replacing this long-lasting Bretton Woods system. The most interesting thing we noticed was a significant increase in the persistence inflation coefficient between the first break in 1967 from 0.094 to 1.23. This supports the theory that persistent inflation increases in the absence of an economic “force” to move it from its current level, which was the role of the Bretton Woods system.
While we were able to make a lot of observations from creating this expectations-augmented Phillips curve, one small issue is that some variables weren’t significant in explaining the wage data. Thus perhaps we can do further studies looking at other ways of modeling the Phillips curve, such as the nonlinear model and many other linear models economists have studied in the past. Also, this data was specific to England from 1947 and 1987, which might be interesting to look at other countries to see if we get similar results or if there are other relationships to explain wages.
Overall, running this time series analysis, we’ve been able to predict the wage variable quite well using the expectations-augmented Phillips curve with breaks.
Bai J, Perron P. 1998 Estimating and testing linear models with multiple structural changes. Econometrica 66 47–78.
Jushan Bai & Pierre Perron, 2003. “Computation and analysis of multiple structural change models,” Journal of Applied Econometrics, John Wiley & Sons, Ltd., vol. 18(1), pages 1-22.