Stata Technical Bulletin
21
sg62 Hildreth-Houck random coefficients model
James W. Hardin, Stata Corp., FAX 1-409-696-4601, [email protected]
In Stata 5.0, we released a collection of panel data routines for analyzing cross-sectional time-series data. One of the new
commands, xtgls, will estimate a linear model in the presence of heteroscedasticity, cross-sectional correlation, and within-panel
autocorrelation. The command actually includes 9 different models depending on which options are chosen and will report either
the GLS or OLS results. However, all of the models that the xtgls command will estimate assume that the parameter vector is
constant for the panels.
In random coefficient models, we wish to treat the parameter vector as a realization in each panel of a stochastic process.
Remarks
Interested readers should see Greene (1993) for information on this and other panel data models. In a random coefficient
model, the parameter heterogeneity is viewed due to stochastic variation. Assume that we write
У; = ‰βi + O
where i = 1,... ,m, and βi is the coefficient vector (k × 1) for the ith cross-sectional unit such that
βi = β + vi E(vβ = O E(viι∕β = Γ
where our goal is to find β and Γ.
The derivation of the estimator assumes that the cross-sectional specific coefficient vector βi is the outcome of a random
process with mean vector β and covariance matrix Γ.
Yi = ^X-iβi + Ci = ^X-i(β + l,i) + Ci = X-iβ + (Xilzi + €j) = Xi∕3 + <λ>{
where E(ωβ =O and
E∙(ωtω'l∣ = E((‰Vi ⅛ eβ(‰Vi ⅛ ei)z) = E(ciC,i) ⅛ Xi^(t,iι4)Xi = <τ2I + X,-ΓX'∙ = ∏,
The covariance matrix for the panel-specific coefficient estimator βi can then be written
Vi + Γ= ∣X∙X, j 1X'∕∕,X,∣X'X, j 1 where Vi = σ2(X'X)-1
We may then compute a weighted average of the panel-specific coefficient estimates as
m ( m ʌl ɪ
‰∑Wiβ where W, ∙j V|7'.V, lf [Γ+Vi]~1
i=l U=I J
such that the resulting GLS estimator is a matrix-weighted average of the panel-specific (OLS) estimators.
In order to calculate the above estimator β for the unknown Γ and Vi parameters, we may use the two-step approach
suggested by Swamy (1970, 1971):
βi = OLS panel — specific estimator
ʌ = ci,ci
г ∏i — к
1 m
3 = ⅛ft
1 ( m ∖ 1 m
J'=i⅛τ(∑a⅛'-^-i∑v.
The two-step procedure begins with the usual OLS estimate of i3. With an estimate of β, we may proceed by (1) obtaining
estimates of Vi and Γ (and, thus, Wi) and then (2) obtain an updated estimate of β.