Yit = Xitβit + εit
Let βit = β and assume εit = ui + vt + eit where ui represents the individual or cross section differnence in intercept and vt is the time difference in intercept. Two-ways analysis includes both time and individual effects. For simplicity, we further assume vt = 0. That is, there is no time effect. In other words, only the one-way individual effects will be analyzed in the following.
The component eit is a classical error term, with zero mean, homogeneous variance, and there is no serial correlation and no contemporary correlation. Also, eit is uncorrelated with the regressors Xit. That is,
Assume that the error component ui, the individual differnence, is fixed or nonstochastic (but it varies across individuals). Thus, the model error is simply εit = eit. The model is expressed as:
Yit = (Xitβ + ui) + eit
where ui is interpreted as the change in the intercept. Therefore the individual effect is defined as ui plus the intercept.
Random Effects Model
Assume that the error component ui, the individual differnence, is random and satisfies the following assumptions:
∑ = |
|
|
| = σ2eI + σ2u1 |
Let ε be a NT-element vector of the stacked errors ε1, ε2, ..., εN, ε = [ε1,ε2, ..., εN]', then E(ε) = 0 and E(εε') = I⊗Σ, where 1 is an NxN matrix of ones, I is an NxN identity matrix, and ∑ is the TxT variance-covariance matrix defined above.
|
|
| = |
|
|
| β + |
|
|
|
or, Y = Xβ + ε
Yit = (Xitβ + ui) + eit (i=1,2,...,N; t=1,2,...,T).
|
|
| = |
|
|
| β + |
|
|
| + |
|
|
|
or, Y = Xβ + u + e
For each i, define NT×1 vector Di with the element:
Dij = | 1 if (i-1)×T+1 ≤ j ≤ i×T |
0 otherwise |
Then D = [D1, D2, ..., DN-1] is NT×(N-1) matrix of N-1 dummy variables. Ordinary least squares can be used to estimate the model with dummy variables as follows:
Y = Xβ + u + e = Xβ + Dδ + e
Since X includes a constant term, one less dummy variables are included for estimation and the estimated δ measures the individual change from the intercept.
Let Ymi = (∑t=1,2,...,TYit)/T, Xmi = (∑t=1,2,...,TXit)/T, and emi = (∑t=1,2,...,Teit)/T. Then the within estimates of the model can be obtained by estimating the mean deviation model:
(Yit - Ymi) = (Xit - Xmi)β + (eit - emi)
Or, equivalently
Yit = Xitβ + (Ymi - Xmiβ) + (eit - emi)
Note that the constant term drops out due to mean deviation transformation. The degree of freedom for estimating the above mean deviation model is NT-K-1 (K is the number of explanatory variables including constant term). Therefore, the estimated individual effects of the model is ui = Ymi - Xmiβ. The variance-covariance matrix of individual effects is estimated as follows:
Var(ui) = v/T + Xmi [Var(β)] Xmi'
where v is the estimated variance of the mean deviation regression corrected for the degree of freedom NT-N-K (instead of NT-K-1). That is,
v = ∑i=1,2,...,N∑t=1,2,...,T (eit - emi)2 / (NT-N-K).
It may be of interest to estimate the between parameters of the model by estimating
Ymi = Xmiβ + ui + emi
which is related to the estimated individual effects from the within estimates.
Based on the dummy variable approach, this is a Wald F-test for the joint significance of the parameters associated with dummy variables representing the individual effects. If the null hypothesis δ = 0 can not be rejected, then there is no fixed effects in the model.
Based on the deviation approach, the equivalent test statistic is computed from the restricted (pooled model) and unrestricted (mean deviation model) sum of squared residuals. That is,
| ~ F(N-1, NT-N-K) |
Y = Xβ + ε
where ε = [ε1,ε2,...,εN]', εi = [εi1,εi2,...,εiT]', and the random error components εit = ui + eit. By assumptions, E(ε) = 0, and E(εε') = I⊗Σ. The Generalized Least Squares estimates of β is
β = [X'(I⊗Σ-1)X]-1X'(I⊗Σ-1)Y
∑ = |
|
|
| = σ2eI + σ2u1 |
Since Σ-1 = (1/σ2e)I + [σ2u/(σ2e-Tσ2u)]1 can be derived from the estimated variance components σ2e and σ2u, in practice the model is estimated using the following partial deviation approach.
Let v = σ2e.
Ymi = Xmiβ + (ui + emi)
where the error structure of ui + emi satisfies:
E(ui + emi) = 0
E((ui + emi)2) = σ2u + σ2e/T
E((ui + emi)(uj + emj)) = 0, for i≠j
Let v1 = T σ2u + σ2e = T σ2u + v.
If v1 > v, then define w = 1 - (v/v1)½.
In case of v1 ≤ v, the estimate of σ2u becomes negative. The alternative is to use (v0-v) for σ2u, where v0 is the estimated variance σ2 obtained from the pooled model:
Yit = Xitβ + εit
v0 is a consistent estimator of σ2u + σ2e, where the estimator of σ2e is v (obtained from the estimated fixed effect model, see Step 1). Then the consistent estimator of σ2u is (v0-v). If v0 ≤ v, we need to use large sample variances to construct the estimator of σ2u:
v0 = [(NT-K-1)/NT] σ2
v = [(NT-N-K)/NT] σ2e
Let v1 = T (v0-v) + v, and define w = 1 - (v/v1)½.
Y*it = Yit - w Ymi
X*it = Xit - w Xmi
Then the model for estimation is:
Y*it = X*itβ + ε*it
where ε*it = (1-w) ui + eit - w emi.
Or, equivalently
Yit = Xitβ + w (Ymi - Xmiβ) + ε*it
It is easy to validate that
E(ε*it) = 0
E(ε*2it) = σ2e
E(ε*itε*iτ) = 0
for t≠τ
E(ε*itε*jt) = 0
for i≠j
The least squares estimate of [w (Ymi - Xmiβ)] is interpreted as the change of individual effects.
To test for no correlation relationship of the error terms ui + eit and ui + eiτ, the following Breusch-Pagan LM test statistic based on the estimated residuals of the restricted (pooled) model, εit (i=1,2,...N, t=1,2,...,T), is distributed as Chi-square with one degree of freedom:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Note that εmi = ∑t=1,2,...,Tεit/T.
H = (brandom-bfixed)'[Var(brandom)-Var(bfixed)]-1(brandom-bfixed)
Yi = Xiβi + εi
βi = β + υi
where Yi = [Yi1,Yi2,...,YiT]', Xi = [Xi1,Xi2,...,XiT]', and εi = [εi1,εi2,...,εiT]'. We note that not only the intercept but also the slope parameters are random across individuals. The assumptions of the model are:
The model for estimation is
Yi = Xiβ +
(Xiυi + εi), or
Yi = Xiβ + ωi
where ωi = Xiυi +
εi, and
The stacked (pooled) model is
Y = Xβ + ω
where ω = [ω1,...,ωN]', and
E(ω) = 0NTx1
Var(ω) = E(ωω') = V = |
|
|
|
GLS is used to estimate the model. That is,
b* = (X'V-1X)-1X'V-1Y
Var(b*) = (X'V-1X)-1
The computation is based on the following steps (Swamy, 1971):
The individual parameter vectors may be predicted as follows:
bi* = (Γ+Vi)-1[Γ-1b*+Vi-1bi]
= Aib* + (I-Ai)bi,
where Ai = (Γ+Vi)-1Γ-1.
Var(bi*) = [Ai | I-Ai] |
|
|
|
|
|
|
Yit = Xitβi + εit (i=1,2,...,N; t=1,2,...,T).
Let Yi = [Yi1,Yi2,...,YiT]', Xi = [Xi1,Xi2,...,XiT]', and εi = [εi1,εi2,...,εiT]', the stacked N equations (T observations each) system is Y = Xβ + ε, or
|
|
| = |
|
|
|
|
|
| + |
|
|
|
Notice that not only the intercept but also the slope terms of the estimated parameters are different across individuals. The error structure of the model is summarized as follows:
Parameter restrictions can be built into the matrix X and the corresponding parameter vector β. The model is estimated using techniques for systems of regression equations.
The system estimation techniques such as 3SLS and FIML should be used for parameter estimation. It is called the Seemingly Unrelated Regression Estimation (SURE) in the current context. Denote b and S as the estimated β and Σ, respectively. Then,
b = [X'(S-1⊗I)X]-1X'(S-1⊗I)Y
Var(b) = [X'(S-1⊗I)X]-1, and
S = ee'/T, where e = Y-Xb is the estimated error ε.