Within Estimation and Dummy Specification equivalence proof in a time-invariant fixed effects model

Embed Size (px)

Citation preview

  • 7/23/2019 Within Estimation and Dummy Specification equivalence proof in a time-invariant fixed effects model

    1/5

    Daniele RinaldoThe Graduate Institute, Geneva20 November 2015

    Proof of equivalence of the within estimation and the dummy variablesspecification (time-invariant fixed effects case)

    Consider the following panel data model with a time-invariant fixed effect component i:

    yit = i+x

    it+it, i= 1 . . . N , t= 1 . . . T

    where each xit has k covariates. By writing this model in matrix form stacking only the obser-vations in t we obtain:

    yi1yi2

    ...yiT

    (T1)

    =

    i...

    i

    (T1)

    +

    xi1xi2

    ...xiT

    (Tk)

    (k1)

    +

    i1i2

    ...iT

    (T1)

    Now, expanding the i individual observations and stacking them yields the following form, usingfor notation clarity the horizontal dots only for visual separation of the blocks of the matrix (forexample, there is no data between y1T andy21):

    y11|

    y1T. . .y21

    |y2T. . .

    .... . .

    yN1|

    yNT

    (NT1)

    =

    1 0 0 . . . 0| | | . . . |

    1 0 0 . . . 0

    0 1 0 . . . 0| | | . . . |0 1 0 . . . 0

    ......

    ... . . .

    ...

    0 0 0 . . . 1| | | . . . |0 0 0 . . . 1

    (NTN)

    12

    ...N

    (N1)

    +

    x11|

    x

    1T. . .x21

    |x2T. . .

    .... . .

    xN1|

    xNT

    (NTk)

    12...

    k

    (k1)

    +

    11|

    1T. . .21

    |2T. . .

    .... . .N1

    |NT

    (NT1)

    which is the full matrix form of a panel data model. We can then give its compact form:

    y= D +X+

    where D = IN T, where T is a column vector of ones of size T: T = [1 1 . . . 1]. Thesymbol denotes the Kronecker product, which is an operation on two matrices of arbitrarysize (technically, the generalization of the outer product) which multiplies the matrix T to eachelement of the matrix IN. We can also see the (N T 1) matrix Dto be precisely

    1

  • 7/23/2019 Within Estimation and Dummy Specification equivalence proof in a time-invariant fixed effects model

    2/5

    D=

    |1T

    |. . .

    |2T

    |. . .

    .... . .

    |NT

    |

    Let us now write the model in the even more compact form:

    y= Z +

    whereZ= [D X] and= [ ]. Using the Frisch-Waugh-Lovell partitioned regression theorem,we can obtain consistent estimates ofby projecting the variables on the orthogonal complementof the matrix D and then regressing them. In other words, we multiply both sides by theannihilator matrixMD = INT D(DD)1D, which gives us

    MDy= MD D =0

    +MDX+MD.

    We know that OLS on this transformed model is consistent, and using the symmetry and idem-potency ofMD we get the estimator

    WG = (XMDMDX)

    1(XMDMDy)

    = (XMDX)1(XMDy)

    But what is MD exactly? Its a linear combination of matrices made of only 0s and 1s, and itwill be shown in two absolutely equivalent ways, one algebraic and one explicit, that multiplyingsuch matrix to any variable is equivalent to the within transformation, which is subtracting thetime trend from each observation of the variable:

    MDy=

    y11 1T

    Ty=1y1t

    ...

    y1T 1T Ty=1y1t. . .

    y21 1T

    Ty=1y2t

    ...

    yNT 1T

    Ty=1yNt

    2

  • 7/23/2019 Within Estimation and Dummy Specification equivalence proof in a time-invariant fixed effects model

    3/5

    1) Algebraic way

    We have the annihilator matrix MD = INT D(DD)1D. Let us analyze the contents of

    such matrix:

    (DD) = (IN T)(IN T)

    = (IN

    TT) (property of the Kronecker product)

    = (IN T) (because

    T= [1 1 . . . 1])

    (DD)1 = (IN 1/T) = 1

    TIN

    D(DD)1D = 1

    T(IN T) IN (IN T)

    = 1

    T(IN T

    T) =PD (the projection matrix)

    Now, note that TT = T (a scalar), but TT is a T T matrix made only of 1s and that

    1/T (T

    T) is a T Tmatrix made only of 1/Ts. In the variabley f you take the individual 1,for example, and let it vary in t you have the vector ofT observationsy1t. You can then see that1T

    (TT)y1t = y1, which is a column ofT times the time mean of the first observation. Then,

    (INT

    T

    T ) y= yi, which is the (N T 1) column vector that contains all the Nobservations

    time means. We can now see that the it-th element of the transformed dependent variable is

    MD y

    it

    = yit yi

    which is the within trasformation.

    2) Explicit way (exactly the same)

    (DD) =

    T 0 . . . 0

    0 T . . . 0

    ......

    . . . ...

    0 0 . . . T

    (NNT)

    T 0 . . . 0

    0 T . . . 0

    ......

    . . . ...

    0 0 . . . T

    (NTN)

    =

    T 0 . . . 00 T . . . 0...

    ... . . .

    ...0 0 . . . T

    (NN)

    (DD)1 =

    1

    T

    0 . . . 00 1

    T . . . 0

    ......

    . . . ...

    0 0 . . . 1T

    (NN)

    = 1

    TIN

    D(DD)1D = 1

    T(DD)

    Now we have the following:

    3

  • 7/23/2019 Within Estimation and Dummy Specification equivalence proof in a time-invariant fixed effects model

    4/5

    (DD) =

    T 0 . . . 0

    0 T . . . 0

    ......

    . . . ...

    0 0 . . . T

    (NTN)

    T 0 . . . 0

    0 T . . . 0

    ......

    . . . ...

    0 0 . . . T

    (NNT)

    =

    = (notice thatT

    T is aT Tmatrix of ones)

    =

    1 . . . 1...

    . . . ...

    1 . . . 1(TT)

    0 . . . 0

    01 . . . 1...

    . . . ...

    1 . . . 1

    . . . 0

    . . .

    0 0 . . .

    1 . . . 1...

    . . . ...

    1 . . . 1

    (NTNT)

    1

    T(DD) =

    1/T . . . 1/T...

    . . . ...

    1/T . . . 1/T(TT)

    0 . . . 0

    0

    1/T . . . 1/T...

    . . . ...

    1/T . . . 1/T

    . . . 0

    . . .

    0 0 . . .

    1/T . . . 1/T...

    . . . ...

    1/T . . . 1/T

    (NTNT)

    The annihilator matrix MD =INT 1T(DD) can be then seen to be exactly equivalent to

    4

  • 7/23/2019 Within Estimation and Dummy Specification equivalence proof in a time-invariant fixed effects model

    5/5

    1 1/T . . . 1/T...

    . ..

    ...1/T . . . 1 1/T

    (TT)

    0 . . . 0

    0

    1 1/T . . . 1/T...

    . . . ...

    1/T . . . 1 1/T

    . . . 0

    . . .

    0 0 . . .

    1 1/T . . . 1/T...

    . . . ...

    1/T . . . 1 1/T

    (NTNT)

    where one should notice that (1 1/T) appears only in the main diagonal and all the other

    nonzero elements are 1/T. The first row of the (N T 1) matrixMDy is then y11 1T

    Tt=1y1t

    because all the rest of the observations iny after individual 1 will be multiplied by 0: if we repeatthis for all the observations in y we get

    MDy=

    y11 1T

    Tt=1y1t

    ...

    y1T 1T

    Tt=1y1t

    y21 1T

    Tt=1y2t

    ...

    y2T 1T

    Tt=1y2t

    ...

    yN1 1T

    Tt=1yNt

    ...

    yNT 1T

    Tt=1yNt

    (NT1)

    =

    y11 y1...

    y1T y1

    y21 y2...

    y2T y2

    ...

    yN1 yN...

    yNT yN

    (NT1)

    which is exactly the within transformation.

    5