Breusch and Pagan (1979) designed a test to confirm or reject the null assumption that the residuals from a regression are homogeneous, that is, with a constant volatility. The following formula represents their logic. First, we run a linear regression of y against x:
Here, y is the dependent variable, x is the independent variable, α is the intercept, β is the coefficient, and is an error term. After we get the error term (residual), we run the second regression:
Assume that the fitted values from running the previous regression is t f, then the Breusch-Pangan (1979) measure is given as follows, and it follows a χ2 distribution with a k degree of freedom:
The following example is borrowed from an R package called lm.test
(test linear regression), and its authors are Hothorn et al. (2014). We generate a time series of x, y1 and y2. The independent variable is x, and the dependent variables are y1 and y2. By our design, y1 is homogeneous, that...