Regresion Heterocedástica
Regresion Heterocedástica
Regresion Heterocedástica
Abstract
In this paper, we compare the performance of two statistical approaches
for the analysis of data obtained from the social research area. In the first
approach, we use normal models with joint regression modelling for the mean
and for the variance heterogeneity. In the second approach, we use hierar-
chical models. In the first case, individual and social variables are included
in the regression modelling for the mean and for the variance, as explanatory
variables, while in the second case, the variance at level 1 of the hierarchi-
cal model depends on the individuals (age of the individuals), and in the
level 2 of the hierarchical model, the variance is assumed to change accord-
ing to socioeconomic stratum. Applying these methodologies, we analyze
a Colombian tallness data set to find differences that can be explained by
socioeconomic conditions. We also present some theoretical and empirical re-
sults concerning the two models. From this comparative study, we conclude
that it is better to jointly modelling the mean and variance heterogeneity in
all cases. We also observe that the convergence of the Gibbs sampling chain
used in the Markov Chain Monte Carlo method for the jointly modeling the
mean and variance heterogeneity is quickly achieved.
Key words: Socioeconomic status, Variance heterogeneity, Bayesian meth-
ods, Bayesian hierarchical model.
Resumen
En este artículo, comparamos el desempeño de dos aproximaciones es-
tadísticas para el análisis de datos obtenidos en el área de investigación so-
cial. En la primera, utilizamos modelos normales con modelación conjunta
a Profesor asociado. E-mail: [email protected]
b Profesor. E-mail: [email protected]
267
268 Edilberto Cepeda Cuervo & Jorge Alberto Achcar
1. Introduction
Approximately 62% of Colombian children and teenagers lack of a satisfactory
nutritional level and do not reach an optimal level of physical development. To get
information about nutritional levels of this population, we model the mean of indi-
vidual tallness in two groups of people, since the mean is one of the main nutritional
level indicators. The first one includes children aging between 0 and 30 months old
that belong to high socioeconomic level. The second one is a sample of people ag-
ing between six months and 20 years old that belong to lower, medium and higher
socioeconomic strata. Tallness seems to be influenced by genetic factors (Chumlea
et al. 1998), but the genetic homogeneity of the studied population seems to be
apparent. Given that our main goal is to analyze this data set taking into account
the variance heterogeneity, it is convenient to consider an analysis with explicit
modeling of the variance, including age and socioeconomic stratum as explanatory
variables. In this case, the variance can be modeled through an appropriate real
function of the explanatory variables that takes into account the positivity of the
variance (Aitkin 1987, Cepeda & Gamerman 2001). Thus, one possibility to ana-
lyze this data set is to use linear normal models with variance heterogeneity; other
possibility is to consider hierarchical models (Bryk & Raudenbush 1992). The
linear normal models with variance heterogeneity have two components: a linear
function characterizing the mean response and a specification of the variance for
each observation. In Section 2, we summarize the classical (Aitkin 1987) and the
Bayesian methodologies (Cepeda & Gamerman 2001) used to fit these models. In
the second model, a normal prior distribution is used and, given the orthogonality
between mean and variance, a simple iterative process to draw samples from the
posterior distribution can be performed. Hierarchical models are commonly used
in educational and social statistics (Bryk & Raudenbush 1992, Raudenbush &
Bryk 2002) to analyze this type of data. In this area, it is natural, for example, to
consider that students are nested within classrooms and classrooms within schools;
where σi2 = g(zi , γ) and g is an appropriate real function, the kernel of the likeli-
hood function is given by
i2
1 1 h
L(β, γ) = Πni=1 0
exp − 2 yi − xi β)
σi 2σi
Thus, given that the Fisher information matrix is a block diagonal matrix, an
iterative alternate algorithm can be proposed to get maximum likelihood estimates
for the parameters (Aitkin 1987). The summary of this algorithm, as it is presented
in Cepeda & Gamerman (2001), is given in the next steps.
a) Give the required initial values β (0) and γ (0) for the parameters.
−1
b) β (k+1)
is obtained
from β (k+1) = X 0 W (k) X X 0 W (k) Y , where W
(k)
=
(k) (k) 2
(k) 2
(k) 0 (k)
diag wi , wi = 1/ σi and σi = exp zi γ .
−1 0
c) γ (k+1) is obtained from γ (k+1) = Z 0 W Z Z W Ye , where W = 21 In , with
In the n × n identity matrix, and Ye is a n-dimensional vector with i-th
component
1
yei = ηi + 2 (yi − xi β)2 − 1
σi
where ηi = zi0 γ.
d) Steps (b) and (c) will be repeated iteratively until the pre-specified stopping
criterion is satisfied.
as in Cepeda & Gamerman (2001, 2005). Thus with the likelihood function L(β, γ)
given by a normal distribution, and using the Bayes theorem, we obtain the pos-
terior distribution π(β, γ | data) ∝ L(β, γ)p(β, γ). Given that the posterior distri-
bution π(β, γ | data) is intractable and it does not allow easily generating samples
from it and taking into account that β and γ are orthogonal, we propose sampling
these parameters using an iterative alternated process, that is, sampling β and γ
from the conditional distributions π(β | γ, data) and π(γ | β, data), respectively.
Since the full conditional distribution is given by
c) Update the γ vector to a new value φ generated from the proposed density
(3).
d) Calculate the acceptance probability of the movement, α γ (j−1) , φ . If the
movement is accepted, then γ (j) = φ. If it is not accepted, then γ (j) = γ (j−1) .
3. Hierarchical Models
Hierarchical data are commonly studied in the social and behavioral sciences,
since the variables of study often take place at different levels of aggregation. For
example, in educational research, this approach is natural since the students are
nested within classroom, classrooms within schools, schools within districts, and
so on. In the two-level hierarchical models, given by N individuals nested within
J groups, each one containing Nj individuals, if for simplicity we only consider
one explanatory variable X, the first stage of the analysis is defined by
Yij = β0j + β1j Xij + ij , ij ∼ N 0, σ 2 (4)
where Yij is the random quantity of interest associated to the i-th individual
belonging to j-th group, βj = (β0j , β1j )0 is the parameter vector associated to
the j-th strata, j = 1, 2, . . . , J, and ij is the random error associated to the i-
th subject belonging to j-th strata (Van Der Leeden 1998). In a second level,
the regression coefficient behavior is explained by predicted variables of level 2,
through the model
where Z denotes the set of explanatory variables of level 2, and ηkj ∼ N (0, σk2 ),
k = 0, 1. In this model, Z is a context variable where its effect is assumed to be
measured, for example, at the socioeconomic stratum, rather than at the individual
level. To complete the model, conjugate prior distributions are assumed for the
hyperparameters.
The two level models are obtained by substitution of β0j and β1j , given by (5),
into (4). Thus,
Yij = γ00 + γ01 Zj + γ10 Xij + γ11 Zj Xij + η1j Xij + η0j + ij (6)
In this model, given the error structure, η1j Xij + η0j + ij , there is a het-
eroscedastic structure of the variance conditioned to the fixed part γ00 + γ01 Zj +
γ10 Xij + γ11 Zj Xij . Thus, for each group
e j Σ2 X
V ar(Yj ) = X ej0 + σe2 INj (7)
4. Applications
In this section, we introduce some examples of growth and individual devel-
opment studies for Colombian population. Studies about children’s growth and
development are very important in clinical research because they allow detection
of factors which can affect children’s health. As a first example, we consider a
sample of babies between 0 and 30 months old. All the selected children in this
example belong to a high socioeconomic stratum with a good welfare. In a second
example, we consider a data set given by a group of 311 Colombian individuals
aged from 6 months to 20 years old, sampled from different socioeconomic strata.
For these examples, we consider as response variables of interest, the height mea-
sures for the individuals in the sample in order to concentrate on an appropriate
specification of the time and socioeconomic stratum dependence.
Bogota’s hospitals and by students of Los Andes University from the beginning of
2000 to the end of the year 2002. The data set shows some interesting characteris-
tics: (a) the height increases with time but it does not have a linear behaviour as
shown in figure (1). (b) Sample variance is not homogeneous; it seems to increase
at an initially small time interval and then it decreases.
Figure 1 shows the plot for the posterior mean height of babies and the corre-
sponding posterior 90% credibility interval. From this figure, we can see that the
babies, all of whom have nutritional wealth, have tallness between international
standards according to NCHS. Thus, there is no evidence of problems in the growth
process. It is important to see that tallness is the most important parameter to
validate the nutritional state and growing condition of babies. Figure 2 shows the
behavior of the chain for the sample simulated for each parameter, where each one
has small transient stage, indicating the speed convergence of simulation for the
algorithm. The chain samples are given for the first 4500 iterations. The other
results reported in this section are based on a sample of 4000 draws after a burn-in
of 1000 draws to eliminate the effect of initial values. In Figure 3 we have the his-
tograms for the posterior marginal distributions of parameters. These histogram
seem to show that the posterior marginal distribution for all the parameters are
approximately normal.
Finally, in this application we also considered normal bivariate prior distri-
butions for the mean parameter β = (β0 , β1 ) and for the variance parameters
γ = (γ0 , γ1 ).
90
80
Height (cm)
70
60
50
0 5 10 15 20
Age (months)
Figure 1: Predicted height for babies (the darker line represents the fitted posterior
mean. The dotted lines represent the 90 and 95% prediction interval. The
points correspond to the observations.)
β0i = β0 + η0i
β1i = β1 + η1i
where ηki ∼ N 0, σk2 , k=0,1. To complete the model, a conjugate prior is given
for the hyperparameters: βk ∼ N 0, 103 , σk−2 ∼ Gamma(0.01, 0.01) and σ −2 ∼
Gamma(0.01, 0.01). Thus, the hierarchical model is given by
√ √
Yi = β0 + β1 ti + η0i + η1i ti + i
√
In this model, given the error structure, ri = η0i + η1i ti + i , there is a
heteroscedastic structure for the variance conditional on the level of the explana-
tory variable t. In this application we assume independence between observations,
where √
V ar(ri ) = σ02 + 2σ01 ti + σ12 ti + σe2 , i = 1, 2, . . . , n
44 48 52
β0
0 1000 2000 3000 4000
iteration
6 7 8 9
β1
and the corr(ri0 , ri ) = 0, where σ01 = Cov(η0i , η1i ), σ02 = V ar(η0i ) and σ12 =
V ar(η1i ). It is clear that, as in the last model, the variance decreases with time.
2 −4
In this case, if σ01 > 0 the variance is increasing as function of time for t > σ01 σ1
and increasing for all t > 0 if σ01 > 0.
In this analysis, the posterior means and standard deviations for the param-
eters models are: βb0 = 49.24(0.399), βb1 = 7.591(0.202). The estimates of other
parameters are σb−2 = 0.942(0.097), σb0−2 = 0.943(0.096), σ
b01 = −0.005(0.082) and
−2
σ
b1 = 1.026(0.096).
In all cases, the obtained mean parameter estimates given by the two models
agree. However, there are considerable differences in BIC values (Bayes Informa-
tion Criterion) used for discrimination of models (Table 2). From the result in
Table 2, we conclude that the model with joint modeling of the mean and variance
heterogeneity is the best, since its BIC value is the smallest one.
1.5
0.5
0.4
1.0
0.3
0.2
0.5
0.1
0.0
0.0
44 46 48 50 52 54 6 7 8 9
β0 β1
1.5
15
1.0
10
0.5
5
0.0
0
2 3 4 5 -0.10 -0.05 0.00 0.05
γ0 γ1
Taking into account these last points, we initially considered cubic polynomial
models for the mean and variance. After a variable elimination process,
a quadratic
model µt = β0 +β1 t+β2 t2 for the mean and simple model log σt2 = γ0 +γ1 t for the
180
160
Height (cm)
140
120
100
80
60
0 5 10 15 20
Age (years)
Figure 4: Plot for tallness versus age (the darkest line represents the fitted posterior
mean. The dotted lines represent 95% prediction intervals. The triangle,
point and square represent the observations corresponding to low, medium
and high socioeconomic levels.)
variance seems to be appropriate for general data description, with t equal to age.
These mean and variance models were fitted with vague priors distributions for
each parameters. We further assumed prior independence among the parameters.
The posterior means and standard deviations for the parameters model are given
in Table 3.
From Figure 4, we can establish some features of the growing process of this
group of Bogota’s individuals. We also can compare the fitted model with the
existing mean international curves for human growing and developing. We observe
for this data set, the mean height curve is lower than the standard curve for human
growth at all times, that is, there is some evidence of problems in the growth and
body developing process. The differences could be an indication of malnutrition
for some members of this group, an opinion that is shared by pediatricians and
nutritional specialists.
2
For this data
set, we also propose the model Yi = β0i + β1i ti + β2i ti + i , where
2
i ∼ N 0, σe . In this model, Yi is the tallness of the i-th individual at age ti .
Variation in the mean regression parameters is written in the second level as
β0i = β0 + η0i
β1i = β1 + η1i
β2i = β2 + η2i
where ηki ∼ N (0, σk2 ), k=0,1,2. To complete the model, conjugate Gamma(0.00
019, 0.0001) prior distributions are assumed for the hyperparameters. Thus, the
hierarchical model is given by
In this model, given the error structure, ri = η0i + η1i ti + η2i t2i + i , there
is a heteroscedastic structure of the variance conditional on the level of the ex-
planatory variable t. As in the last application, we assume independence between
observations, that is,
V ar(ri ) = σ02 + σ12 t2i + σ22 t4i + 2σ01 ti + 2σ02 t2i + 2σ12 t3i + σe2 , i = 1, 2, . . . , n
As in the last example, we can see the Monte Carlo estimates for the pos-
terior means for the parameters of interest assuming the two models agree. We
also observe that there are considerable differences in the BIC values for the two
models (Table 4). From the results of Table 4 we conclude that the model with
joint modeling for the variance heterogeneity is better fitted by the data than the
hierarchical model, since its BIC value is the smallest in comparison with the BIC
value for the hierarchical model.
In the estimation process I3 was eliminated from the model for the mean,
and I3 , X12 , X22 and X32 from the model for the variance. With this new model,
we obtain Monte Carlo estimates for the parameters in the model also assuming
approximate non-informative priors for the parameters. For the mean model: βb0 =
61.735(1.712), βb1 = −17.137(2.452), λb1 = 10.301(0.571), λ
b2 = 7.551(1.741) , λ
b3 =
9.702(0.351), λ b4 = −0.251(0.032) , λ
b5 = −0.106(0.026), λb6 = −0.199(0.027). For
b0 b 0
the variance models: β0 = 4.249(0.207), β2 = −0.939(0.317), λ b0 = 0.092(0.022),
1
b 0 b 0
λ2 = 0.017(0.018), λ3 = 0.0146(0, 018)
Following the analysis, X2 and X3 were eliminated from the variance model.
The parameter estimates of the resulting models are given in Tables 5 and 6.
From Figures 5 and 6, we observe that people from lower socioeconomic back-
grounds present through time a significantly lower tallness than people from others
0 5 10 15 20
Age (years)
Figure 5: Mean of tallness of people by socioeconomic level. Continuous line for stratum
1, discontinuous line for stratum 2, and dotted line for stratum 3.
0 5 10 15 20
Age (years)
Figure 6: 95% prediction intervals for grown by stratum. Discontinuous line with point
for stratum 1, continuous line for stratum 2, and discontinuous line for stra-
tum 3.
nomic strata. The tallness and the age of each individual were determined and
denoted Yij and tij , respectively, where the subscript ij indicate that the mea-
sures belong to the i-th individual belonging to j-th strata. Thus, as it is usual in
multilevel analysis, in the first level, individuals are considered and a regression
model (9) is defined for each group.
Yij = β0j + β1j tij + β2j t2ij + ij , ij ∼ N 0, σ 2 (9)
In this model, βj = (β0j , β1j , β2j ) is the parameter vector associated to the j-th
stratum, j = 1, 2, 3, and ij is the random error associated in the i-th subject. In
the second level of the model, the regression coefficient βi is explained by predicted
variables Z, through the model
0 5 10 15 20
Age (years)
Figure 7: Mean tallness of people by socioeconomic level, hierarchical model. Continu-
ous line for lower stratum, discontinuous line for medium stratum and dotted
line for high stratum.
In Figure 7, we have the plot of the mean tallness against time for each one of
the assumed stratum.We can see an agreement between average tallness behaviour
showed in this figure and the behaviour showed in Figure 5, where the analysis was
conducted using joint modelling of the mean and variance heterogeneity. In this
example, we further observe considerable differences in the BIC values considering
the different models as we can see in Table 8. From the results of this table, we
again conclude that the model with joint modeling of the mean and of the variance
heterogeneity is better fitted by the data than the hierarchical model.
6. Concluding Remarks
From this comparative study for the two proposed models, we conclude that it
is better to jointly model the mean and variance heterogeneity, as observed in all
examples, in comparison to the use of hierarchical models. Additionally, conver-
gence of the chain used to simulate samples for the posterior distribution of interest
is quickly achieved and the model is easily interpretable. The proposed analysis
can be convenient in social applications since these models perfectly capture any
clustering by subgroups that may exist in the data. Other good reason for the
modelling of the variance heterogeneity is related to the use of the explanatory
variables in the regression model, since we can use the same explanatory variables
assumed for the regression model for the mean or other different variables, for
each one of the assumed groups. That is, this analysis also takes into consider-
ation one of the most important goals of the multilevel statistical analysis, that
is, it “substantively take into account for causal heterogeneity”. Although there is
no statistical differences between intercepts in the growing curves for medium and
hight strata, apparently there is an advantage for hight strata through time. We
also observe that the joint modeling of mean and variance heterogeneity is simpler
and easier to interpret.
References
Adair, L. S., Eckhardt, C. L., Gordon-Larsen, P. & Suchindran, C. (2005), ‘The
Association Between Diet and Height in the Postinfancy Period Changes with
Age and Socioeconomic Status in Filipino Youths’, The Journal of Nutrition
135(9), 2192–2198).
Aitkin, M. (1987), ‘Modelling Variance Heterogeneity in Normal Regression using
Glim’, Applied Statistics 36(4), 332–339.
Bryk, A. & Raudenbush, S. (1992), Hierarchical Linear Models: Applications and
Data Analysis Methods, Sage publications, Inc, Newbury Park, United States.
Cepeda, E. & Gamerman, D. (2001), ‘Bayesian Modeling of Variance Heterogeneity
in Normal Regression Models’, Brazilian Journal of Probability and Statistics
14(1), 207–221.
Cepeda, E. & Gamerman, D. (2005), ‘Bayesian Methodology for Modeling Param-
eters in the two Parameter Exponential Family’, Revista Estadística 57(168-
169), 93–105.
De Leeuw, J. & Kreft, I. (1986), ‘Random Coefficient Models for Multilevel Anal-
ysis’, Journal of Educational Statistics 11, 57–85.
Prosser, R., Rasbash, J. & Goldstein, H. (1991), ML3. Software for Three-Level
Analysis. User’s Guide for V. 2, GB: Institute of Education, University of
London, London, England.
Stein, A. D., Barnhart, H. X., Wang, M., Hoshen, M. B., Ologoudou, K., Ramakr-
ishnan, U., Grajeda, R., Ramírez, M. & Martorell, R. (2004), ‘Comparison of
Linear Growth Patterns in the first three Years of Life Across two Generations
in Guatemala’, Pediatrics 113(3), 270–275.
Appendix A.
Hierarchical Models
From the two level hierarchical model definition in Section 3, assuming inde-
pendence between n0j and n1j , we have:
Yij | β0j , β1j , Xij , σ 2 ∼ N β0j + β1j Xij , σ 2
for i = 1, . . . , Nj , j = 1, . . . , J, and
where
J
Y
1 −1
π(β0 | γ00 , γ01, τ0, z) ∝ √ exp (β0j − γ00 + γ01 Zj )2
j=1
2πτ0 2τ0
J Nj
− J2 −1 X X 2
∝ (τ0 ) exp (β0j − γ00 + γ01 Zj )
2τ0 j=1 i=1
J
Y
1 −1 2
π(β1 | γ10 , γ11, τ1, z) ∝ √ exp (β1j − γ10 + γ11 Zj )
j=1
2πτ1 2τ1
J Nj
− J2 −1 X X 2
∝ (τ1 ) exp (β1j − γ10 + γ11 Zj )
2τ1 j=1 i=1
γ2 γ2 γ2 γ2
ff ff ff ff
π(γ00 , γ01 , γ10 , γ11 , σ 2 , τ0, τ1 ) ∝ exp − 00 exp − 01 exp − 10 exp − 11
2e00 2e01 2e10 2e11
2
× (τ0 )−(c0 +1) e−d0 /τ0 (τ1 )−(c1 +1) e−d1 /τ1 (σ 2 )−(a+1) e−b/σ
J
X J Nj
1 −1 X X
π(θ | y, z, X) ∝ (σ 2 )− 2 Nj exp (y ij − β 0j − β X
1j ij )2
j=1
2σ 2 j=1 i=1
J Nj
J −1 X X
× (τ0 )− 2 exp (β0j − γ00 + γ01 Zj )2
2τ0 j=1 i=1
J Nj
− J2 −1 X X 2
× (τ1 ) exp (β1j − γ10 + γ11 Zj )
2τ1 j=1 i=1
γ2 γ2 γ2 γ2
× exp − 00 exp − 01 exp − 10 exp − 11
2e00 2e01 2e10 2e11
2
× (τ0 )−(c0 +1) e−d0 /τ0 (τ1 )−(c1 +1) e−d1 /τ1 (σ 2 )−(a+1) e−b/σ
where σ 2 > 0, τ0, > 0, τ1, > 0, γ00 , γ01 , γ10 , γ11 , R and β1j , β1j R; j = 1, . . . , J.
The parameter vector θ = (γ00 , γ01 , γ10 , γ11 , σ 2 , τ0, τ1, β01 , . . . , β01 , β11 , . . . , β1J ) has
25+7 components.
Thus, the conditional posterior distribution is given by
J J Nj
1X 1 XX
σ 2 | θ(σ2 ) , y, z, X ∼ IG a + Nj ; b + (yij − β0j − βij Xij )2
2 j=1 2 j=1 i=1
J
J 1X
τ0 | θ(τ0 ) , y, z, X ∼ IG c0 + ; d0 + (β0j − γ00 − γ01 Zj )2
2 2 j=1
J
J 1X
τ1 | θ(τ0 ) , y, z, X ∼ IG c1 + ; d1 + (β1j − γ01 − γ11 Zj )2
2 2 j=1
2 P
e00 Jj=1 µ00j τ0 e200
γ00 | θ(j00 ) , y, z, X ∼ N ;
τ0 + Je200 τ0 + Je200
2 P J
e10 j=1 µ10j τ1 e210
γ10 | θ(j10 ) , y, z, X ∼ N ;
τ1 + Je210 τ1 + Je210
P J
!
e201 j=1 zj µ01j τ0 e210
γ01 | θ(j01 ) , y, z, X ∼ N PJ ; PJ
τ0 + e210 j=1 zj2 τ0 + e210 j=1 zj2
PJ !
e211 j=1 zj µ11j τ1 e211
γ11 | θ(j11 ) , y, z, X ∼ N PJ ; PJ
τ1 + e210 j=1 zj2 τ1 + e211 j=1 zj2
then all posterior conditional distributions for β0j are given by:
PNj
σ 2 (j00 + j01 Zj ) + τ0 i=1 a0ij σ 2 τ0
β0j | θ(β0j ) , y, z, X ∼ N ;
σ 2 + τ0 Nj 2
σ + τ0 Nj