Yit = Xitbit + eit
Let bit = b and assume eit = ui + vt + eit where ui represents the individual or cross section difference 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 difference, is fixed or nonstochastic (but it varies across individuals). Thus, the model error is simply eit = eit. The model is expressed as:
Yit = (Xitb + 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 difference, is random and satisfies the following assumptions:
| S = |
|
|
| = s2eI + s2u |
Let e be a NT-element vector of the stacked errors e1, e2, ..., eN, e = [e1,e2, ..., eN]', then E(e) = 0 and E(ee') = SÄI, where I is an NxN identity matrix and S is the TxT variance-covariance matrix defined above.
Yit = (Xitb + ui) + eit (i=1,2,...,N; t=1,2,...,T).
Let Yi = [Yi1,Yi2,...,YiT]', Xi = [Xi1,Xi2,...,XiT]', and ei = [ei1,ei2,...,eiT]', then the pooled (stacked) model is
|
|
| = |
|
|
| b + |
|
|
|
or, Y = Xb + 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 = Xb + Dd +e
Since X includes a constant term, one less dummy variables are included for estimation and the estimated d measures the individual change from the intercept.
Let Ymi = (St=1,2,...,TYit)/T, Xmi = (St=1,2,...,TXit)/T, and emi = (St=1,2,...,Teit)/T. Then the within estimates of the model can be obtained by estimating the mean deviation model:
(Yit - Ymi) = (Xit - Xmi)b + (eit - emi)
Or, equivalently
Yit = Xitb + (Ymi - Xmib) + (eit - emi)
Note that the constant term drops out due to mean deviation transformation. Therefore, the estimated individual effects of the model is ui = Ymi - Xmib. The variance-covariance matrix of individual effects is estimated as follows:
Var(ui) = v/T + Xmi [Var(b)] 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). That is,
v = Si=1,2,...,NSt=1,2,...,T (eit - emi)2 / (NT-N-K).
Note that K is the number of explanatory variables not counting the constant term.
It may be of interest to estimate the between parameters of the model by estimating
Ymi = Xmib + 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 d = 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 = Xb + e
where e = [e1,e2,...,eN]', ei = [ei1,ei2,...,eiT]', and the random error components eit = ui + eit. By assumptions, E(e) = 0, and E(ee') = SÄI. The Generalized Least Squares estimates of b is
b = [X'(S-1ÄI)X]-1X'(S-1ÄI)Y
Since S-1 can be derived from the estimated variance components s2e and s2u, in practice the model is estimated using the following partial deviation approach.
Ymi = Xmib + (ui + emi)
where the error structure of ui + emi satisfies:
E(ui + emi) = 0
E((ui + emi)2) = s2u + s2e/T
E((ui + emi)(uj + emj)) = 0, for i¹j
Let v = s2e and v1 = T s2u + s2e. Define w = 1 - (v/v1)½.
Y*it = Yit - w Ymi
X*it = Xit - w Xmi
Then the model for estimation is:
Y*it = X*itb + e*it
where e*it = (1-w) ui + eit - w emi.
Or, equivalently
Yit = Xitb + w (Ymi - Xmib) + e*it
It is easy to validate that
E(e*it) = 0
E(e*2it) = s2e
E(e*ite*it) = 0
for t¹t
E(e*ite*jt) = 0
for i¹j
The least squares estimate of [w (Ymi - Xmib)] is interpreted as the change of individual effects.
To test for no correlation relationship of the error terms ui + eit and ui + eit, the following Breusch-Pagan LM test statistic based on the estimated residuals of the restricted (pooled) model, eit (i=1,2,...N, t=1,2,...,T), is distributed as Chi-square with one degree of freedom:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Note that emi = St=1,2,...,Teit/T.
H = (brandom-bfixed)'[Var(brandom)-Var(bfixed)]-1(brandom-bfixed)
Yi = Xibi + ei
bi = b + ui
where Yi = [Yi1,Yi2,...,YiT]', Xi = [Xi1,Xi2,...,XiT]', and ei = [ei1,ei2,...,eiT]'. 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 = Xib +
(Xiui + ei), or
Yi = Xib + wi
where wi = Xiui +
ei, and
The stacked (pooled) model is
Y = Xb + w
where w = [w1,...,wN]', and
E(w) = 0NTx1
| Var(w) = E(ww') = 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* = (G+Vi)-1[G-1b*+Vi-1bi]
= Aib* + (I-Ai)bi,
where Ai = (G+Vi)-1G-1.
| Var(bi*) = [Ai | I-Ai] |
|
|
|
|
|
|
Yit = Xitbi + eit (i=1,2,...,N; t=1,2,...,T).
Let Yi = [Yi1,Yi2,...,YiT]', Xi = [Xi1,Xi2,...,XiT]', and ei = [ei1,ei2,...,eiT]', the stacked N equations (T observations each) system is Y = Xb + e, 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:
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 b and S, 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 e.