AGBOLA
AGBOLA
net/publication/352441415
CITATIONS READS
5 2,056
4 authors, including:
Oluwaseun Adegbilero-Iwari
Afe Babalola University
27 PUBLICATIONS 62 CITATIONS
SEE PROFILE
All content following this page was uploaded by Oluwaseun Adegbilero-Iwari on 16 June 2021.
ABSTRACT: Heteroscedasticity occurs mostly because naturally decreases. Also, as income grows, one has
of beneath mistakes in variable, incorrect data choices on how to dispose the income, consequently,
transformation, incorrect functional form, omission of 𝜎 2 is more likely to increase with the income. Also,
important variables, non-detailed model, outliers and a company with a large profit will give more
skewness in the distribution of one or more independent
variables in the model. All analysis were carried out in R
dividends to their shareholders than a company that
statistical package using Imtest, zoo and package.base. was newly established. In a situation where data
Five heteroscedasticity tests were selected, which are collecting technique improves, 𝜎𝑖 2 is more likely to
Park test, Glejser test, Breusch-Pagan test, White test and decrease. In the same sense, banks with good
Goldfeld test, and used on simulated datasets ranging equipment for processing data are less prone to
from 20,30,40,50,60,70,80,90 and 100 sample sizes make error when processing the monthly statement
respectively at different level of heteroscedasticity (that is of account of their customers than banks that does
at low level when sigma = 0.5, mild level when sigma = not have good facilities. Heteroscedasticity can also
1.0 and high level when sigma = 2.0). Also, the come to play due to outliers. Outliers are
significance criterion alpha = 0.05. However, each test
observations that are much different in a population.
was repeated 1000 times and the percentage of rejection
was computed over 1000 trials. For Glejser test, the
It can either be too large or small in relation to the
average empirical type I error rate for the test reject more observation in such sample. It can also be as a result
than expected while Goldfeld has the least power value. of violation of the assumption that regression model
Therefore, Glejser test has the highest capacity to detect is correctly specified. Not only that, it can be as a
heteroscedasticity in most especially on simulated result of skewness in the distribution of one or more
datasets. regressors included in the model. Skewness is when
KEYWORDS: Park test, Glejser test, Breusch-Pagan test, a distribution is right skewed. Heteroscedasticity
White test, Goldfeld test may be as a result of incorrect data transformation
and incorrect functional form. Heteroscedasticity is
1. INTRODUCTION not a property that is necessarily restricted to cross
sectional data or time series data where there occurs
One of the assumptions of classical linear regression an external shock or change in circumstances that
model states that the disturbances 𝑢𝑖 featuring in created uncertainty about y [7]. Cross sectional data
the population regression function are of the same involves data that deal with members of a population
variance; meaning that they are homoscedatic. In at a particular time. Here, members may be of
other words, the variance of residuals should not different types, size, and completion while time
increase with fitted values of response variable series data are similar in order of magnitude [6].
(SelvaPrabhakara, 2016). When this assumption More often than not, heteroscedasticity arises when
fails, its consequence is what is termed some variables that are important are omitted from
heteroscedasticity which can be expressed as: the model or superfluous of variables in a model
𝐸(𝑢𝑖 2 ) = 𝜎 2 i= 1, 2 …n (model specification error).
There are several reasons why we can have
variability in the variance of 𝑢𝑖 . The study on error 1.1 Model specification
learning models shows that as people learn over Applied econometrics is based on understanding
time, their errors rates reduce drastically such that intuition and skill. Users of economic data must be
𝜎𝑖 2 is expected to decrease. Practically, as one able to give model that other people can rely on [10].
increases his or her number of typing hours, the rate Assumption of Classical Linear Regression Model
of errors committed decreases while the variance states that the regression model used in the analysis
78
Anale. Seria Informatică. Vol. XVIII fasc. 2 – 2020
Annals. Computer Science Series. 18th Tome 2nd Fasc. – 2020
used in detecting specification error, Where 𝑣𝑖 is the transformed disturbance term, equal
f. know how to judge the strength of competing to 𝑢𝑖 /𝑋𝑖 . Now it is easy to verify that:
models. 𝑢 2 1
𝐸(𝑣𝑖 2 ) = 𝐸 (𝑋𝑖 ) = 𝑋𝑖 2
𝐸(𝑢𝑖 2 ) 2.3
𝑖
1.2 How to identify heteroscedasticity
= 𝜎 2 (by using 𝐸(𝑢𝑖 2 ) = 𝜎 2 𝑋𝑖2 ) 2.4
The residual from linear regression are
e = 𝑌 − 𝑌̂ = 𝑌 − 𝑋𝛽̂ It should be noted that in the regression
which is used in place of unobservable errors 𝜀 [3]. transformation, the intercept term 𝛽2 is the slope
Residual are used to detect the behaviour of variance coefficient in the original equation and the slope
with datasets. Residual plots, where residuals 𝜀𝑖 are coefficient 𝛽1 is the intercept term in the original
plotted on the y-axis against the dependent variable model. Therefore, to get to the original model we
𝑦̂𝑖 on the x axis are the most commonly used tool shall have to multiply the estimated equation 2.0 by
[2]. But when heteroscedasticity is present, most Xi.
especially when the variance is proportional to a Pattern 2:
power of the mean, the residuals will appear in form The error variance is proportional to Xi. The square
of a fan shape. root transformation
This may not be the best method for detecting 𝐸(𝑢𝑖 2 ) = 𝜎 2 𝑋𝑖 2.5
heteroscedasticity as it difficult to interpret,
It is believed that the variance of 𝑢𝑖 , instead of being
particularly when the positive and negative residuals proportional to the squared Xi, is proportional to Xi
do not exhibit the same general pattern [3]. Cook itself, then the original model can be transformed as:
and Weisberg suggested that plotting the square 𝑌𝑖 𝛽1 𝑢𝑖
residuals, 𝑒𝑖2 to account for this. Then, a wedge = + 𝛽2 √𝑋𝑖 + 2.6
√𝑋𝑖 √𝑋𝑖 √𝑋𝑖
shape bounded below by 0 would indicate 1
heteroscedasticity. = 𝛽1 + 𝛽2 √𝑋𝑖 + 𝑣𝑖 2.7
√𝑋𝑖
However, as [2] pointed out, squaring residuals that Where 𝑣𝑖 = 𝑢𝑖 /√𝑋𝑖 and where Xi>0
are large in magnitude creates scaling problems;
resulting to a plot where patterns in the rest of the
Having given pattern 2, one can readily verify that
residuals are difficult to see. They instead advocate
for plotting the absolute residuals. This way, we do 𝐸(𝑣𝑖2 ) = 𝜎 2 , a homogeneous situation. However,
not need to identify positive and negative patterns, one may proceed to apply Ordinary Least Square to
and do not need to worry about scaling issues. A equation 2.3 to regressing 𝑌𝑖 /√𝑋𝑖 on 1/√𝑋𝑖 on
wedge shape of the absolute residual also indicates 1/√𝑋𝑖 and √𝑋𝑖 .
heteroscedasticity where the variance increase with It is worthy of note that an important feature of the
the mean. This is the plotting method that is used transformed model that states there no intercept
for identifying heteroscedasticity in the study. term. However, regression-through-the-origin model
to estimate 𝛽1 and 𝛽2 have to be used. Having run
2. COMMON HETEROSCEDASTICITY through equation 2.3, one can get back to the
PATTERNS original model simply by multiplying equation 2.3
by √𝑋𝑖 .
There exists some likely assumptions about
heteroscedasticity, they include: Pattern 3:
Pattern 1: The error variance is proportional to the square of
The error variance is proportional to 𝑋𝑖2 , i.e the mean value of Y.
79
Anale. Seria Informatică. Vol. XVIII fasc. 2 – 2020
Annals. Computer Science Series. 18th Tome 2nd Fasc. – 2020
80
Anale. Seria Informatică. Vol. XVIII fasc. 2 – 2020
Annals. Computer Science Series. 18th Tome 2nd Fasc. – 2020
Z is your independent variable and log (residuals’) is unrelated to a set of explanatory variables versus the
the dependent variable for the regression. alternative hypothesis that the residuals’ variances
Step 6: Calculate the t-Statistic for the Z variable are parametric function of the predictor variable
and note that large t-statistic indicates the presence (Andreas .G, 2016). We can do away with the
of heteroscedasticity. limitations of this test provided we consider the
Breusch-Pagan Godfrey (BPG) test.
Glejser Test: This test can be illustrated by considering the k-
The test is just like Park test. After one must have variable linear regression model.
obtained the residuals 𝑢̂𝑖 from the ordinary least 𝑌𝑖 = 𝛽𝑖 + 𝛽2 𝑋2𝑖 + . . . + 𝛽𝑘 𝑋𝑘𝑖 + 𝑣𝑖 3.9
square regression, Glejser suggested regressing the 2
Assume that the error variance 𝜎𝑖 is described as:
absolute values of 𝑢̂𝑖 on the X variables that are
𝜎𝑖2 = 𝑓(𝛼1 + 𝛼2 𝑍2𝑖 +. . . + 𝜎𝑚 𝑍𝑚𝑖 )
thought to be closely related to 𝜎𝑖2 . The Glejser test
places weaker restrictions on the shape of error where 𝜎𝑖2 is a linear function of the Z’s.
distribution under the null hypothesis than Breusch If 𝛼2 = 𝛼3 = … = 𝜎𝑚 = 0, 𝜎𝑖2 = 𝛼1
and Pagan (1979) test based on normal likelihood which is a constant. Therefore, to test whether 𝜎𝑖2 is
function (Machado, 2000). It uses the following homogeneous, one can test the hypothesis that 𝛼2 =
functional forms: 𝛼3 = … = 𝛼𝑚 = 0. This is the brain behind the
|𝑢̂𝑖 | = 𝛽1 + 𝛽2 𝑋𝑖 + 𝑣𝑖 3.2 Breusch-Pagan Test. The actual test procedure is as
follows.
|𝑢̂𝑖 | = 𝛽1 + 𝛽2 √𝑋𝑖 + 𝑣𝑖 3.3 Step 1: Calculate 𝑌𝑖 = 𝛽1 + 𝛽2 𝑋2𝑖 + ⋯ + 𝛽𝑘 𝑋𝑘𝑖 +
1
|𝑢̂𝑖 | = 𝛽1 + 𝛽2 + 𝑣𝑖 3.4 𝑢𝑖 by ordinary least square and obtain the residuals
𝑋 𝑖
1 𝑢̂1 , 𝑢̂2 , . . . , 𝑢̂𝑛
|𝑢̂𝑖 | = 𝛽1 + 𝛽2 + 𝑣𝑖 3.5 ̂2
𝑢
√𝑋𝑖
Step 2: Find 𝜎̅ 2 = √ 𝑖 .
𝑛
|𝑢̂𝑖 | = √𝛽1 + 𝛽2 𝑋𝑖 + 𝑣𝑖 3.6 ̂2
𝑢
It should noted that OLS estimator is ∑ 𝑖
𝑛−𝑘
|𝑢̂𝑖 | = √𝛽1 + 𝛽2 𝑋𝑖 2 + 𝑣𝑖 3.7 Step 3: Construct variables 𝑝𝑖 defined as:
Thus, vi is the error term. 𝑢̂2
𝑝𝑖 = 𝑖⁄ 2
Also, as an empirical matter is concerned, Glejser 𝜎̅
which is simply each residual square divided by 𝜎̅ 2
test approach can be used. But Goldfeld and Quandt
pointed out that error term vi has some problems in Step 4: Regress 𝑝𝑖 thus constructed on the Z’s as
that its expected value is nonzero, it is serially 𝑝𝑖 = 𝛼1 + 𝛼2 𝑍2𝑖 + … + 𝛼𝑚 𝑍𝑚𝑖 + 𝑣𝑖
correlated and at the same time ironically where𝑣𝑖 is the residual term of this regression.
heterogeneous. Step 5: Obtain the explained sum of squares from
Another problem of Glejser method is that the 𝑝𝑖 = 𝛼1 + 𝛼2 𝑍2𝑖 + ⋯ + 𝛼𝑚 𝑍𝑚𝑖 + 𝑣𝑖
models such as: and define as:
|𝑢̂𝑖 | = 𝛽1 + 𝛽2 𝑋𝑖 + 𝑣𝑖 3.8 1
𝜃=
and 2(𝐸𝑆𝑆)
Assuming 𝑢𝑖 are normally distributed, one can show
|𝑢̂𝑖 | = √𝛽1 + 𝛽2 𝑋𝑖 2 + 𝑣𝑖 are nonlinear in the that if there is homoscedasticand if the sample size n
parameters, therefore, it cannot be estimated with the increases indefinitely, then:
2
usual Ordinary least square procedure. For large 𝜃~𝜒𝑚−1
samples, Glejser has found that the first four of the That is 𝜃 follows the chi-square distribution with
proceeding models give generally pleasant result in (m-1) degree of freedom.
detecting heteroscedasticity. Practically, Glejser Therefore, if in an application the compound
technique may be used for both large and small 𝜃(= 𝜒 𝑇 2) exceeds the critical 𝜒 2 value at the
sample strictly as a qualitative device to be aware of chosen level of significance, one can reject the
heteroscedasticity. hypothesis of homogeneity, or else, do not reject it.
81
Anale. Seria Informatică. Vol. XVIII fasc. 2 – 2020
Annals. Computer Science Series. 18th Tome 2nd Fasc. – 2020
White does not rely on the normality assumption and 3. It will tests if truly the presence of
is easy to carryout. heteroscedasticity will cause the ordinary least
Consider three-variable regression model, square formula for the variances and the
𝑌𝑖 = 𝛽1 + 𝛽2 𝑋2𝑖 + 𝛽3 𝑋3𝑖 + 𝑢𝑖 3.10 covariances of the estimates to be
The White test proceeds is as follows: inconsistence.
Step 1: Having given the data, we calculate 𝑌𝑖 =
𝛽1 + 𝛽2 𝑋2𝑖 + 𝛽3 𝑋3𝑖 + 𝑢𝑖 and get the residuals, 𝑢̂𝑖 Goldfeld-Quandt Test:
Step 2: We can then run the following auxiliary This test is used specifically it is assumes that the
regression. heteroscedasticity variance,𝜎𝑖2 is positively related
𝑢̂𝑖2 = 𝛼1 + 𝛼2 𝑋2𝑖 + 𝛼3 𝑋3𝑖 + 𝛼4 𝑋2𝑖
2 2
+ 𝛼5 𝑋3𝑖 to one of the explanatory variance in the regression
+ 𝛼6 𝑋2𝑖 𝑋3𝑖 + 𝑣𝑖 model. For clarity, let us consider the two-variable
It means that the squared residuals from the original model:
regression are regressed on the original X variables 𝑌𝑖 = 𝛽1 + 𝛽2 𝑋𝑖 + 𝑢𝑖 3.11
2 2 2 2
or regressors, the squared values and the cross Suppose 𝜎𝑖 is positively related as Xi, 𝜎𝑖 = 𝜎 𝑋𝑖
product(s) of the regressors. Higher powers of Where 𝜎 2 is a constant.
regressors can also be introduced. Assume 𝜎𝑖2 = 𝜎 2 𝑋𝑖2 reveals that 𝜎𝑖2 is proportional
It is observed that there is a constant term in this to the square of the X variable.
equation even through the original regression may or If 𝜎𝑖2 = 𝜎 2 𝑋𝑖2 is appropriate, it would mean 𝜎𝑖2
may not contain it. Obtain the R2 from this would be larger, the larger the values of Xi. If that is
(auxiliary) regression. the result, it indicates that heteroscedasticity is most
Step 3:Under the null hypothesis that there is no likely to be present in the model. To verify this
heteroscedasticity, it can be shown that sample assertion, Goldfeld and Quandt suggest the
size(n) times that R2 obtained from the auxiliary following steps:
regression asymptotically follows the chi-square Step 1: Start the ranking of the observations
distribution with degree of freedom equal to the according to the values of Xi right from the
number of regressors (excluding the constant term) beginning with the lowest X value.
in the auxiliary regression. That is, Step 2: Ignore c central observations, where c is
2
𝑛. 𝑅 2 ~𝜒𝑑𝑓 specific a priori and divide the remaining (n-c)
Where df is defined previously. (𝑛−𝑐)
observations into two groups each of 2
Step 4: it should be noted that in as much as the chi-
2 observations.
square value obtained in 𝑛. 𝑅 2 ~𝜒𝑑𝑓 is greater than
Step 3: Fit separately ordinary least square
the critical chi-square value at the chosen level of (𝑛−𝑐)
significance, it can hereby be concluded that there regressions to the first observations and the last
2
(𝑛−𝑐)
is heteroscedasticity. If it is not greater than the observations and find the respective residual
2
critical chi- square value, there is heteroscedasticity, sums of squares RSS1 and RSS2, RSS1 representing
which is to say that in the auxiliary regression the RSS from the regression corresponding to the
𝑌𝑖 = 𝛽1 + 𝛽2 𝑋2𝑖 + 𝛽3 𝑋3𝑖 + 𝑢𝑖 , smaller Xi value (the small variance group) and
𝛼2 = 𝛼3 = 𝛼4 = 𝛼5 = 𝛼6 = 0 RSS2 that from the larger Xi values (the large
If a model has several regressors, then introducing variance group). These RSS each have:
all the regressors, their squared (or higher-powered) 𝑛−𝑐 𝑛−𝑐−2𝑘
2
− 𝑘 or ( 2 ) 𝑑𝑓
terms and their cross products can quickly consume
degree of freedom. Therefore, one must use caution Where k is the number of parameters to be estimated
in using the test. including the intercept.
This test can either be a test of heteroscedasticity or Step 4: Compute the ratio
𝑅𝑆𝑆2
specification error and sometimes both. It has been 𝑑𝑓
proved that if no cross-product terms are present in λ= ⁄𝑅𝑆𝑆1
the White test procedure, then it is a test of pure 𝑑𝑓
heteroscedasticity. If cross-product terms are If ui are assumed to be normally distributed (which
present, then it is a test of both heteroscedasticity we usually do) and if the assumption of
and specification bias. homoscedasticis valid, then it can shown that λ
White test has the: follows F distribution with numerator and
𝑛−𝑐−2𝑘
1. It will not force you to specify a model of the denominator df each of ( 2 ).
structure of the heteroscedasticity, if it is If in an application, the computed λ exceeds that of
present. the critical F at the chosen level of significance, we
2. It is based on the assumption that the errors are can reject the hypothesis of homoscedasticity,
normally distributed.
82
Anale. Seria Informatică. Vol. XVIII fasc. 2 – 2020
Annals. Computer Science Series. 18th Tome 2nd Fasc. – 2020
Table 4.2 and figure 4.2 show empirical power of Table 4.4: Empirical Power at high heteroscedasticity
the selected test at low heteroscedasticity level. level at alpha = 0.05
Here, low heteroscedasticity model was simulated Sample Breusch White Goldfield Park Glejser
size –Pagan
and each test was carried out on the model residual. 20 93.6 80.8 9.7 90.6 99.3
Each test was repeated 1000 times at each sample 30 99.7 97.5 9.3 98.5 100.0
size and the percentage of rejection was computed 40 100.0 99.6 9.4 99.6 100.0
over the 1000 trials. On the long run, all the tests 50 100.0 99.9 12.1 99.9 100.0
except Goldfeld increase as the powers increase, it 60 100.0 100.0 9.9 100.0 100.0
shows that the test are valid. However, Glejser test is 70 100.0 100.0 10.6 100.0 100.0
80 100.0 100.0 12.6 100.0 100.0
the best test among all because it has the highest 90 100.0 100.0 11.2 100.0 100.0
power. 100 100.0 100.0 13.7 100.0 100.0
sample sizes, the best test is the test with highest [2] Carroll, R. J., & Ruppert, D. (1988).
power at various level and sample sizes. Transformation and Weighting in Regression.
Chapman.
CONCLUSION [3] Cook, R. D. & Weisberg, S. (1982). Residuals
and Influence in Regression. Chapman and
This research work focused on the uses of selected Hall, New York.
five tests, which are Breusch Pagan, White, [4] Glejser, H. (1969). A New Test for
Goldfeld, Park and Glejser tests for detecting Heteroscedasticity; Journal of American
heteroscedasticity in simulated datasets, ranging Statistical Association, 64(235); pp315-323.
from 20, 30, 40, 50, 60, 70, 80, 90 and 100. The
[5] Gold Feld, S. M & Quandt, R. E. (1965).
datasets was simulated at all levels of
Some Tests of Homoscedasticity; Journal of
heteroscedasticity with low result when the sigma
American Statistical Association; 60(310); 539-
was set at 0.05, mild when sigma was at 0.10, and
547.
high when sigma was at 2.0. Also, all the tests were
run on the simulated datasets to know the test at 5% [6] Gujarati, D. N. & Porter, D.C. (2004). Basic
threshold. The results show that Glejser test has the Econometric,4th Edn, McGraw-Hill Companies
highest tendency to detect heteroscedasticity at all Inc. New York, 387-418.
levels, while the Goldfeld test is the least of selected [7] Hill, R. C., Griffiths, W.E. & Lim, G. C.
tests as far as the simulated datasets is considered. (2007). Principles of Econometrics, John Wiley
& Sons Inc. New Jersey.
REFERENCES [8] Park R. E. (1966). Estimation with
Heteroscedastic error terms, Econometrica,
[1] Andreas, G., Carla, G., Rebecca, D., 34(4), pp 888
Buchner, S., Diestel, K., Box,G.E.P & Cox, [9] SelvaPrabhakara (2016). Regression model in
D. R. (1964). An Analysis of Transformation; R.
Journal of Royal Statistics Society, Series B, [10] Wooldridge, J. M. (2015). Introductory
26, 211-252. econometrics: A modern approach. Nelson
Education.
85