MathType

Friday, 27 October 2017

HAUSMAN-TAYLOR ESTIMATION WITH STATA (PANEL)





The FE and FD estimator provide consistent estimators but not for the coefficient time-invariant regressor (not identified).The FE estimator eliminates anything that is time-invariant from the model.

This is may be high price to pay for allowing the -variables to be correlated with the individual specific heterogeneity  \({{u}_{i}}\) .

For example, we may interested in the effect of time-invariant variables (like gender) on a person’s wage.It’s possible to derive IV estimators that can be considered to be in between a FE and RE approach.

Hausman-Taylor (1981) estimator is an IV estimator that enables the coefficients of time-invariant to be estimated.

The key step is to distinguish between regressors uncorrelated with  and those potentially correlated with \({{u}_{i}}\) .

The method additionally distinguishes between time-varying and time-invariant regressor.

The individual effects model is then written as;

\({{y}_{it}}={{\beta }_{0}}+{{\beta }_{1}}x_{1it}^{'}+{{\beta }_{2}}x_{2it}^{'}+{{\alpha }_{1}}w_{1it}^{'}+{{\alpha }_{2}}w_{2it}^{'}+{{u}_{i}}+{{\varepsilon }_{it}}\).                       (1)

where; 
\(x_{1it}^{'}\)=  \({{k}_{1}}\)  variables (exogenous) that are time varying and uncorrelated with \({{u}_{i}}\) .
\(x_{2it}^{'}\) =  \({{k}_{2}}\) variables (endogenous) that are time varying and correlated with. \({{u}_{i}}\)
\(w_{1it}^{'}\) =  \({{l}_{1}}\)  variables (exogenous) that are time-invariant and uncorrelated with \({{u}_{i}}\)
\(w_{2it}^{'}\) =   \({{l}_{2}}\) variables (endogenous) that are time-invariant and correlated with \({{u}_{i}}\)



The assumptions;


\(E\left( {{u}_{i}}|{{x}_{1it}},{{w}_{1it}} \right)=0\) but \(E\left( {{u}_{i}}|{{x}_{2it}},{{w}_{2it}} \right)\ne 0\)
\(Var\left( {{u}_{i}}|{{x}_{1it}},{{x}_{2it}},{{w}_{1it}},{{w}_{2it}} \right)=\sigma _{u}^{2}\)
\(Cov\left( {{u}_{i}},{{\varepsilon }_{it}}|{{x}_{1it}},{{x}_{2it}},{{w}_{1it}},{{w}_{2it}} \right)=0\)
\(Corr\left( {{u}_{i}}+{{\varepsilon }_{it}},{{u}_{i}}+{{\varepsilon }_{is}}|{{x}_{1it}},{{x}_{2it}},{{w}_{1it}},{{w}_{2it}} \right)=\rho =\sigma _{u}^{2}/{{\sigma }^{2}}\)

The estimation of Eq(1) will make the OLS and GLS not convergent because some variables are correlated with the unobserved effects (random effects).

FE estimator does not allow for estimating \({{\alpha }_{1}}\)   and  \({{\alpha }_{2}}\) parameter.RE cannot be used: the correlation among variables associated to \({{\beta }_{2}}\)   and  \({{\alpha }_{2}}\) parameters and the individual effects, \({{u}_{i}}\) produce not consistent estimates.

The Hausman-Taylor (H-T) method is based on the RE transformation that leads to the model

\({{\tilde{y}}_{it}}={{\beta }_{1}}\tilde{x}_{1it}^{'}+{{\beta }_{2}}\tilde{x}_{2it}^{'}+{{\alpha }_{1}}\tilde{w}_{1it}^{'}+{{\alpha }_{2}}\tilde{w}_{2it}^{'}+{{\tilde{u}}_{i}}+{{\tilde{\varepsilon }}_{it}}\)                                               (2)


where, for example \(\tilde{x}_{1it}^{'}={{x}_{1it}}-{{\hat{\theta }}_{i}}{{\bar{x}}_{1i}}\)  .


Steps on H-T;

1.       Regress the model by OLS by using differences from the “temporal” mean;

\(\left( {{y}_{it}}-{{{\bar{y}}}_{i}} \right)={{\beta }_{0}}+{{\left( {{x}_{1it}}-{{{\bar{x}}}_{1i}} \right)}^{\prime }}{{\beta }_{1}}+{{\left( {{x}_{2it}}-{{{\bar{x}}}_{2i}} \right)}^{\prime }}{{\beta }_{2}}+\left( {{{\bar{\varepsilon }}}_{it}}-{{{\bar{\varepsilon }}}_{i}} \right)\)       (3)


2.       (a) From Step 1, use the residual , \(\tilde{\varepsilon }\) to compute the “intra-group”  temporal mean of the residuals;

\(\bar{\varepsilon }=\frac{\sum\limits_{t=1}^{T}{{{{\tilde{\varepsilon }}}_{it}}}}{T}\) (4)

and stack them into vector \({\bar{e}}'=\left( \left( \overbrace{{{{\bar{\varepsilon }}}_{1}},{{{\bar{\varepsilon }}}_{1}},..{{{\bar{\varepsilon }}}_{1}}}^{T} \right),...\left( {{{\bar{\varepsilon }}}_{n}},{{{\bar{\varepsilon }}}_{n}},..{{{\bar{\varepsilon }}}_{n}} \right) \right)\)  

 (b) Do a regression;

                \({{{w}'}_{2it}}={{\beta }_{0}}+{{{w}'}_{1it}}{{\beta }_{1}}+{{{x}'}_{1it}}{{\beta }_{2}}+{{e}_{it}}\)            (IV)        (5)

(c) Use the predicted value\({{\hat{{w}'}}_{2it}}\)  from (b) in the big matrix  \(\text{W=}\left( \text{W}_{\text{1}}^{\text{*}}\text{,\hat{W}}_{\text{2}}^{\text{*}} \right)\)  , where matrices \({{\text{W}}_{k}}\)  are formed using the \({{{w}'}_{ki}}\)   for each group \(i\) .

(d) Regress;
               
\({{\bar{\varepsilon }}_{it}}={{\alpha }_{0}}+{{\alpha }_{1}}\text{W}_{1it}^{*}+{{\alpha }_{2}}\text{\hat{W}}_{2it}^{*}+{{\vartheta }_{it}}\)                          (7)


(e) Note: we just did a 2SLS regression.

3.       From Step 1, estimate  \(\sigma _{\varepsilon }^{2}\) from the regression.
From Step 2, estimate \(\sigma _{u}^{2}\) from the RE model, and use the estimate of \({{\sigma }^{*2}}\)   from the 2SLS regression.

Since
\({{\sigma }^{*2}}=\sigma _{u}^{2}+\frac{\sigma _{\varepsilon }^{2}}{T}\)


then an estimate of \({{\sigma }_{u}}\)   is


\(\sigma _{u}^{2}={{\sigma }^{*2}}-\frac{\sigma _{\varepsilon }^{2}}{T}\)


4.       We need weights to computed the FGLS.

Let
\(\hat{\theta }=\sqrt{\frac{\hat{\sigma }_{\varepsilon }^{2}}{\hat{\sigma }_{\varepsilon }^{2}+T\hat{\sigma }_{u}^{2}}}\)
 

then,  for each group \(i\) , let;

                \({{V}^{*}}=\left[ {{x}_{1it}},{{x}_{2it}},{{w}_{1i}},{{w}_{2i}} \right]-\hat{\theta }\left[ {{x}_{1it}},{{x}_{2it}},{{w}_{1i}},{{w}_{2i}} \right]\)                           (8)
                \({{y}^{*}}={{y}_{it}}-\hat{\theta }{{y}_{it}}\)$                                                                                   (9)

                \({{{z}'}_{it}}=\left[ {{\left( {{x}_{1it}}-{{x}_{1i}} \right)}^{\prime }},{{\left( {{x}_{2it}}-{{x}_{2i}} \right)}^{\prime }},{{{{w}'}}_{1i}},{{{{\bar{x}}'}}_{1i}} \right]\)                    (10)

be the new weighted data and \({z}'\)  the matrix of instruments, then do a 2SLS regression of \({{y}^{*}}\)   on \({{V}^{*}}\)  with instruments \({z}'\) :

(a)    Regress \({{V}^{*}}\)   on \({z}'\), then generate the predicted values \({{\hat{V}}^{*}}\) .

(b)   Regress  \({{y}^{*}}\) on the predicted values \({{\hat{V}}^{*}}\) to get \({{\left( {\hat{\beta }}',{\hat{\alpha }}' \right)}^{\prime }}\)  .

5.       To get the variance of\({{\left( {\hat{\beta }}',{\hat{\alpha }}' \right)}^{\prime }}\) , one should not use the residual of the 2SLS regression, because it is not convergent. See Greene Ch8 eq(8.8).



The steps in H-T suggest to estimate the Eq(2) by instrumental variables using the following variables as a  instruments set in Eq(9): \(\left( {{x}_{1it}}-{{x}_{1i}} \right)\) , \(\left( {{x}_{2it}}-{{x}_{2i}} \right)\)    and \({{w}_{1i}}\) , \({{\bar{x}}_{1i}}\) ;
                   
(a)    \({{\tilde{x}}_{2it}}\) is instrumented by its deviation from individual means, \(\left( {{x}_{2it}}-{{x}_{2i}} \right)\)
(b)    \({{\tilde{w}}_{2it}}\)   is instrumented by the individual average of\({{\tilde{x}}_{1it}}\) ,\(\left( {{{\bar{x}}}_{1it}} \right)\)
(c)    \({{\tilde{x}}_{1it}}\)is instrumented by its deviation from individual means, \(\left( {{x}_{1it}}-{{x}_{1i}} \right)\).
(d)   \({{\tilde{w}}_{1i}}\)  is instrumented by \({{w}_{1i}}\) .

                                              
The H-T estimator is based on upon an IV estimator which uses both the within and between transformation of the strictly exogenous variables as instruments.

1.       The exogenous variables serve as their own IVs.
2.       The within transformation of the exogenous individual-and-time varying variables serve as IVs for the endogenous individual-and-time varying variables.
3.       Individual means of the exogenous individual-and-time varying variables are used as IVs for endogenous time-invariant regressor.

If the model is identified in the sense that there are at least many time-varying exogenous regressor \({{x}_{1it}}\)   as there are individual-time invariant endogenous regressor \({{w}_{2it}}\) or \({{k}_{1}}\ge {{l}_{2}}\)  , then the H-T estimator is more efficient than FE.

If the model is under-identified where \({{k}_{1}}\le {{l}_{2}}\)  , then one cannot estimate \({{\alpha }_{1}}\)   and \({{\alpha }_{2}}\)  , parameters and the H-T estimator of \({{\beta }_{1}}\)   and  \({{\beta }_{2}}\) are identical to FE.

The resulting estimator of H-T allows us to estimate the effect of time-invariant variables, even though the time-varying regressors are correlated with \({{u}_{i}}\).

The trick is to use the time averages of those time-varying regressors that are uncorrelated with \({{u}_{i}}\) as instruments for the time-invariant regressors.

This require that sufficient time-varying variables are included that have no correlation with \({{u}_{i}}\).

The strong advantage of the H-T approach is that one does not have to use external instruments. With sufficient assumptions, instruments can be derived within the model.

 


ESTIMATION WITH STATA


To estimate the H-T model, we use again Paneldata01.dta.

From the data, the wage in log (= lwage) is assumed to be a function of  week worked (=wks), lives in south area (south),lives in metropolitan area (smsa), marital status (ms), year of education (=ed), a quadratic of work experience (=exp, exp2), working in manufacturing (=ind), wage set be a union contract (=union), blue collar (=occ) ,gender for female (=fem) and workers is African American (=blk).

Let we use the xtsum command to show within variability and which variables are time invariant.

xtsum lwage exp exp2 wks ms union occ south smsa ind fem blk ed






We check the correlation between exogenous variables (= south, smsa,ind, occ, fem and blk) and the endogenous time-invariant variable (=ed)

pwcorr south smsa ind occ fem blk ed,star(0.05)

 



The results indicate that although fem appear to be weak instrument, the remaining instruments are probably sufficiently correlated to identified the coefficient on ed.

Weak IVs lead to inconsistent estimates of the endogenous variables because there is not enough information to identify the parameter and cause serious size distortion in any test performed (Stock, Wright & Yogo, 2002).

Lets we check again another correlation between exogenous variables (= south, smsa,ind, occ, fem and blk) and endogenous time-variant variable (=wks, ms,exp,exp2,union)

pwcorr south smsa ind occ fem blk wks ms exp exp2 union,star(0.05)

 



Now, the H-T model we want to estimate will become;

\({{y}_{it}}={{\beta }_{0}}+{{\beta }_{1}}x_{1it}^{'}+{{\beta }_{2}}x_{2it}^{'}+{{\alpha }_{1}}w_{1it}^{'}+{{\alpha }_{2}}w_{2it}^{'}+{{u}_{i}}+{{\varepsilon }_{it}}\)                         (11)       

where; 
\({{y}_{it}}\)       = lwage
\(x_{1it}^{'}\)    = south, smsa, ind, occ  .
\(x_{2it}^{'}\)    = wks, ms, exp, exp2, union 
\(w_{1it}^{'}\)   = fem, blk 
\(w_{2it}^{'}\)   = ed 


Before we estimate the H-T, lets we first estimate the FE and RE estimator;

xtreg lwage south smsa ind occ fem blk wks ms exp exp2 union ed, fe

 
 


 
xtreg lwage south smsa ind occ fem blk wks ms exp exp2 union ed, re


 


Now, perform the Hausman test to choose between FE and RE model;

quiet xtreg lwage south smsa ind occ fem blk wks ms exp exp2 union ed, fe
estimates store fe
quiet xtreg lwage south smsa ind occ fem blk wks ms exp exp2 union ed, re
estimates store re
hausman fe re,sigmamore



 

 
The results show that \({{\chi }^{2}}\left( 9 \right)\), has \(\rho =0.000\).

This leads to strong rejection of the hull hypothesis that RE provide consistent estimates.

That means, the FE model is more preferable.

The problem now, we cannot retrieve the value of coefficients for fem, blk and ed because the FE method drop the variables which is time-invariant.

To  estimate the Eq(11) by H-T estimation with endogenous variables is wks, ms,exp,exp2,union and ed;

xthtaylor lwage south smsa ind occ fem blk wks ms exp exp2 union ed, endog(exp exp2 wks ms union ed)



 



The estimated of \({{\sigma }_{u}}=0.9418\)   and \({{\sigma }_{\varepsilon }}=0.1518\)   indicating that a large fraction of the total error variance is attributed to \({{u}_{i}}\) .

The \(z\) -statistics indicate that several the coefficients may not be significantly different from zero.

The coefficient on time-invariant variables fem and blk have relatively large standard errors whereas coefficient on ed is relatively small.