W‘IWH'Hl HM 1 WW 1 MI 0 ' slicers / at 8912?” LIBRARY Michigan State University This is to certify that the dissertation entitled SPECIFICATION TESTS IN PANEL DATA MODELS WITH UNOBSERVED EFFECTS AND ENDOGENOUS EXPLANATORY VARIABLES presented by Carrie A. Falls has been accepted towards fulfillment of the requirements for the PhD degree in Economics Major Professor’s Signature Alfie/(5+ 2%, 2007 Date MSU is an afi'innative-action, equal-opportunity employer —.-.-.- -.—.-.-.-.-.-.-.-.-.—,-.- -.-.-A- -.-.-._ — n..-..--- -.-.-.--.-.-.-.-t-.—.- PLACE IN RETURN BOX to remove this checkout from your record. To AVOID FINES return on or before date due. MAY BE RECALLED with earlier due date if requested. DATE DUE DATE DUE DATE DUE JUL 2 8 2010 APR 01 2009 M28” I0 6/07 p:/CIRC/DateDue.indd—p.1 SPECIFICATION TESTS IN PANEL DATA MODELS WITH UNOBSERVED EFFECTS AND ENDOGENOUS EXPLANATORY VARIABLES By Carrie A. Falls A DISSERTATION Submitted to Michigan State University in partial fulfillment of the requirements for the degree of DOCTOR OF PHILOSOPHY Department of Economics 2007 ABSTRACT SPECIFICATION TESTS IN PANEL DATA MODELS WITH UNOBSERVED EFFECTS AND ENDOGENOUS EXPLANATORY VARIABLES By Carrie A. Falls My dissertation consists of three chapters on specification testing in panel data models containing unobserved heterogeneity and endogenous variables. The first chapter, "Regression Based Specification Testing for Panel Data Models Estimated by Fixed Effects ZSLS," derives specification tests for linear panel data models estimated by fixed effects or fixed effects instrumental variables methods. I propose convenient, regression-based tests for endogeneity, over-indentification, and non-linearities. Importantly, some versions of the tests are robust to heteroskedasticity and serial correlation. As a illustration, I test for non-linearities and for endogenous Spending in analyzing the afi‘ect of spending on student performance. The second chapter, "Testing for Correlated Random Effects in Panel Data Models Estimated using Instrumental Variables," proposes variable addition tests for correlation between the unobserved heterogeneity and the instrumental variables. In addition to the standard model with a single additive effect, I consider the extension to models with unit-specific trends. As an illustration, I test for correlated district effects and trending district effects using panel data on student performance and educational spending. The third chapter, ’Testing the Conditional Variance and Unconditional Variance in Panel Data Models Estimated by Fixed Effects ZSLS," develops a robust regression based test for heteroskedasticity. In addition, I derive a test for the unconditional variance. I apply the test for heteroskedasticity to a panel data model that explains student performance in terms of spending, poverty rates, and enrollment. For my mom, Kelsey Gibson iv ACKNOWLEDGMENTS I would like to thank Jeff Wooldridge for encouraging my interest in econometrics. I am very fortunate to have had his excellent training and assistance. TABLE OF CONTENTS LIST OF TABLES ....................................................................................... vii CHAPTER 1 Regression Based Specification Testing for Panel Data Models Estimated by Fixed Effects ZSLS ............................................................... 1 CHAPTER 2 Testing for Correlated Random Effects in Panel Data Models Estimated using Instrumental Variables ................................................... 35 CHAPTER 3 Testing the Conditional and Unconditional Variance Matrix in Panel Data Models Estimated by Fixed Effects ZSLS .......................... 57 APPENDIX Stata Commands for Implementing the Tests in Chapter One ................ 85 REFERENCES ....................................................................................... 91 vi LIST OF TABLES TABLE 1 Estimates of the Percentage of Students with a Satisfactory Score on the 4’” Grade Math Test .................................................................... 31 TABLE 2 Fixed Effects IV, Random Effects IV, and Random Effects IV including time averages of the instruments ........................................... 54 vii Regression Based Specification Testing for Panel Data Models Estimated by Fixed Effects ZSLS 1. Introduction Panel data methods have become very important in a broad range of empirical studies. The most convincing studies allow the unobserved effect, or unobserved heterogeneity, to be correlated with the time-varying explanatory variables. Therefore, fixed effects (FE) methods are most often used for policy analysis and for estimating equations where omitted heterogeneity is viewed as being an important source of bias. The standard fixed effects estimator has been used in numerous studies. While estimation by fixed effects allows for arbitrary correlation between the unobserved effect and the explanatory variables (which are necessarily time varying), it is not without cost. Estimation afier the within transformation requires a form of strict exogeneity imposed on the explanatory variables. That is, for consistent estimation of the parameters, the time-varying explanatory variables must be uncorrelated with the idiosyncratic error in all time periods. Therefore, while much attention is given to the relationship between the unobserved heterogeneity and the observed explanatory variables, it is always possible that the explanatory variables are correlated with the idiosyncratic errors resulting in asymptotically biased estimation. When dealing with panel data we need to examine the relationship between the explanatory variables and the idiosyncratic error contemporaneously as well as in other time periods. Wooldridge (2002, Section 10.7) proposes a simple variable-addition test of the assumption that the idiosyncratic error at time t is correlated with the explanatory variables in the next time period. This test has power to detect feedback from unexpected changes in the dependent variable this period to future explanatory variables. But often we are interested in testing for contemporaneous correlation between the explanatory variables and idiosyncratic errors, as this kind of endogeneity occurs when there is measurement error, omitted variables, or simultaneity. I Show, given the availability of instruments, simple tests for contemporaneous endogeneity are fairly straightforward to compute. When one or more explanatory variables are thought to be contemporaneously endogenous, it is popular to combine FE methods with instrumental variables (IV) methods. Wooldridge (2002, Chapter 11) contains a discussion and references. Although fixed effects-instrumental variables (FE-IV) methods are becoming more widely used, little work has been done on extending standard specification tests to the FE-IV framework. When we decide explanatory variables are endogenous and apply FE-IV, it is important to test any overidentification conditions — just as in a pure cross-sectional or time series framework. If we maintain standard assumptions, such as homoskedasticity and serial independence of the idiosyncratic errors, applying tests of endogeneity and overidentification are fairly straightforward. But there is much interest recently in making inference fully robust to any second moment matrix of the idiosyncratic errors. In this chapter I propose a framework for regression-based tests of standard assumptions afier estimation by FE-IV. The framework can be used to test for endogeneity of some explanatory variables, for overidentification restrictions in the context of FE-IV, and non-linearities. I cover tests that are valid only if the idiosyncratic errors satisfy the “ideal” assumptions, as well as tests that are fully robust to serial correlation and heteroskedasticity. Davidson and MacKinnon (1993) and Wooldridge (1995a) propose regression-based tests for endogeneity that can be applied to single-equation cross-sectional or time series equations, but they do not apply directly to panel data models estimated by fixed effects. The framework here follows most closely that of Wooldridge (1995a), but I explicitly treat the presence of the unobserved effect. The asymptotic analysis is with a fixed number of time periods and an increasing cross-sectional sample size. The remainder of this chapter is organized as follows. Section 2 contains a brief literature review. In Section 3 I present the basic model and estimation method. In Section 4 I obtain a general specification test afier F E-ZSLS estimation. Section 5 presents examples for executing tests of endogeneity, over-identification, and non-linearities. Section 6 provides conditions for applying the derived tests to unbalanced panels. In Section 7 I apply the tests to a panel data model that explains test pass rates in terms of spending, poverty rates, and enrollment. I test for endogeneity of spending — afier controlling for a school fixed effect. The data set, used by Papke (2007), comes from Michigan schools from 1992 through 2004. Section 7 contains a brief conclusion. Stata commands for implementing the test for endogeneity, over-identification, and non-linearities are provided in the appendix. 2. Background The literature on Specification testing in panel data models is surprisingly thin, and has mostly concentrated on comparing different estimators via a Hausman (l 978) test. Wooldridge (2002, Chapter 10) covers a variety of tests in the context of standard fixed effects estimation, but he does not consider tests of contemporaneous correlation between the regressors and the idiosyncratic errors. Such tests require the availability of instrumental variables, and I assume that I have suitable instruments. Testing for endogeneity and testing over-identifying restrictions is pretty well established in pure cross-sectional and pure time series contexts. Hausman (1978) has the seminal paper, and Davidson and MacKinnon (I993, Chapter 7) includes a general treatment. Davidson and MacKinnon offer regression-based versions of the standard Hausman test. [Ruud (1984) was an early proponent of regression-based versions of Hausman’s tests] But these and other references cover only non-robust tests — effectively, they maintain that one of the estimators in a Hausman comparison is relatively efficient. Wooldridge (1990, l995a) proposed a framework for robust, regression-based statistics. But Wooldridge’s framework is for time series applications and does not easily cover panel data models with unobserved effects. Below, I effectively extend Wooldridge’s (l995a) framework to the case of unobserved effects panel data models estimated by fixed effects-instrumental variables procedures. In addition to deriving tests under a full set of ideal assumptions, 1 derive fully robust versions, too. The asymptotic analysis is for a fixed time series dimension with the cross-sectional sample size growing. Thus, the asymptotics is standard random sampling asymptotics. 3. Model and Assumptions 1 consider the standard unobserved effects panel data model y;,=x,~,fi+c,-+u,-,, t= I,2,...,T, (3.1) where i denotes a random draw from the cross section. The vector x i, is 1 x K of explanatory variables, c,- is the time-constant unobserved effect, and u,-, is the idiosyncratic error. To allow estimation by instrumental variables, let 2;, be a l x L vector of instruments, where L 2 K. Thus, the set of observations for unit 1' is {(xi,,y,-,,z,-,) : t = l, . . . , 7}. I assume random sampling in the cross-section dimension with a sample of size N. The time series dimension, T, is fixed in the asymptotic arguments. Typically, 2;, and xi, would overlap — for example, each would include a full set of time dummies to allow unrestricted secular effects. In this chapter, I make no assumption regarding possible correlation between x,-, and 0;. I also allow the instruments to be arbitrarily correlated with c;. Therefore, to consistently estimate B, the unobserved effect is removed via the within transformation. For each (i,t), let)?“ = y" — )7,- be the time-demeaned dependent variable, where j) = T‘1 2;] y,-, is the time average. Similar notations hold for 52,-, and an. After applying the within transformation to equation (3.1) the model becomes fitt=55m3+iiiu t= 1,.-.,T, (3.2) If (xi, : t = l,...,T} is strictly exogenous — that is, E(x:-su,-,) = 0, all s,t = l,...,T, then 5051-51711) = 0. Thus under strict exogeneity of the explanatory variables estimation of equation (3.2) by pooled OLS is a consistent procedure for the estimation of B. However, to ensure identification, the rank condition must be satisfied. That implies, at a minimum, the explanatory variables must vary across time. This leads to the so-called within or fixed-effects estimator. Since we are interested in the case where the explanatory variables cannot be treated as strictly exogenous we estimate (3.2) by pooled ZSLS, using time-demeaned instruments 2,7. This produces the fixed effects-two stage least squares (F E-ZSLS) estimator. A useful expression for the estimator is obtained by defining X,- and 2i as the T x K and T x L matrices of time-demeaned regressors and instruments, respectively, and j},- as the T x 1 vector of time-demeaned dependent variables. Then - (EXHIBI- Inserting equation (3.2) gives -l N N -1 N ’1 = 13 + (Eff-Z) (Z 2’2) (Z '29?) (3.3) i=1 i=1 i=1 where the last equality uses Z;u',- = Zfi-ui. For each i, we can write T T T "I" ..I .. " " ..I .. "I ..I ZiZi = 22,1212, XIZI' = 2x112”, and Ziu; = Ell-tuft. t=l t=l t=l We can easily state sufficient conditions for consistent estimation of B, with fixed T asN-+ oo. ASSUMPTION A.l: For all s,t = 1,..., T, E(z§su,-,) = 0. (3.4) Assumption A.l is a strict exogeneity condition on the instrumental variables — after eliminating the unobserved effect, c,~ — and implies E(§;-,uiz) = 0,1 = 1,. . ., T. It follows then that N“1 2:1 Zui fl 0. Assumption A.l is sufficient for tests of endogeneity and overidentification. However, testing for non-Iinearities requires a stronger zero conditional mean assumption. Specifically, we will require E(uiz|Zi) = 0- (35) Equation (3.4) implies that the instruments are not linearly related to the idiosyncratic error whereas the zero conditional mean rules out nonlinear relationships as well. Hence, maintaining the zero conditional mean is much more restrictive, although often intended in structural models. The second assumption we need for consistency of FE-ZSLS is a rank condition. First, define H as an L x K parameter matrix from the population linear projection of 56,-, onto 2,,,t = 1,...,T, that is, —l T T Ewan) Efrem). (3.6) 1:] t=l o o o ..I .- 0 o For this matrix to eXIst, we need to assume T E z- 2- IS nonsm ular, an 1:] u 1‘ assumption that rules out time-constant instruments and instruments that are perfectly collinear. Given I'I, define the population projection x ,,, Note that this is not the same as projecting 56,-, onto 2,, for each I; in effect, because the F E-ZSLS estimator is a pooled estimator, the projection in (3.7) pools across time. The FE-ZSLS estimator effectively uses 35:, = 2,,fI in place of 56,-, in the estimation of B whereI'I= [Zr—l 2:12 z,-,'z,-,]_l Zfi, Z_ _, ,,x,, Isthe obvious, consistent estimator of TI. That is, NT "1 N T Z 5‘53]??? ZZXE'PII (3.8) i=1 (=1 i=1 (=1 E) II QTIG’.‘ NA!“ XX: X.- XX, y.- i=1 Expression (3.8) makes it clear that Z_ ,E(5c'-‘"”'-" ,) must have full rank, for which we need 2;, E(z z'-,52,,) to have full rank. Thus, we have the following assumption: ASSUMPTION A.2: (i) rank 2;, E(2§,2,-,) = L and (ii) rank 23;, E(2§,52,-,) = Of course, necessary for the rank condition is the order condition, L 2 K. That is, there must be at least as many instruments as explanatory variables. THEOREM 2.1: Under assumptions Al and A2, the pooled ZSLS estimator obtained from a random sample in the cross-section is consistent for B. Proof: The asymptotic first order properties are derived by rewriting equation (3.8) as A*’ . N Mm: -' N p = fi+ N-1 25?, X,- N-1 ZX, u,- (3.9) i=1 i=1 Add/vi! Under A.2, N‘l 23:156- 2?,- is non-singular (with probability approaching one) with A*’A* plim (N4 2:, X,- X,) = A4, where A .=_ E(X}"'}f}‘). Further more, under Assumption A.l, the N <.\*’ .. plim N“l 2X,- u, = E(X}'"u,-) = 0. i=1 Therefore, by Slusky’s theorem (for example, Wooldridge (2002, Chapter 3),plim B=B+A‘l o0=B. The asymptotic normality of W (B — B) results from the asymptotic nomality of N"”2 2:, X’f'ub which follows from the central limit theorem under A.1, A2 and finite second moment conditions. Thus, the asymptotic distribution of _ N -- 1 . N “2 Zi=1 Xf u,- 15 N d N-W- ZXf’u, _. Nonnal(0,B), i=1 where B —-_= E()"(}"u,-u;-)"(f) But we also need to use the important result that having to estimate II in the first stage does not affect the asymptotic distribution. Formally, N M, N N—l/ZZX,‘ u,- = N—l/ZZEIU,‘+OP(I). i=1 i=1 It follows that ,/N(i3 — 13) 5’» Normal(0,A‘lBA‘1 ). Importantly, the asymptotic variance A‘lBA“l places no restrictions on Var(u,-|z,,c,-), and so it is fully robust. It is the basis for robust inference using the FE-ZSLS estimator (which is the specific FE-IV estimator we cover in this chapter). The asymptotic variance can be simplified by ruling out heteroskedasticity and/or serial correlation. However, the interest in this chapter is in deriving robust tests, such assumptions are considered later as a special case. 4. A General Framework for Specification Tests We now propose a framework, which extends Wooldridge (1995a), that allows various specification tests after FE or FE-IV estimation. For example, if interest lies in testing whether IV methods are necessary, we want to test whether x,-, is correlated 10 (3.10) (3.11) (3.12) (3.12) with the idiosyncratic error, u ,,. In deriving the test statistic and its properties I generalize the methodology by defining a set of misspecification indicators that are then tested for correlation with the idiosyncratic error. Let v,-,(0) be a l x Q vector of misspecification indicators. I allow v,-,(0) to depend on some G x 1 vector of parameters (0) as well as elements of {z,,,x,-,,y,-,}. The parameter vector 0 can include B and other parameters. Sufficient for our testing purposes is that we have a W -consistent estimator of 0, a very weak requirement that follows generally by the central limit theorem. For notational convenience, let v,, = v,,(0). Technically, it would be more appropriate to distinguish the “true” value of 0 from a generic value, but in the interests of keeping the notation simple, I let 9 denote the true value. Ideally, we would state the null hypothesis as Ho : E(v:-,uiz) = 0, t = 1, . . . , T. However, because we are removing the unobserved effect via time-demeaning (the within transformation), the null is effectively T H0: 2 Hagan) = 0, t= 1,...,T. (4.1) (=1 Taking the null as stated in (4.1) has a couple of consequences. First, the test maintains that the selection indicators are actually strictly exogenous. Second, the time-demeaning complicates the asymptotic analysis because of the degeneracy it introduces into the limiting distribution. But I take care of that in my analysis. Because the basis for testing is F E-IV (with FE as a special case), the tests are actually based on 11 T T Z 2131,12,.) = Z E(i3:-,u,-,) = 0. (4.2) t=l t=l That is, it does not matter whether the idiosyncratic errors have been demeaned. This equivalency is a result of the idempotent matrix identity. However, if we took away the summations (4.2) would not hold. This observation simplifies the asymptotic results, just as with analyzing the usual FE estimator (see Wooldridge (2002, Chapter 10)). Clearly, the fact that the null is effectively (4.2) limits the scope of the tests. For example, a test for AR(I) serial correlation would take 12,-, = u ,-,,_1 , a scalar However, under the null hypothesis,of no serial correlation, equation (4.2) is violated due to the negative serial correlation that is induced by the within transformation. Therefore, the test statistic proposed in this chapter is limited to tests where the misspecification indicator is strictly exogenous under the null. In Chapter 3 I explicitly consider the problem of testing for serial correlation after FE-ZSLS estimation. Tests based on (4.2) are derived under assumptions that are extensions of those made in section 3. Each assumption is assumed to hold under the null. ASSUMPTION B.l: Assumption A.1 holds and, in addition, (i) 2;, E[ii,,(9)'u,,] = 0 and (ii) 2;, E[Vgii,-,(0)'u,-,] = 0, where V913,,(0)' is the Q x G Jacobian of 13,-,(0)'. Part (ii) of Assumption BI is an auxiliary assumption that extends Wooldridge (1995a). It ensures that the estimation of 0 does not affect the limiting distribution of the test statistic so long as [N (0 - 9) = 0,,(1). In most cases, requiring Assumption 12 B. 1 (ii) is innocuous. It is satisfied in the test for endogeneity and tests of overidentification under A.l , and it holds for testing for non-linearities when we impose E(u,-,|Z,-) = 0. As a general rule, Assumption B.l(ii) holds when the null hypothesis is defined in terms of zero conditional means. If the misspecification indicator is linear, then the assumption generally holds under zero correlation assumptions. Equation (4.2) suggests using the sample analog, N T A, N-1 2 2 3,2,, (4.3) as the basis for a test, where 22,, = y,, — x,,B are the FE-ZSLS residuals and ‘13,, is evaluated at B. To use (4.3) as the basis for a test, we must derive the limiting distribution of N T I N-“ZZZWI (4.4) i=1 #1 However, it is usually the case that the limiting distribution of (4.4) is different from the limiting distribution of N T N-“2 Z Z 3;,” (4.5) i=1 1:1 In other words, the asymptotic distributions of JN (B — B) and JN (B - 0) typically affect the limiting distribution of the moment conditions. While deriving a quadratic form of (4.4) that has an asymptotic chi-squared distribution is not difficult, the resulting statistic would not be easy to compute. A Simpler approach is to transform (4.5) so that replacing u,, with IL, does not affect the limiting distribution of the test 13 statistic. This results in robust test statistics that are easy to compute using a series of regressions, and are asymptotically equivalent so long as a N -consistent estimation procedure is used in the first-stage estimation, as Shown by Wooldridge (1990). This brings us to our second assumption, which extends Wooldridge (1990, l995a) to allow exlicitly for time—demeaning in a panel data context. ASSUMPTION B.2: Assumption A.2 holds. In addition, letting 134,-, = (2,,, i3”), define the linear projection x; = fig-,1“, (4.6) where T -1 T F = [ZEMIMIDI ZE(w§,5c,-,). (4.7) #1 (=1 Further, define the projection residuals r,-, a 9,, —5&;!;A, (4.8) where T '4 T A = [Ziggy/52;; :1 2150533,). (4.9) t=1 t=l Assume T rank T“ ZE(r§,r,-,) = Q. (4.10) t=l As discussed in Wooldridge (1 995a) in the case with a single data dimension, redefining 3;; to be the projection onto the extended vector (2,,, 1%,), and then netting l4 out 52,-,, leads to computationally simple tests. The same is true here. Of course, we have to operationalize the procedure by plugging in first-stage estimators. Therefore, let N T A -1 N T =2: 2A Witwit z 20 Witxit, i=1 t=l i=1 t=1 .. 4) “ ’..\ .. 4: xit = WIIF- Where W1: = (21:,vz'1) - N ZZ§IH§I Zin-tvu. i=1 t=l i=1 t=l and 2",, = i3}, - 55,-,A. In other words, 35,-, are the fitted values from the pooled regression 51,,on2,,,$,,,t= 1,...,T,i= 1,...,N (4.11) and then the 7",, are the residuals from the pooled regression P,,on§,-,,t=1,...,T,i=1,...,N. (4.12) Now, we obtain a test statistic by adjusting equation (4.3) by replacing ii}, with 7",, Thus, we are partialling out the portion of the instruments and misspecification indicators that are linearly related to the explanatory variables in (3.2). Equivalent to the parialling out in (4.12) is to simply add ‘13,, to the fixed effects estimating equation (3.2). That is, adding the misspecification indicators to (3.2), then estimating the augmented equation by pooled-OLS using time-demeaned variables, is equivalent to, first estimating f7, then regressing 12,-, on F,,. However, regardless of how the partialling out is achieved it is this partialling out of i3,,, the misspecification indicators, that allows us to ignore the first-stage estimation. That is, we can ignore 15 the estimation of B when deriving the limiting distribution of the test statistic. The proposed test statistic is based on N‘1 22mm, (4.13) i=1 (=1 Our goal is to Show that, under H0 and Assumptions 3.] and 8.2, N T N T N-'/2 2 2 21,4, = N‘“2 2 2 r;,u,-, + 0,,(1), (4.14) i=1 (=1 i=1 (:1 where r,, = 13,-, — 33A are population residuals; then, the central limit theorem can be applied to the second piece. To establish (4.14), we first Show N T N-1/222r,, u,,= N-1/222r;,a,, +o,,(1). (4.15) i=1 (-1 i=1 #1 To Show (4.15) we can apply a mean-value expansion and use Assumption B.l(ii). Then, N-l/2 2 2’ v,,u, = N-l/2 2 23' v,,u,, + (2 E(v,,v;,u,,)> 7M9 - 6) + 0,,(1) i=1 (=1 i=1 (=1 = film”2 2 Z I'd-(1217+ 0p(1). i=1 (=1 Next, N4” 2 2(XIIA) “it: A(N-l/2N 2 EN xi( “(7) i=1 (=1 i=1 (=1 N T + JN(A — A)'(N‘l Z: 2:171”) i=1 (=1 16 N T = NOV-”2 22353221,) + 0p(1)~op(1) i=1 I‘=l N T = A'(N‘l/2 22§;'a,-,) +o,,(1) i=1 t=l because WM — A) = 0p(1) and N_12f:iz¢:1§;’fiit = op(l). Finally, it can be shown that N T N T N-“2 2 2 fi’fii, = 1w“2 2 2x3’ai, + 0,,(1). i=1 1:1 i=1 z=1 Collecting terms we have established (4.15). We still need to show N T N T N'”2 2 Z r2112“ = N‘”2 Z Z rI-tui, + 0p(l). i=1 t=l i=1 t=1 But N T N T N T 2W“2 Z 2 4,12,, = N‘“2 Z Z rauo - (N-1 Z Z rim-x) ml? — 13). i=1 t=1 i=1 (=1 i=1 (=1 Now, 2;] rz-txi, = 2’: l rip?“ (because ri, is a linear combination of vectors that have been time demeaned). Further, 56,-, = 5:; + g), where, by construction, 21:] E(2:-,g,-,) = 0 and 2;] E(i'2:-,g,-,) = 0. Therefore, because r), is a linear function of conga”), it follows that 2;, E(r§,g,-,) = 0. So 2;] E(r§~,5%,-,) = 21:] E01152?!) = 0, where the last equality follows because ri, is the population residual fi'om the regression in, on 56;}, t = 1,. . ., T. We have shown that N‘1 2:1 2;] 7'17in = 013(1) (by the law of large numbers); combined with 17 JN—(fi — fl) = 0p(l) we have N‘”:2 2:] H rituit = N‘“2 2).: 21H ruui, + op(l). When we combine the previous results we arrive at the important relationship in (4.14). Now obtaining a test statistic is easy. Define T T T C E Var—' EN: 2 m.) (2 2 22.2..) :l [:1 t=l i=1 t=l i=1 (=1 N T ° 22421317) (4.28) =~(r—1>(ZZ£M) (2321.) (232) (212.4) i—I t-l i=l t-l i=1 t=l gr) II A .Ffl2 M’s where R27; is the usual R-squared from the pooled regression in (4.21). Under the null hypothesis and the extra assumptions B.3 and 3.4, N(T— I)Ru~ 1Q. (4.29) Importantly, failure of either B.3 or B4 causes the test statistic in equation (4.29) to no longer have an asymptotic chi-squared distribution. Further, as discussed by Wooldridge (1990, 1991), the nonrobust version of the statistic has no systematic power for detecting violations of B.3 or B4: the limiting distribution of i'nr is a quadratic form an a random normal vector, and the distribution may lead to asymptotic rejection frequencies either higher or lower than the nominal size. Because the robust version of the test has the same limiting distribution as Tm under local alternatives when B.3 and B4 are true, nothing is lost in terms of asymptotic power against local alternatives by using a robust test even when the ideal assumptions hold. Because the fully robust test is, these days, fairly easy to compute, there is a strong case to be made for computing the robust version, even if the nonrobust version is also computed. 22 5. Examples I now provide several examples of how the testing framework in Section 4 can be applied after FE or FE-IV estimation. The appendix contains a list of commands that can be used to implement the tests in a popular software package, Stata. 5.1. Testing for Endogeneity To test whether a subset of the time varying explanatory variables is endogenous, we write down a partitioned model, yiz =Xi1131+xitzl32+6i+um t= 1,2,...,T, (5-1) where xm is 1 x K1 and xuz is l x K2. The vector x512 is assumed to be strictly exogenous (with respect to the idiosyncratic error); both xm and xitz are allowed to be correlated with of. Interest lies in testing if xm is correlated with the idiosyncratic errors. In an FE environment, the null hypothesis is Ho :E(5e;.,,u,-,) = 0, t= 1,...,T (5.2) Under the null hypothesis that xm is exogenous, the estimating procedure is standard fixed effects, which means that the instruments 2;, used to estimate the null model are just x”. In order to test the null hypothesis that xm is exogenous, we need at least K 1 time-varying instruments. Let hm be a 1 x L1 vector of strictly exogenous instruments with L] 2 K1. Then the full set of instruments for estimation under the alternative is q i, a (h m ,xi12)- The regression-based Hausman test that compares FE and F E-ZSLS can be obtained as follows. Estimate the reduced form equations (K 1 of them) 23 xix] = (1211—1 ‘1' 01+ Vii (5-3) by fixed effects, and obtain the FE residuals, 13,-, = x,” — q ,-,FI. This 1 x K, vector is the vector of misspecification indicators. Because x,” is exogenous under Ho, 2,, = x,, in this case. So, regress fi,,onx,-,,i= 1,...,N,t= 1,...,T (5.4) and obtain the residuals, 2",, Let 12,-, be the FE residuals from estimating (5.1). Then the fully robust statistic is to testjoint significance of 2. in the artificial equation 12,-, = 2,,22 + error,, (5.5) using pooled OLS and a fully robust variance matrix. Notice that the dimension of 2, as always, is the degrees of freedom in the limiting chi-square distribution: K1 in this case. Because the first-stage FE estimations should be done anyway to determine the strength of the instruments, the only additional step is in the regression (5.4) — a trivial set of pooled OLS regressions. (If x,,1 is a scalar, it is a single regression.) The nonrobust test is N(T— I)R,2, from the regression (5.5). 5.2. Testing Overidentifying Restrictions We can also test the validity of overidentifying restrictions in a fully robust manner. Let 2,, be the 1 x L vector of instruments with Q = L — K > 0. As discussed in Wooldridge (I995a), the misspecification indicator, in this case for panel data, can be any I x Q subset of 2,, that is not also in x,-,. To compute the statistic, we obtain the FE-ZSLS residuals, 12,-,, the first-stage fitted values, 35,-, from the regression 56,-, on 24 211, and let 9,, be the demeaned misspecification indicators (which do not depend on estimated parameters in this case). Then 1",, are the residuals from the pooled OLS regressions 9,, on §,,, and then the test is carried out as in equation (5.5). 5.3. Testing for Non-linearities Testing for non-linearities in unobserved effects models with possibly endogenous variables poses some challenges because the nature of the alternative model is not clear. Of course, we can always add nonlinear functions of exogenous and endogenous variables and reestimate a more general equation by F E-ZSLS. But it is also useful to have parsimonious tests, such as Ramsey’s (1969) RESET. The tests in Section 4 can be used to obtain RESET-like tests in the current framework. With large N and small T, we cannot add nonlinear functions of x,, 6 + c, to the model and estimate these because c, is unobserved. One approach is to first eliminate c, through the within transformation, as usual, where we again partition the equation into endogenous and exogenous explanatory variables: )71: = 55121131 +55iz2fi2 + 171:, t= 1,...,T. (5-6) Applying RESET to this equation directly would mean choosing misspecification indicators such as (56,” [31 + 5?,QBZ)2 and (52,,1 m + 56,,232)3 (and possibly higher order powers). With exogenous explanatory variables this choice produces a valid test, and then 9,, = [(5E,,fi)2, (56,,B)3] is a sensible choice for a two degrees-of-freedom test. Because the x,, are exogenous, 317'} ,, = 52,,. The l x 2 vector 5“,, is obtained by regressing each element of 3,, on 3%,, When it,” is thought to be endogenous, (55,,fi)P would be generally correlated 25 with 12,, even if there are no non-linearities in the model. One possibility, which extends Wooldridge (1 995a), is to replace 56,,1 with the first-stage fitted values, 3? ,,1 , from 5%,,1 on 2,,. Then, the misspecification indicators become, say, (jig-Iii, + i,,2f32)2 and ((32,131 + 56,,232)3, where [3 is the FE-ZSLS estimator. Such a test should have power against general forms of nonlinearity. But, like with RESET in pure cross section or pure time series contexts, it is not clear how to modify the model in case of rejecting the null, linear model. 6. Applying the Tests to Unbalanced Panels The previous treatment assumed that a balanced panel data set is available. In practice, one often has to deal with unbalanced panels. As discussed by Wooldridge (l995b) and Semykina and Wooldridge (2005), accounting for unbalanced panels when selection is endogenous can be very difficult. However, as shown formally by Semykina and Wooldridge (2005), FE-IV estimation has some robustness to endogenous selection: selection in each time period can be arbitrarily correlated with the unobserved effect and the instruments. Therefore, we can easily allow that kind of selection in the current framework, too. The selection indicators, which we call s,,, appear in formulas -— even sample averages — in a nonlinear fashion. For example, the time average of the dependent variable can be written as )7, = 77‘ 21:, s,,y,,, where 3,, = 1 means that we observed the data point, and T, = 21:15” Of course, the FE-ZSLS estimator is a nonlinear function of sample averages. This is important because zero correlation assumptions are now difficult to work with. So, if the selection indicator, v,,(0) is a 26 function of observables q ,, — observable at least when the other variables are — then the simplest statement of H0 is E(uitlzila--”2179411a---1‘11'T1Sila---aSiT) '=' E(u11|21,qi,51) = 0, (6-1) where s, is the T -vector of selection indicators. In other words, like the instruments and misspecification indicators, selection must be strictly exogenous under Ho. Assumption (6.1) essentially rules out correlation between the idiosyncratic errors and selection in every time period. But 3,, may be a function of 2,, q,, and the unobserved effect, c,. In cases where data are missing in some time periods in an essentially random way — even if the rate of missingness is higher for some units — then the tests in the previous sections apply directly to the unbalanced panel. 7. Application Estimating the causal relationship between spending and student performance is complicated by unobserved factors. Generally, a model for student performance would include family demographic and economic variables such as income, size, and attitudes towards schooling. While, it is often the case that such family attributes are unobservable they are likely to be correlated with district level spending. For example, prior to the passing of Proposal A in 1994 increases in spending were obtained by the passage of local millages. Since communities with higher incomes and perhaps higher values on education were more likely to pass such millage, changes in spending were likely to be correlated with family demographic and economic variables. In addition, it is plausible to think that the district has its own attributes affecting 27 students’ performance. For example, districts may sytmatically differ in how they allocate funds. If a district allocates more to schools that are not preforrning as well we would expect the effect of spending to vary across districts. Thus, it is plausible that unobserved heterogeneity exists across districts as well as unobserved family demographic and economic variables. Since both are thought to be correlated with spending ignoring them leads to inconsistent estimation of spending. However, if the unobserved district effect is constant across time, estimation by fixed effects eliminates the district effect. This leaves us with the issue of omitting family demographic and economic variables which can cause spending to be correlated with the idiosycratic errors, as pointed out by Papke (2005, 2007). Papke (2007), examines the effect of spending on the pass rates of the fourth-grade MEAP math test using district-level data from 1992 through 2004. Noting the likely endogeneity of spending, Papke uses the dramatic changes in funding of Michigan public schools brought about with the passage of Proposal A in 1994. Proposal A imposed spending floors and phased in spending ceilings. Prior to Proposal A, a large fraction of per pupil spending was determined by the school district through local property taxes. Proposal A revoked the districts’ ability to increase the millage rate and replaced it with a grant system financed through the state School Aid Fund. For our purposes, the significance of Proposal A is that it provides an instrument for spending. Specifically, the level of the foundation grant is a suitable IV candidate provided fixed effects are allowed in the pass rate equation. Papke (2007) uses the foundation grant as an instrument for spending. In an earlier analysis using school 28 level data Papke (2005) finds evidence of edogenous spending by comparing OLS and IV estimates using the standard Hausman test. There are probably two reasons for her findings. First, the presence of unobserved school effect which is likely to be correlated with spending. Second, the inability to control for family demographic and economic variables as well as parental influence may lead to omitted variable bias. That is, without controlling for the fixed effect, it is hard to tell where the endogeneity comes from. Papke notes the likelihood of unobserved heterogeneity across schools and applies both fixed effects and fixed effects ZSLS in estimating the effect of spending. She finds substantially larger spending effects for the FE-2SLS estimates, but does not formally obtain a Hausman test after controlling for the unobserved heterogeneity. Using Papke’s (2007) district level data, I reconstruct her estimation of the spending-perfonnance model and test for the endogeneity of spending and non-linearities using the fiilly robust test derived in section 4. Following the example in (5.1), the pass-rate equation is partitioned as M = xiz1fi1 + 16112132 + 01+ “it, (7-1) where y,, is the percentage of students, within the district, who pass the fourth-grade MEAP math test. The observed time varying explanatory variables are partioned in that x,,1 ,the variable being tested for endogeneity, is average real spending in the current and previous three school years. Using a four year average allows spending in the first, second, third, and fourth grade to affect performance on the standardized tests given in the fourth grade. In addition, she uses the log of average real spending noting that for a given increase in spending the affect on 29 performance may vary depending on the level of spending. That is, using the log of spending states that the percentage change is constant as compared to the nominal change in spending having a constant effect on pass rates. The strictly exogenous explanatory variables, x,,2, include, the log of enrollment (lenrol) and the percentage of students eligible for the federally subsidized school lunch program (lunch) were both appear in quadratic form allowing for diminishing or increasing effects. The unobserved district effect, c,, is allowed to be arbitrarily related to both x,“ and x,,2. The instrument,(lf0und), for spending is the log of the district foundation grant beginning in the 1994/1995 school year. Table 1 contains fixed effects and fixed effects-instrumental variables estimates of equation (7.1). The fixed effects-instrumental variables estimate for the log of average real spending is 11.99 points higher than the fixed effects estimate. That is, for a 10% increase in average spending the FE-IV estimate results in a 1.2% higher pass rate than the FE estimate. However, Papke (2007) argues that allowing for heterogeneity across districts may not be enough, it may be that the effect of spending varies with performance. For example, a district that has low pass rates prior to Proposal A may benefit more from an increase in spending than districts that were already experiencing high pass rates. Thus, she separates the regression analysis into districts of high verses low performance by using the average pass rate for the first three years of the sample. This partitioning of the data allows the effect of spending to vary with high or low initial performance. The estimates for lunch and enrollment are parcitcally insignificant and only lunch is significant at the 10% level. However, that does not mean that we haven’t missed important non-linearities. For 30 example, it could be that the affect of enrollment depends on spending. Table 1 Estimates of the Percentage of Students with a Satisfactory Score on the 4’” Grade Math Test (math4) fl 1 LExplanatory Variables (1) FE (2) FE-IV l 'log(average real spending) “24.73 36.77 : (3.20) ,(5.44) . l llunch ,-.066 l-.073 l _ 1 (.037) (.038) “l : log(enrollment) l —3.37 —.934 I t 2 1 (1.97) (2.16) 1 year dummies? E yes yes j [Within R2 __ V_ _ .394 1.392 , _ , (observations 15’000 [5,000 l I test for endogenous spending using the procedure outlined in section 5.1. The first step is to obtain the residuals, 12,,. That is, I estimate equation (7.1) under the null hypothesis saving the residuals as uhat. Recall that under the null hypothesis spending is strictly exogenous. Thus, the estimation method is standard fixed effects. Next, I obtain the residuals, 12,,, from the FE regression, log(avg. real spending) on log(grant), lunch, log(enroll), and year dummies (7.2) To obtain 2,, I need to partial the explanatory variables out of 12,,. That is, I regress, 9,, on lunch, log(enroll), log(average real spending), and year dummies (7.3) and save the residuals as f,,. Lastly, to compute the fully robust test statistic 1 regress, 12,, on 1",, (7.4) using a fully robust variance matrix estimator. The robust t-statistic for 1",, is -l .84. Thus, at the 10% level we reject the null hypothesis that spending is exogenous. However, the p-value is .066, so the evidence that spending is endogenous is 31 minimal. The non-robust version of the test is N(T— 1)R2 from the regression in (7.4). There are 500 school districts each with 10 years of observations and the R2 =. 0017. Thus, the non-robust test statistic is 7.65. Thus, we reject the null hypothesis that spending is exogenous at the 1% level. However, we must maintain assumptions B.3 and B4 to justify the non-robust version. Next, I test for nonlinearities. Given that we have evidence supporting the endogeneity of spending, the first step is to ontain the residuals, 12,,, from estimating equation (7.1) by FE-IV. Secondly, we need to estimate the reduced form of spending. That is, obtain the fitted values, say spendinghat, from the pooled-OLS regression of dlog(avg. real spending) on dlog(grant), dlunch, dlog(enroll), and year dummies, (7.5) where the d before each variable indicates that it has been demeaned. Next, we need to obtain the misspecification indicators. Using demeaned variables obtain the fitted values, yhat, from the pooled-OLS regression of dmath4 on spendinghat, dlunch, dlenroll, and year dummies. (7.6) A . A The misspecification indicators are the squares and cubes of dmath4. To obta1n r,, we regress each misspecification indicator, 1751211742 and W3, on spendinghat, dlunch, dlog(enroll) and year dummies, saving the residuals, f,” and Pm. Lastly, we regress 12,, on f,” and 1“,,2 using the robust cluster command and test for their joint significance. The resulting Wald statistic is 7.54 which is significant at the 5% level. However, the test does not indicated what non-linearity is missed. In our model, we could try adding interactions between spending and enrollment and the same for 32 lunch. 8. Conclusion I have derived robust regression-based tests after estimation by fixed effects two-stage least squares. The tests offer simple methods to detect endogenous explanatory variables, over-identifying restrictions, and functional form misspecification. An important contribution is that the tests are easily adjusted to account for arbitrary forms of heteroskedasticity and within cluster serial correlation. 1 apply the test for endogenous explanatory variables to a panel data model explaining fourth grade pass rates on Michigan Education Assessment Program math test in terms of spending, poverty rates, and enrollment. Using data fi'om Michigan public school districts from 1992 through 2004, I test the null hypothesis that upon eliminating the unobserved heterogeneity of the school district, spending is exogenous. Applying both the fiilly robust and non-robust versions, I find mixed statistical evidence that spending is endogenous. The robust version of the test provides evidence that spending is endogenous at the 10% level but not at the 5% level. However, the non-robust version is significant at all levels. This illustrates the need for developing tests for heteroskedasticity and serial correlation in the context of FEZSLS. I have not analyzed the small-sample performance of the tests, as estimation by FE ZSLS is not suited for data sets with a small number of cross-sectional units. Generally, instrumental variable methods do not perform well in small samples. However, a case worth examining would be panel data models that have a growing 33 time dimension and a small fixed cross-sectional size. In such circumstances the test statistic and assumptions can be adjusted accordingly. For example, one would need to make assumptions regarding the dependency of the data, as the asymptotic analysis would focus on the behavior of the test statistic as the time dimension grows infinitely. The more complex, yet interesting, case would be allowing for grth in both the time-dimension and the cross-section. Under such circumstances assumptions need to be made regarding the relative rates of growth. Furthermore, the tests derived in this chapter focus on the relationship between the idiosycratic error and the time-varying explanatory variables. It would be of interest to derive a robust regression- based test about the presence or form of the unobserved heterogeneity when the observed explanatory variables are endogenous for other reasons. 34 Testing for Correlated Random Effects in Panel Data Models Estimated using Instrumental Variables 1. Introduction In the previous chapter, 1 derived tests concerning the idiosyncratic errors in linear panel data models containing possibly endogenous explanatory variables. In the context of fixed effects estimation, 1 showed how to obtain computationally simple, fully robust tests to detect endogeneity of explanatory variables. I also showed how to test overidentification restrictions in the context of fixed effects instrumental variables (FE-1V) estimation. The fixed effects estimator and its instrumental variables analogue have proven to be very useful in empirical work, and the tests in the previous chapter should add to the empirical researcher’s tool kit. But the FE-IV estimators can have large sampling variances, making inference difficult or at least imprecise. In the context of the linear model with an additive, time-constant effect, it is very common to compute a Hausman (1978) statistic that compares the FE and RE estimates — at least for the coefficients on variables that change in the cross section as well as across time. Sometimes, the additional assumption under which RE is consistent - essentially, that the heterogeneity is not correlated with the covariates — is not rejected, and then one prefers the more precise RE estimates. See Wooldridge (2002, Chapter 10) for recent discussion and for obtaining simple regression-based, fully robust tests. 35 Of course, it is possible to formally test for differences between random effects instrumental variables (RE-IV) and FE-IV, and that is the subject of this chapter. I propose simple variable-addition tests that are easily made robust using standard software packages. In addition to treating the standard case of a single, additive, time-constant effect, I also cover the so-called “random growth” model, which allows for unit-specific linear trends as well as level effects. My approach is related to, but distinct from, existing work in the literature. Hausman and Taylor (1981) derive estimation and testing methods in the context of linear panel data models containing correlated unobserved effects — that is, where the unobserved effects are correlated with some of the explanatory variables. In their setup, they maintain that all explanatory variables are uncorrelated with idiosyncratic errors, but allow some explanatory variables to be correlated with the heterogeneity. Hausman and Taylor’s main focus is on estimating the parameters associated with time-invariant explanatory variables (which rules out the use of the usual FE estimator). Hausman and Taylor impose exogeneity assumptions on some of the time varying explanatory variables in developing an estimation procedure using instruments to estimate the parameters of the observed time-invariant variables. The instruments are the within transformations of the time-varying explanatory variables that are assumed to have no relationship with the unobserved component. Therefore, Hausman and Taylor do not rely on instruments from outside the model as they assume the time varying explanatory variables are strictly exogenous. In addition, they extend the work of Hausman in the context of testing for correlation between the unobserved component and the included explanatory variables. However, they too 36 assume conditions simplifying the variance-covariance matrix. Comwell, Schmidt, and Sickles (1990) propose an efficient instrumental variables method similar to Hausman and Taylor (1981) for estimating coefficients that vary over cross-sectional units as well as the intercept. Similar to Hausman and Taylor, estimation does not rely on instruments from outside the model as they assume that some of the time varying explanatory variables are uncorrelated with the unobserved heterogeneity. Therefore, there must be enough variables that are uncorrelated with the unobserved heterogeneity for the model to be identified. Probably the closest paper to the current work is Arellano (1993), who develops a test for correlated effects by decomposing the T time periods into two sets of estimating equations. The first T — 1 equations comprise the equations that lead to the usual fixed effects (or within-groups) estimator. The last equation leads to the between-groups estimator. From these equations, Arellano (1993) shows how the usual Hausman test comparing RE and FE can be obtained under the full set of random effects assumptions (which include homoskedasticity and serial independence of the errors). More importantly, Arellano shows how his approach leads readily to a fully robust test. . Arellano (1993) also shows how to extend the test to dynamic models. He covers the case where the instrumental variables are the strictly exogenous variables from all time periods. Here I am interested in general cases where a set of strictly exogenous instruments is available — so, omitted variables or simultaneity can be treated. Nevertheless, Arellano’s approach expanded to my setting can be used to obtain a fully robust test in the context of RE-IV and F E-IV estimation. The drawback to 37 Arellano’s approach is computational. It requires forward filtering and then special software to compute a fully robust variance matrix. The test 1 derive here can be computed using standard software that computes RE-IV estimates and allows for fully robust inference. Plus, as I mentioned, I do not restrict attention to a model with a lagged dependent variable. Metcalf (1996) extends the procedures of Hausman and Taylor to models containing endogenous variables in addition to the correlated unobserved effects. The test statistic developed is then pertaining to possible correlation between the instruments and the unobserved component. The drawback is that, as with many of the existing tests, the test requires a full set of random effects assumptions, including serial independence of the idiosyncratic errors, and homoskedasticity of the variance of the unobserved effect and the idiosyncratic errors. Plus, Metcalf’s statistic is not readily computable after estimating models using standard sofiware. Ahn and Low (1996) further extend the testing literature regarding panel data models by reformulating the Hausman test in the context of GMM estimation. They note that the Hausman test statistic for testing correlation between the unobserved component and the regressors implies that the individual means or time averages of the regressors are exogenous. (This point was made in the pioneering work by Mundlak (1978) in the context of the standard linear panel data model). Ahn and Low’s alternative GMM statistic incorporates a much broader set of moment conditions that are valid if each of the time-varying explanatory variables is exogenous. The key feature of Ahn and Low’s alternative GMM test statistic is that, unlike the Hausman test, it has power in detecting nonstationary coefficients of the 38 regressors. Unlike many of the previous tests, the tests derived in this chapter do not rely on assumptions about the structure of the variance-covariance matrix of the composite error I derive a variable addition test for the key assumption of RE-IV estimation, namely, that the unobserved effect is uncorrelated with the instruments. In addition, I extend the usual model to allow for individual specific trends. The tests are easy to compute while allowing for arbitrary forms of heteroskedasticity and serial correlation under the null. In the next section, I develop the variable addition method for testing the random effects assumption pertaining to the unobserved component. In Section 3, I extend to test to account for possible trending of the unobserved component. Section 4 discusses the ramifications of applying the tests to unbalanced panels. In Section 5, I apply the tests to a panel data model that explains test pass rates in terms of spending, poverty rates, and enrollment. 1 test for correlated unobserved district effects and for possible trending of the unobserved district effect. The data set, used by Papke (2007), comes fiom Michigan schools from 1992 through 2004. Section 6 contains a brief conclusion. 2. The Standard Model and Assumptions Consider the standard panel data model containing unobserved heterogeneity in the cross-section yit=xitp+ci+uits I: 19"‘9T9 (21) where 1' denotes a random draw from the cross section. The dependent variable is y,, 39 and x,, is the 1 x K vector of observed explanatory variables, some of which are thought to be correlated with the idiosyncratic errors u,,, or even u,, for r :1: t. In many applications, some elements of x,, are strictly exogenous in the sense that they are uncorrelated with the idiosyncratic errors in all time periods. We also allow x,, to be arbitrarily correlated with unobserved heterogeneity, c,. If we allow some elements of x,, to be correlated with the idiosyncratic errors then we need some extra information to estimate ,6. I assume we have a set of instrumental variables 2,,, a 1 x L vector with L 2 K. Typically, 2,, and x,, would overlap - for example, each would include a full set of time dummies to allow unrestricted secular effects. The set of data observed for each cross-sectional unit 1' is {(x,,,y,,,z,,) : t = 1,. .., T}. I assume random sampling in the cross-section dimension with a sample of size N. The time series dimension, T, is fixed in the asymptotic arguments. The assumption I maintain in the instruments is that they are strictly exogenous in the sense that E(z;,u,,) = 0, t,r = 1,...,T. (2.2) Assumption (2.2) allows arbitrary correlation between 2,, and 0,. But the instruments may not be correlated with the idiosyncratic errors at any time period. For example, changes in 11,, cannot cause changes in future values of the instruments. In this chapter, [propose robust, computationally simple tests for whether the instruments are correlated with unobserved heterogeneity. In addition to (2.2), the key assumption, imposed by a random effects using instrumental variables (RE-IV) approach is 40 5(01121) = 13(61), (23) so that the heterogeneity is mean independent of 2,. (Actually, for consistency, we can relax (2.3) to zero correlation, but (2.3) is useful for stating alternative assumptions and for obtaining simple inference under a full set of random effects assumptions.) If Assumption (2.3) holds along with (2.2) and a standard rank condition, then the RE-IV estimator is consistent for 3. (Recall, if we apply RE, we can allow x,, and 2,, to contain elements that do not change over time.) If (2.3) is violated, but we have sufficient time-varying instruments for the time—varying elements of x,,, then we can estimate [3 (or at least the elements on the time-varying components of x,,) consistently using fixed effects instrumental variables (FE-IV). But, as is well known, the FE-IV estimator can have large sampling variance because we are removing time averages and also applying instrumental variables. If (2.3) holds, it can be much more efficient to use RE-IV. And, if we have an instrument that is essentially randomized, we can treat it as being orthogonal to the time-constant heterogeneity as well as the idiosyncratic errors. As I discussed in the introduction, one can directly compare the RE-IV and FE-IV estimates via a Hausman (1978), but computing a fully robust test that does not maintain serial uncorrelatedness and homoskedasticity of the idiosyncratic errors, along with homoskedasticity of Var(c,|z,), is cumbersome. Instead, I propose a variable addition test. To derive the test, it is easiest to think of an alternative to (2.3) as E(Ci|21) = E(Cil§i) = 50 + 31-5, (2-4) where 2, is the time average of 2,, : 41 T 2,- = T" 22,-, (2.5) t=1 In what follows, 2, would not include averages of time-period dummies or other aggregate time variables, but we use the same notation for simplicity. Assumptions such as (2.4) date back to Mundlak (1978) for the linear model with strictly exogenous explanatory variables and Chamberlain (1980) binary response models. Recently, Papke and Wooldridge (2007) use assumptions like (2.4) to estimate nonlinear models for fractional response with endogenous explanatory variables. Under (2.4) we can write 0, = £0 +2,J,‘ + a,, E(a,|z,) = 0. (2.6) Plugging (2.6) into (2.1) gives the augmented equation y,,=x,,fi+§0+2,§+a,+u,,, t=1,...,T. (2.7) Under the maintained assumptions, the composite error in (2.7), say v,, = a, + u,,, is uncorrelated with 2,, so, in particular, v,, is uncorrelated with (z,,,2,). Therefore, we can estimate (2.7) by instrumental variables using (in addition to a constant) (z,,,2,) as the IVs. Interestingly, it turns out that, whether we use pooled IV or RE—IV on (2.7), the estimator of ,0 is the FE-IV estimator. This is an important result as generally estimating (2.7) by RE-IV would be inconsistent without assuming (2.4). However, since it is the FE-IV estimator we do not need to maintain assumptions pertaining to the relationship between the unobserved heterogeneity and instruments. To verify that the RE-IV estimator of (2.7) is identical to the FE-IV estimator, we use the characterization of RE-IV as a pooled IV estimator on quasi-time-demeanded data. In fact, let 2 be any value in [0,1], and consider the equation 42 y,, — 7151,- = (x,, — 22,),8 +(1— 102,5 + v,, — 217,1: 1,...,T, (2.8) or 51,,=2,,fi+(1—2)2,§+i'1,,,t= 1,...,T, (2.9) where the intercept is suppressedjust for notational simplicity. (In fact, we can just include it in 2,.) When 2 = 0 we have the pooled-IV estimator and when 2 = 1 the FE-IV estimator. The instruments are then 51': = [(211 “ 450,512] (2-10) We can absorb (1 — 2) into C and since (z,,-22,) is a linear combination of 2, and 2,, we define the set of instrumental variables as (2,2,). The first stage regression of random effects two stage least squares, RE- ZSLS, regresses 2,, on 2,,, 2, obtaining the fitted values 2,. As a result of the orthogonality between 2,, and 2, it is algebraically equivalent to regress 2,, on 2,, and 2,, on 2, then combining linear projections gives the fitted values 2,. Regressing 2,, on 2,, gives @- (:11: This is equivalent to ‘1 N T 2,) (2221,11,) (2.11) 1—11=1 (zit) (fiiZMHQH—M 12) 1—11-1 (i iii-1311)-] (2N: 5321-1551) (2.12) M4 1M4 K II ~ i=1 (=1 i=1 [=1 43 Therefore regressing 2,, on 2,, is the same as regressing 2,, on 2 ,,. Regressing 2,, on 2, results in the following: N T -1 N T N -1 N T 22222,- zzzzseu =74 221,) 22:23,..-»2.) i=1 I: 1:] t=l i=l 1:] (=1 N *1 N =7“l 22:2, T(1-A)2(2§2,) l=l =1 N *1 N =(1-2) 22:2,- 2(2§5c,), (2.13) or, (1 — 1.) times the coefficient estimate from regressing 2, on 2,. Combining the two linear projections results in the fitted values 2, = 2,r‘1, + (1 - 2.)2,fi2 (2.14) The final step in two-stage random effects is to regress 52,, on 2, and 2,,. Recall that the estimated slope coefficient for explanatory variable a in multiple regression analysis is the same as the slope coefficient from simple regression analysis if we; first regress explanatory variable a on all of the others, then regress the dependant variable on the residuals fiom the first regression. Therefore, to show that adding the time averages of the instruments results in the fixed effects estimator for 2,, we split the regression into two parts. First regress 2,, on 2,, obtain the residuals 2,,, then regress 57,, on 2,,. The coefficient pertaining to 2,, is the same as the coefficient on 2,, in the regression of 5),, on 2, and 2,,. This shows that 5",, is equal to 2,, which is equal to 2,,fi 1. Secondly, I show that the quasi-demeaning of the dependent variable does not alter the coefficient estimate. a o _ A o c In} .. o _ c We can replace x,, With (1 — A)z,1'12 tn the regressmn of x,, on 2, smce z, 15 44 orthogonal to 2,,. Therefore the coefficient on 2, can be written as N -1 N (1 - l)< 2:5,) (2 21-2,)1'12 = (l - 101-12 i=1 1': ;it = §it- (l —/1)2,fiz Then, Substituting in 2,, = 2,,fI, + (1 — ”2,122 gives r: = 36:17- --(l 102771212 = 5i1fi1+(1- Diifiz - (1 - Miifiz = 3:11:11 = 12:7 Next I show that the quasi-demeaning does not alter the estimation. OCI~ x mm M2 Ms BRmSLS = (Z: Z x 11x") i-l (:1 N T A’A = (2255115511). - ll y—n u—n 'tO’it—Ayi) .5“: M2 Ma 51’ N 11 _ 'IT ~ ~ |l # N ll — 11 11 A A E. [V] 2 M 2 E M ~a M -1 3.22. 32>. .2 .. II; M 2 'M 2 TL M ~1 M ~a 3‘9. :1’ E} 3" 11 E i?) E a Extending Mundlak (1978), a test for correlated effects is a test of H0 : 4‘ = O in equation (2.7). In most applications, we would include year intercepts in (2.7), and these, of course, would not be included in 2,. We can estimate (2.7) by RE-IV using instruments (21:3,) as instruments or by pooled ZSLS using the same instruments. In the latter case, the test should definitely be made robust to heteroskedasticity and serial correlation. If we think the standard RE assumption E(v,v,|z,) = E(v,v,) = Q where Q has the standard random effects form, then the usual nonrobust test based on RE-IV works. But, we can also use a robust test in the context of RE-IV in order to 45 (2.15) (2.16) (2.17) allow arbitrary heteroskedasticity and serial correlation. 3. Trending Unobserved Heterogeneity In the previous section we examined the standard unobserved effects model where the unobserved effect has the same partial effect on y), in all time periods. This assumption is to strong for some applications. For example, F riedberg (1998) analyzes the affect of divorce laws on divorce rates using state-level panel data. When she omits a state-specific trend she finds no evidence that divorce laws affect divorce rates. However, when she includes a state-specific trend the estimated effect is large and statistically significant. Therefore, we extend the previous model to allow for individual-specific slopes or a random trend. Consider the following extension of equation (2.1): yi, =Ci+git+xitfi+uits t=1,2,...,T. (3.1) The difference between equation (2.1) and the above is that the individual-specific trend is an additional source of heterogeneity, as in Heckman and Hotz (1989). As before, we allow (c,-, g,) to be arbitrarily correlated with xi! and 2),. If we could maintain strict exogeneity of the observed explanatory variables we could estimate fl by first differencing equation (3.1) then estimating the differenced equation by fixed effects or differencing again and estimate the twice differenced equation by pooled OLS. Regardless of which method one chooses to use, there must be at least three time periods. Typically the method of choice is based on the serial correlation of the idiosycratic error. Recall that if a variable has an autocorrelation equal to one, that is, it follows a random walk, then differencing that variable results in the differenced 46 variable having an autocorrelation of zero. Therefore, if the idiosycratic error is believed to follow a random walk then the twice differencing approach leads to standard errors that are serially correlated. However, if it is not feasible to maintain strict exogeneity of the explanatory variables then one needs to estimate the differenced equation using fixed effects two stage least squares or difference again and estimate the twice differenced equation using pooled ZSLS. As you can imagine the twice differencing or differencing and quasi-demeaning, along with using instrumental variables, can result in large sampling variances, making inference difficult. Thus, if the FE-IV assumption that the unobserved heterogeneity is time constant holds, that is that E(g1|21) = E(g1) (3.2) then one prefers the more precise F E-IV estimates. Or, if an alternative version of the RE-IV assumption that E(Ci|Zi) = E(Ci) (3-3) and E(gi|Zi) = 5(81') (3-4) holds then one would prefer the more precise pooled-IV estimates. Therefore, we are interested in deriving a variable addition method to test whether such advanced estimation methods are warranted. As in the standard unobserved effects model, illustrated in the previous section, we assume that any correlation between the unobserved heterogeneity and the instruments arises through the mean and now trending behavior of our instruments. Thus, to derive the appropriate variable to add to equation (3.1) we need to model the trending behavior 47 of the instrumental variables. Let the following describe the nature of our instruments across-time: z;,=di+h,-t+v,-,, t= l,2,...,T. (3.5) This equation states that the behavior of the instruments across time is unique for each cross-sectional unit. While it may seem odd to think that both the structural model and instruments contain possible trending unobserved heterogeneity consider the following example. Papke (2007) estimates the effect of spending on student performance using data from Michigan public school districts where she uses the amount of the foundation grant as an instrument for spending, since the foundation grant varies by school district and across-time it is obvious that the trending behavior of the foundation grant is unique for each school district. The question is whether the unobserved district effect trends in the pass-rate equation. Secondly, to derive the appropriate test, consider the alternative to (3.2), (3.3), and (3.4) as E(Cilzi) = E(Cildiahi) = 710 + ”1611+ ”Zhi (3-6) and E(gilzi) = E(g1|di,hi) = 10 + lldi + A2hr (3-7) That is, we assume that the unobserved heterogeneity in equation (3.1) is related to our instruments through their trending unobserved heterogeneity in equation (3.5). Under equations (3.6) and (3.7) we can write 0,- = 71'0 + fl1di+ flzh; + a,, E(a,-|z,-) = 0 (3.8) and 48 g,- = 10 + 11d; + 11211; + bi, E(bilzi) = 0. (3.9) Substituting equations (3.8) and (3.9) into equation (3.1) gives, ya = Ito +7tldi+7t2hi+ lot+lldfl+lzhit+xitfl (3.]0) +a,-+b,-t+ui,,t= 1,...,T. In addition to a linear time trend, we have the levels of the heterogeneity in (3.5) and also interacted with a linear time trend. Under the strict exogeneity of 2),, and assumptions (3.8) and (3.9), estimation of (3.10) by pooled IV is consistent, as the composite error, vi, = a,- + b it + up, is uncorrelated with Zi- That is, inserting equations (3.8) and (3.9) into (3.1) controls for any correlation between the instruments and the unobserved heterogeneity. In addition, we can test for the significance of the trending unobserved heterogeneity in equation (3.1) by testing the null hypothesis that 7t1,7t2, A} and 12 are equal to zero. Using equation (3.10) to test for correlated effects is not directly applicable because we do not observe d,- and h ,-. Instead, we can use proxies for the unobserved heterogeneity obtained from unit-specific regressions. Remember, we are obtaining a test of the null hypothesis that there is no correlated heterogeneity between the heterogeneity in the structural model and the instruments. It is natural to regress each instrument on a constant and linear time trend, separately for each cross section unit, 1'. This gives us, for each i, a I x 2L vector (8,5,) (where, of course, we leave out time period dummies). In effect, we are looking for correlation between (c,-,g,-) and (at, 51)- Obtaining the (21,-, 5,) can be obtained unit-by-unit. If N is not too large, the 49 pooled regression zi,0ndl,-,a2;,...,dNi,d1; °t,...,dN,' 0t, i = 1,...,N; I = 1,...,T (3.11) can be used to obtain the intercept and slope for each 1'. However we obtain the individual-specific slopes and trends, we estimate the equation y,, = 7:0 + 1:121,- + 7121;, + 101+ 11,21,” Azfiit+xitl3+ e,,, t = 1,...,T (3.12) by some instrumental variables method, where the instruments are (1,3),5 ,-,t, flit, 5,1,2”). The test for no correlated heterogeneity is thejoint test that 7:1,7r2, A] and AZ are all zero, which is a test of 4L restrictions. In practice, we may want to be selective about the elements of 2;, we include in equation (3.5). A more efficient test is to use a generalized method of moments procedure with an unrestricted weighting matrix. Alternatively, if under the null we maintain that {an : t = 1, . . . , T} is serially independent and homoskedasticity, conditional on 2;, then a random effects ZSLS estimator can be used. It is not the standard estimator because of the presence of b it in the error term. This would be the efficient IV estimator if the typical random effects assumptions hold, but we can also guard against violation of these assumptions by making inference robust. It is important to understand that in (3.12) there is not incidental parameters problem from “estimating” the intercept and trend terms, :1,- and Iii. First, they are not parameters they are heterogeneity. Second, for each 1' these are simply fimctions of {2), : t = 1,. . . , T}, and so the test from (3.12) is looking for whether these functions of 2,- appear to be correlated with the heterogeneity in the error term. In fact, we couldjust have stated the alternative as E(c,-|z,-) = Ito + 7:121,- + £25; (3.13) 50 and E(g,-|z,-) = 2.0 + 21121,- + 2211‘). (3.14) It is interesting to note that, if (3.13) and (3.14) are true — so that the unit-specific intercepts and slopes act as sufficient statistics for the relationship between (ci,g;) and z,- — then IV estimators using (3.12) are actually consistent (with T fixed, N -» 00) even when the null is false. In fact, we can replace the conditional expectations with linear projections, but we are still assuming a specific relationship between (c;,g,-) and 2;. IV methods that eliminate (ci,g,-) from (3.1) require no such assumptions. It may be that we strongly suspect that there is unobserved heterogeneity in the cross-section that is correlated with the instrumental variables, and we want to allow that while testing whether the individual-specific trend is correlated with the IVs. It is very common to estimate models using fixed effects IV methods without checking for individual-specific trends. If we want to test the null hypothesis (3.2) without restricting E(c,-|z,-), then it is natural to specify the testing equation )2), = 50 + z"): + 101+ 2121;” Azfiit+xnfi + e", t=1,2,...,T, (3.15) where 2,- = T‘1 2:12;, is the time average. We can estimate this equation by pooled ZSLS, using instruments (1,2),1, 21,1, 5,1,2”) or, even better, random effects IV, as the RE-IV estimator has a chance of being efficient under the null hypothesis. In particular, if E(v,-v:-|z,-) == E(v,-v:-) = og-jyj'T+ 031;, where jT is the T x 1 vector of ones and v,- is the vector of composite errors c,- + u,-,, then the RE-IV estimator is the asymptotically efficient IV estimator under H0. Actually, in most cases it is preferable to include a full set of year dummies in xi, and then drop the overall linear time trend, lot. Either way, we test for joint significance of (1] , 22). 51 An alternative to RE-IV estimation with 2,- included as regressors is to estimate )2), = m+111£15t+ Azfiit+x,-,[3+c,-+ 11,-, (3.16) by FE-IV, where the instruments are the time dummies, flit, ligt, and 2;, Once £1,- and Iii have been obtained, the test is easy to cm out. The approach is preferred because it does not impose restrictions on the relationship between c,- and 2;. If we fail to reject the null hypothesis that the unobserved heterogeneity in the cross-section is time-invariant, we would want to estimate [3 by the more efficient FE-IV. However, if we reject the null hypothesis we must estimate equation (3.1) by either twice differencing equation (3.1) then estimating the twice differenced equation by pooled-IV or first difference equation (3.1) then estimate the differenced equation by FE-IV. 4. Extension to Unbalanced Panels As is well known, applying standard panel data methods to unbalanced panels may result in inconsistent estimators if the sample selection mechanism is not appropriately “exogenous.” As discussed by Wooldridge (2002, Chapter 17), fixed effects methods are more robust in the presence of missing time periods because selection is allowed to be arbitrarily correlated with the unobserved heterogeneity. This holds true in the model (3.1) estimated by IV methods that eliminate (ci, gi). So, we might first difference and the use fixed effects, or sweep away the individual-specific trends in the instruments before applying IV. Using the same arguments in Wooldridge, it is easy to show that a sufficient condition for consistency on the unbalanced panels is 52 E(u,,|z,,s,1,...,s,T,) = 0, I: 1,...,T, (4.1) where 3,, is the selection indicator for unit 1' in time t: s,, = 1 if we observe the data, and zero otherwise. Extending the test in Section 3 to the case of unbalanced panels is, in principle, straightforward. Let T, be the number of time periods observed for unit 1'. Then, for all units with T, 2 3, we can obtain 21,- and H, as before, and use these in either equation (3.12) or (3.16). (Equation (3.15) is not as attractive because in the unbalanced case, putting 2, in as regressors is no longer completely general.) However, we must be cautious in interpreting a rejection, because (£1,,li,) are functions of (s,, , . . . ,s,7~). One way to see this is that (2155,) are from the OLS regression s,,z,, on s,,,s,, - t,t = 1,...,T. (4.2) Therefore, if we find that (3,,fi,) are statistically significant, it could be because (d,,h,) is correlated with the trend, g,, but it could also just be that g, is correlated with selection. Fortunately, the next step would be clear in either case: we would estimate (3.1) by IV methods that eliminate c, and g,, which would allow selection to be correlated with g,- and the instruments to be correlated with g,. 5. Empirical Example In chapter one, I extended the analysis of Papke (2007) by testing for endogenous spending in the pass rate equation after controlling for the unobserved district effect. Using the level of the foundation grant as an instrument for spending 1 found mixed evidence about the exogeneity of spending. 53 In this chapter, I examine the spending-performance model further by applying the tests for an unobserved district effect and for possible trending of the district effect. In section two, I showed that adding the time averages of the instruments to the pass rate equation then estimating the augmented equation by RE-IV results in the FE-IV estimator for ,8 while supplying a test for the random effects assumption regarding the unobserved heterogeneity stated in (2.3). In the table below, I provide the estimation results for FE-IV, RE-IV, and RE-IV with the time averages of the instruments. Because this is a balanced panel, we do not have to worry about sample selection issues. Table 1 Fixed Effects IV, Random Effects IV, and Random Effects IV including time averages of the instruments: Dependent Variable is Percentage of Students with a Satisfactory Score on 4* Grade __ ___ -_ ,. _ 1 _ Matthest 1 Variable _ _ 1 FE-IV RE-IV 1 RE-IV with 2,- 1 1 log(average real spending) 1 36. 77 21.38 F 36. 77 1 ; (5.44) (2.77) (5.44) 1 lunch -. 073 —.352 —. 073 l L (.038) (02) (.038) 1 7 1 log(enrollment) ; —. 934 -. 809 —. 934 1 1 - (2.17) (.401) (2.17) 1 j average lunch ‘ ! -—.433 1 ,2 +7 _ , __# 13-046) fl 1 average log(enrollment) .015 . . (2.25) "k A1 1 average log(real foundation grant) 1 —28.42 1 _ _ (6.59) . #7”; 1numberofdistricts _ :500 1500 500 __ ‘ 1R2 1 .392 1 .385 .392 1 Note: All specifications include a full set of year dummy variables. - Consistent with the derivation in Section 2, the RE-IV with the time averages of the instruments yields the exact same estimates as FE-IV. However, there is a rather large difference between them and the RE-IV estimates. Loosely this is an indicator 54 of correlated unobserved effects. Testing the joint significance of the three time average variables gives a Wald statistic equal to 104.72 which is clearly significant at all levels. Since the data spans 10 years it is possible that the district effect follows a linear trend. As 1 suggested earlier, this could easily happen if school districts adjust how they allocate funds across schools in the district. For example, Papke (2007) breaks the analysis up into districts that have initial low pass rates and districts that have moderate or high pass rates prior to Proposal A. This results in spending having a much higher effect on pass rates for the districts with initially low pass rates than their counterparts. Following the same thought, if some schools within a given district have much lower pass rates allocating more fimds to those than to schools with higher pass rates is likely to increase the district’s overall pass rate. As districts learn the most beneficial way of allocating funds we would expect the district effect to increase. Therefore, 1 apply the test for trending unobserved district effects by estimating equation (3.16) and testing the joint significance of flit and liit. After estimating (3.16) by FE-IV, the Wald statistic for the joint significance of cilit and Iiit is 1.56 with a p-value of .45. That is, we fail to reject the null hypothesis that the unobserved heterogeneity is time—invariant. 6. Conclusion This chapter has developed variable addition tests for correlated unobserved heterogeneity in panel data models containing endogenous variables. The tests can be computed through a series of regressions and are robust to arbitrary forms of 55 heteroskedasticity as well as within cluster serial correlation by simply computing robust standard errors when estimating the augmented equation. The benefit of the variable addition method is that it not only allows for computational ease but allows the structure of the tests to adjust to fit various hypotheses. For example, we can tests the random-effects assumption that the conditional expectation of the unobserved heterogeneity does not depend on the instruments or test the fixed-effects assumption that the unobserved heterogeneity is time-invariant. I have not analyzed the finite sample properties. However, panel data and instrumental variables methods are perhaps not well-suited for data sets that have a small number of cross-sectional units. The test developed in this chapter does not readily extend to panel data models with a small cross-sectional dimension and large time-dimension. However, as panel data continues to grow and statistical software becomes more and more sophisticated, the need for tests valid under large N and T become obvious. I apply the variable addition test for correlated unobserved effects in analyzing the effect of spending on student performance. The study uses data on the pass rates for fourth-grade MEAP math tests from 1992 through 2004 at Michigan Public school districts. 1 recreate the results of Papke (2007) and apply the test for an unobserved district effect. Adding the time averages of the instruments to the RE-IV equation I find evidence supporting an unobserved district effect. I expand this to test for possible trending of the unobserved district effect. 56 Testing the Conditional and Unconditional Variance Matrix in Panel Data Models Estimated by Fixed Effects ZSLS 1. Introduction In the previous chapters, I derived tests concerning the idiosyncratic errors and unobserved heterogeneity in linear panel data models containing possibly endogenous explanatory variables. In the first chapter, I developed a robust regression based test for endogenous explanatory variables in the context of fixed effects estimation. In addition, I show how to test for overidentification and non-linearities in models estimated by fixed effects instrumental variables (FE-IV). In the second chapter, I provide simple variable-addition tests regarding the unobserved heterogeneity in the context of panel data models estimated by instrumental variables. The variable addition method allows for test statistics that are easily made robust to arbitrary forms of heteroskedasticity and serial correlation using standard software packages. In addition to covering the standard case of a single, additive, time-constant effect, I show how to test for correlated effects that follow a linear trend. While it is well known that the presence of heteroskedasticity or serial correlation in an otherwise properly specified model does not affect the consistency of the estimator. It does lead to inefficient parameter estimates and inconsistent estimation of the variance-covariance matrix. Where inconsistent estimation of the variance-covariance matrix leads to invalid test statistics. As a result, the most convincing studies report robust standard errors. While this is primarily due to advances in software packages as virtually all packages compute robust standard 57 errors with a simple command. Despite the ease in computing robust standard errors researchers are still interested in testing for serial correlation and heteroskedasticity as if either are detected more efficient estimation methods such as GMM, or GLS are available. Wooldridge (2002, Section 10.5) proposes a simple regression based tests for serial correlation in panel data models with strictly exogenous regressors. The popular statistical software, Stata, implements Wooldridges’ test for autoregressive or moving-average behavior of the idiosyncratic errors in models estimated by random effects or fixed effects. The test is very attractive because of its’ robustness and computational ease. Drukker (2003) presents simulation evidence that Wooldridges’ test has good size and power properties in balanced and unbalanced panel data models, with or without conditional heteroskedasticity, in reasonably sized samples. Wooldridge notes that testing for serial correlation is more complicated in the fixed effects setting, in that, under the null hypothesis of no serial correlation in the idiosycratic error the time-demeaned errors are serially correlated. This complicates the analysis since we can only estimate the time-demeaned errors. In general the correlation induced by the time-demeaning is —l/(T- 1). Therefore, at a minimum we need to make the test for serial correlation robust to serial correlation. In addition, while in the case of strictly exogenous regressors one can ignore the estimation error in ,6 when obtaining the asymptotic distribution of the test statistic, that is not so in the absence of strictly exogenous regressors. Thus, while fixed effects-instrumental variables (FE-IV) methods are becoming more common it is not surprising that there are no readily available tests for serial correlation. 58 Breusch and Pagan (1979) and White (1980) propose regression-based tests for heteroskedasticity that can be applied in both time-series and cross-sectional studies. However, both impose auxiliary assumptions regarding the fourth moment for the tests to be valid. Wooldridge (l 990) derives a partially out method resulting in regression-based tests without maintaining auxiliary assumptions under the null hypothesis. In particular, Wooldridge shows that de—meaning all functions of the explanatory variables used in the test results in a test for heteroskedasticity that is robust to heterokurtosis. While the method used in this chapter follows most closely that of Breusch and Pagan (1979), the within transformation of fixed effects results in a regression-based test that is robust to heterokurtosis. In the standard fixed effects model with strictly exogenous regressors the Breusch-Pagan (1979) test for heteroskedasticity can be used with a degrees of freedom adjustment to account for the time-demeaning. However, as noted in the previous paragraph, it is typically the case that one cannot ignore the estimation error in ,6 when obtaining the asymptotic distribution of the test statistic. Generally accounting for the first-stage estimation results in test statistics that are not computationally simple. Conveniently, in this chapter I show that the Breusch-Pagan test for heteroskedasticity can be extended to panel data models estimated by FE-IV. The remainder of this chapter is organized as follows. Section 2 contains a review of existing tests for heteroskedasticity and serial correlation. Section 3 provides the basic FE-ZSLS model and assumptions. In section 4, I develop a robust regression-based test for heteroskedasticity after estimation by FB-ZSLS. In section 5, I obtain a test for serial correlation. In Section, 6 I apply the test for 59 heteroskedasticity to a panel data model that explains test pass rates in terms of spending,poverty rates, and enrollment. The data set, use by Papke (2007), comes from Michigan school districts from 1992 through 2004. Section 7 contains a brief conclusion. Throughout the chapter I assume random sampling in the cross-section with a fixed time dimension and growing cross-sectional dimension. That is, the asymptotics is standard random sampling asymptotics. 2. Background Testing for heteroskedasticity and serial correlation is well established in the pure cross-sectional and time series contexts. Of course serial correlation is not considered in pure cross-sectional analysis, as there is no time dimension. Breush and Pagan (l 979) and White (I 980) have the seminal papers on regression based tests for heteroskedasticity. While the tests they derive can easily be extended to panel data models with strictly exogenous explanatory variables there is no clear extension to models containing endogenous variables. However, when extending such tests to panel data models estimated by fixed effects we must make sure the tests are robust to serial correlation. This changes the standard form of the tests as neither address robustness to serial correlation since the tests were derived for cross-sectional models. In addition, they both impose homokurtosis under the null hypothesis. Conveniently, Wooldridge (l 990) shows that partialling out the averages of the variance misspecification indicators leads to a version of the Breush and Pagan test that is robust to heterokurtosis. This implies that we do not have to address issues of heterokurtosis when deriving a test for heteroskedasticity due to the 60 time-demeaning. While the literature on testing for serial correlation is vast, most of the existing tests today stem from Durbin and Watson’s (1951) famous d-test. Durbin (l 970) extended the seminal work of Durbin and Watson with the more exact h-test and the regression based m-test. A drawback to the d,h, and m tests are that they use first-stage residuals in computing the test statistic. This of course is not an issue when the regressors are exogenous. However, in models containing endogenous explanatory variables typically, the asymptotic distribution of the test statistic will depend on the first-stage estimation error. Generally accounting for the first-stage estimation error is not the problem but rather, developing a test statistic that is easy to compute is the issue. Godfrey (1976) developed an instrumental variables analog to Durbin’s h-test by replacing the log-likelihood function of Durbin’s general theorem with the autoregressive IV criterion function. Durbin’s variable addition m-test was extended to models estimated by instrumental variables in the unpublished work of Breush (I 978). Breush’s procedure replaces the OLS residuals with their IV counterparts, resulting in a regression based test for serial correlation in time series models containing endogenous variables. Godfrey (I 994) extends on Breush’s procedure by redefining the set of instruments used in estimating the augmented equation to increase the precision of the test. However, such methods do not extend to panel data models with endogenous variables as the form of exogeneity is more restrictive. In addition, testing for serial correlation in the fixed effects setting is complicated in that the within transformation induces serial correlation when the idiosycratic errors 6] are uncorrelated. Wooldridge (2002 chapter 10) extends Durbin’s m-test to panel data models estimated by fixed effects. Wooldridges’ test can be used to test for both autoregressive or moving-average idiosyncratic errors and is robust to conditional heteroskedasticity. Another benefit of the Wooldridge test is that it is very easy to implement, Stata currently implements the test with a simple command. Bhargava, F ranzini, and Narendranathan (l 982) extend Durbin and Watson’s d-test, and the Berenblut-Webb (1973) test for the null hypothesis that the idiosyncratic errors follow a random walk, to panel data models estimated by fixed effects. Arellano (I990) develops a test for serial correlation in panel data models containing lags of the dependant variable and unobserved heterogeneity. Arellano derives the limiting distribution of the covariance matrix under non-normality and presents a Wald test for testing covariance restrictions after estimation by three-stage least squares (3 SLS). However, Arellano derives the limiting distribution assuming the unobserved heterogeneity is uncorrelated with the instrumental variables thereby avoiding complications resulting from the within transformation. Inoue and Solon (2005) propose a portmanteau test for serial correlation in panel data models estimated by fixed effects using the conditional likelihood function. In comparison to the Wooldridge test, the test proposed by Inoue and Solon is harder to compute. They do suggest that the test can be used in models estimated by FE-IV. However, it turns out that the lack of strictly exogenous regressors affects the asymptotic distribution of the test statistic. Okui (2007) applies double asymptotics and a kernel estimator to extend the test for serial correlation developed by Ljung and Box (1978) to panel data 62 models estimated by fixed effects. Okui notes that the biasness that results from using the time-demeaned errors arises from the inability to estimate the long-run variance. 3. General FE-IV Model Consider the standard unobserved effects panel data model yi,=x;,,6+ci+u;,, t= l,2,...,T, (3.1) where i denotes a random draw from the cross section. The vector x,, is 1 x K of explanatory variables, c; is the time-constant unobserved effect, and “it is the idiosyncratic error. To allow estimation by instrumental variables, let 2;, be a l x L vector of instruments, where L 2 K. Thus, the set of observations for unit 1' is {(xi,,y,-,,z,-,) : t = 1,..., T}. I assume random sampling in the cross-section dimension with a sample of size N. The time series dimension, T, is fixed in the asymptotic arguments. Typically, 2i, and x it would overlap — for example, each would include a full set of time dummies to allow unrestricted secular effects. In this chapter, I make no assumption regarding possible correlation between x;, and c,. I also allow the instruments to be arbitrarily correlated with ci. Therefore, to consistently estimate ,6, the unobserved effect is removed via the within transformation. For each (i, t), let jig, = y,, — j),- be the time-demeaned dependent variable, where )7 = T‘1 z 1:] y,, is the time average. Similar notations hold for 56,-, and it“. After applying the within transformation to equation (3.1) the model becomes Yit = 551%“? flit, t: 1,...,T, (32) If (xi, : t = l, . .., T} is strictly exogenous - that is, E(x:-su,-,) = 0, all 63 s,t = 1,..., T, then Ritz-silly) = 0. Thus under strict exogeneity of the explanatory variables estimation of equation (3.2) by pooled OLS is a consist procedure for the estimation of ,6. Where N ‘1 N i3 = (xv-I 21%;" 3? ) N-1 23217;;- i=l i=1 However, to ensure identification, the rank condition must be satisfied. That implies, at a minimum, that the explanatory variables must vary across time. This leads to the so-called within or fixed-effects estimator. Since we are interested in the case where the explanatory variables cannot be treated as strictly exogenous we estimate (3.2) by pooled ZSLS, using time-demeaned instruments 2,7. This produces the fixed effects-two stage least squares (FE-ZSLS) estimator. Therefore, we develop tests for serial correlation and heteroskedasticity under the following conditions ASSUMPTION A.l: For all s,t = 1,. . ., T, E(uit lZi) = 0- (3-3) Assumption A.1 is a strict exogeneity condition on the instrumental variables — after eliminating the unobserved effect, c,- — and implies 15121-121“) = 0,! = 1,. . ., T. Of course, to ensure identification, the rank and thus order condition must be satisfied. The rank condition implies, that the demeaned instruments are sufficiently linearly related to the demeaned endogenous variables. Necessary for the rank condition is the order condition, that there are at least as many time-varying instruments as there are time-varying explanatory variables. That is, L > K. Specifically we require, ASSUMPTION A.2: (i) rank 23,; 1:12:12”) = L and (ii) rank 2;, E(2},5e,-,) = 64 THEOREM 3.1: Under assumptions A.1 and A.2, the pooled 2SLS estimator obtained from a random sample in the cross-section is consistent for 6. Proof: The asymptotic first order properties are derived by rewriting the equation for 0 as . N o*'/..\* “I N N" p = B+ N-l XX,- X,- N" ZX; u,- _ (3.4) ' i=1 i=1 Aid/>30! Under A.2, N4 2:] X,- X; is non-singular (with probability approaching one) with Alt/All! plim (N‘1 2:] X,- Xi) = A”1 , where A a E(}\"}"')"(f). Further more, under Assumption A.l, the i=1 N M, plim (Iv-12X,- 11,-) = E()"(;-*’u,-) = 0. Therefore, by Slusky’s theorem (for example, Wooldridge (2002, Chapter 3),plim fi=fi+A4-0=a The asymptotic normality of IN ([3 — 6) results fi'om the asymptotic nomality of N‘”2 2:1 Xf'ui, which follows from the central limit theorem under A.l, A2 and finite second moment conditions. The asymptotic distribution of N'“ 2 2:] Xf'u; is N N-“2 227%,- 3 Normal(0,B), (3.5) i=1 where B a Ed’f’uiupt’?) (3.6) 65 But we also need to use the important result that having to estimate II in the first stage does not affect the asymptotic distribution. Formally, N I.>*’ N .. N‘UZZXi u,- = N-l/ZZXy’ui+op(1). (3.7) i=1 i=1 It follows that 7M} — p) 5’» Normal(0,A‘lBA" ). (3.8) Importantly, the asymptotic variance A’l BA‘l places no restrictions on Var(u,-|z,-,c,-), and so it is fully robust. It is the basis for robust inference using the F E-ZSLS estimator (which is the specific FE-IV estimator we cover in this chapter). The sample analog of B is N T T 13 =N—1 22;; 33,53,353; 35:; (3.9) i=1 t=l s=l where 12;, = y,, — 523,3 are the FE-ZSLS residuals. The variance estimator in (3.9) is fully robust to both serial correlation and heteroskedasticity. However, the asymptotic variance can be simplified by ruling out heteroskedasticity and serial correlation. ASSUMPTION A.3. The idiosyncratic errors are homoskedastic in the sense that E(u,2,|z,-) = 02,: = 1,...,T, (3.10) where z; = (2,1,...,z,-T). Under A.l, E(u,~,|z,-) = 0, A.3 implies Var(u,~,|z,-) = 02, and so we view Assumption A.3 as being an assumption about the conditional variances. 66 ASSUMPTION A.4: The errors are serially uncorrelated in the sense that E(u,-,u,-S|z,-) = 0, all 3 ¢ t. (3.11) Under A.l, (3.11) is equivalent to Cov(uiz.uis|zi) = 0 Under A.3 and A.4 we can simplify the expression for B in (3.6). First consider the terms when t = 3. Using the law of iterated expectations, E( 2-*' «an _ E 2»*' "It: , _ EE 2 _»*’ «at: uitxi! xi!) ‘ [(uitxit xitlz,) — [ (uitlzl)xit xii] 2 “It, "II: = 0' E(xi’ x”), t = 1,...,T. Next fort at s, E(uituisx¥ Mk) = E[E(uituisxit 16323)] I - E[E(uizuislzi)55ft 55;] = 0 Combining these results gives B: 02 Z E(55;!;'x 35*) (3.12) However, if either assumption A.3 or A.4 fail to hold the variance in (3.12) is bias. If we find evidence of heteroskedasticity and/or serial correlation we can use the fully robust variance estimator given in (3.9). Up until recently it was believed that in the absence of serial correlation we could extend the heteroskedasticity robust (HR) variance estimator that is consistent in cross-sectional models White (I 980). However, Stock and Watson (2006) show that with fixed T, the conventional HR variance estimator, for cross-sectional models, applied to the fixed effects estimator is inconsistent with or without the degrees of freedom adjustment. This inconsistency 67 is a result of having increasingly many incidental parameters. This issue arises because the entity means must be estimated, however, with fixed T we cannot consistently estimate them. As we will see when developing a test for serial correlation, if replacing the population variables with their estimates changes the limiting distribution of the test statistic, we must account for the estimation error in computing the test statistic. Stock and Watson model the asymptotic bias and propose a bias-adjusted estimator. In addition, their derivation can be used to adjust the variance matrix under no serial correlation. 4. Testing for Heteroskedasticity In general, deriving a test for heteroskedasticity involves testing for correlation between the squared idiosyncratic errors and the instruments after controlling for 02. Therefore, let hi, 2 h “(2,7) denote a l x q vector of any time-varying, nonredundant functions of z,-. Ideally, we would state the null hypothesis as H0 : E[h;-,(u,3, — 02)] = 0, t = 1,. . ., T. However, because we are removing the unobserved effect via time-demeaning (the within transformation), the null is effectively E[i&§,(a,2,-n2)] =0,t= 1,...,T, (4.1) where n2 = 02/0 —1/T). (4.2) This value comes from the fact that, under A.l, A.3, and A.4, Ema) = E[(uu - 32,92] = E(u;?-,) + 15029) - 2563.373) 68 = 02 + (02/7) — 2(02/7') = 020 — 1H). (4.2) Equation (4.2) leads to the following estimator for 02 =[N(T- 1)] '22”. (4.3) i=1 1:] Using (4.3) the sample analog of (4.1) is, N-1 Z 2 h §,(u',-,— 37 (4.4) i=1 t=l where a,, = y,, - inf} are the FE-ZSLS residuals. To use (4.4) as a basis for a test, we must derive the limiting distribution of N“”2 EN: 2 h,,(u,-, — n 2.) (4.5) i=1 1:] Typically the first-stage estimation causes the limiting distribution of (4.5) to be different from the limiting distribution of 1w“2 2 2 h ;,(u-,.2,- (4.6) i=1 t=l However, since h i, is a function of the instruments, which are strictly exogenous by A.l , we can show that the first-stage estimation does not effect the limiting distribution of (4.5), provided we add an additional assumption. To see what that assumption is, use a mean value expansion gives N—l/2 Z Z hit(fi;21_ i=1 (:1 69 N T ___. N—l/Z Z Z h:t(fiizt _ fiZ) i=1 1:] N T + N-1 Z; :2; 2;,2a,,3ei,,/1—V(i3 — p) + 0,,(1), (4.7) ,= = where JJV (0 - [3) = 0,;(1) by the central limit theorem. Therefore, we need to show that N'1 211:1 2 1T: 1 iii-1222,3555, = 0p(l ). This assumption is generally not true under A.3 and A.4. Therefore, we add ASSUMPTION A.5: E(fi,~,5&,-,lz,~) = E(z‘i,~,5é;,),t = 1,...,T. This assumption effectively restricts the conditional covariance between the demeaned errors and regressors to be constant. In other words, it is a kind of system homoskedasticity assumption. Wooldridge (1990) discusses similar assumptions in the context of IV estimation using pure cross section or pure time series data. In the panel data case, we might think of xi! = di + Zitn + Vita E(Vitlzi) = 0, and then if we assume the covariance matrix of {(uib v,,) : t = 1,..., T} is constant conditional on 2;, then Assumption A.5 holds. If we drop Assumption A.5, the test is much harder to compute. Under A.1, A.3, A.4, and A5, and letting A = E(z‘i;,5i,-,), we have T T T 2150133235335) = zElh§,E(fiir5iizl'Z‘iz)l 5 2501210 (=1 (=1 t=l T = 5(2 I3},)A (:1 =0 70 because 21:! h;, = 0. By the law of large numbers we have 07-12:] I; iii-(237,663, = op(l) and since op(l) x 0p(l) = 0,;(1) we can rewrite (4.5) as N T .. 2 N T M“2 2 211502,, — 372) = 1w"2 2 2 111,02}, — 372) + 0,,(1). (4.9) i=1 #1 i=1 t=l We still have to show that the estimation of n2 can be ignored asymptotically. But 1W“2 2 Z h;,(u;?,— (4. 10) i=1 t=l =N‘“ZZZiii-5+N"’ZZZh’-5 i=1 t==l i=l t=l = N-l/zzzhituiit—n i=1 t=l because 2:1,“ = 0. Therefore, the asymptotic distribution of (4.5) is equivalent to (4.6). That is, N-l/Zfiéh,,(a,,—fi2)=N—1/222h,(u,2,— n2)+op(1). (4.11) i=1 t=l i=1 r=l To obtain a test statistic, define T T T ”I .. .. .. "I " C a Var Z h,,(u,2, — n2) =22 mu}, — n2)(u;?—s — n2)h,.,h,~,]. (4.12) ’=1 (:1 s=1 It is important to note that the variance-covariance estimator must be robust to serial correlation. This is true even though we are maintaining A.4, no serial correlation in the idiosyncratic errors, for two reasons. First, the within transformation induces 7l serial correlation, and second, the squared errors might actually contain serial correlation, such as in dynamic models of heteroskedasticity. Then by (4.11) and (4.12) we have, N-“2 22h; ,(u,, — W) —+ Normal(0, C). (4.13) i=1 t=l Now, if C' 5’, C, obtaining a test statistic that has a chi-squared asymptotic distribution is easy. The Lagrange Multiplier (LM) test is, N T (221719!“2))(NC)1) i=1 t=l This fully robust statistic in (4.16) cannot, in general, be computed via regressions. 72 However, there exists a test statistic that is asymptotically equivalent to (4.16) under Ho, and local alternatives, that can be easily computed using simple regression. The alternative statistic isjust the fully robust Wald statistic from the regression of Efionniim i=l,...,N;t=1,...,T. (4.17) In other words, let 2 be the Q x 1 vector of coefficients on 5,7. Then we just compute the robust Wald test for significance of i, that is, using a variance matrix that is robust to heteroskedasticity (to all for nonconstant conditional fourth moments in ii ,7) and serial correlation (to allow serial correlation of arbitrary form in 11%,). Many software packages, such as Stata, have such a feature for pooled OLS regressions. The test statistic based on (4.17) replaces 3,27 — 1‘72 in obtain C with the residuals from (4.17), 1",, s 3,2, - y? — 71,7110 get . N T ’ N T .. .. 6r: (22:; Muir—n )) 22 rims/32,123.. (4.18) H =1i=11=1 N 22 h;,(u?.-—n )). i=lt=l Because i f» 0 under Ho, this alteration does not affect the limiting distribution of the test statistic. In fact, 5‘ and 5 can be shown to be asymptotically equivalent in the sense that 5‘ -3r 5 0 under local alternatives such that A N = 0(N‘I/2). The argument is straightforward and similar to Wooldridge (l 990). In fact, any estimator of C that is consistent when A = 0 will lead to a test asymptotically equivalent to 3r under N‘“2 local alternatives. We summarize the steps for the test of H0 : E(z'i;?',|z,-) = 112. PROCEDURE 4.1. (i) Estimate the model by FE-IV and obtain the squared 73 F E-IV residuals, ’53,. (ii) Choose Q misspecification indicators 11,7 = h ,-,(z,-), and take away time averages to form 171,7. (ii) Run a pooled OLS regression $301111“, t = l,...,T,i = 1,...,Nand use a fully robust Wald statistic for joint significance of 11,7. Its asymptotic distribution is 16 Q- F or simplicity, I assumed the indicators 11,-, did not depend on estimated parameters. By extending the previous approach, it can be shown that the same asymptotic analysis goes through under A.l to A.5. In particular, we can ignore the first-stage estimation of any parameters appearing in 11 ,7, provided the estimators are JN -consistent. 5. Testing the Unconditional Variance Matrix The test in the previous section can be used for testing whether the conditional variances and covariances do not depend on the instruments, 2,. Often in panel data cases we are interested in testing whether the unconditional variance matrix of the idiosyncratic errors takes on the standard, scalar form. That is, we want to test the null hypothesis H0 : E(u,-u:-) = 0217, (5.1) against the alternative that some of the off-diagonal elements are nonzero or that the diagonal elements change across-time. Here, u, is the T x 1 vector of idiosyncratic errors. As we have seen, because we use the within transformation, we cannot test hypotheses about E(u,-u;-) directly. Instead, we must use the time-demeaned errors. 74 Using the time demeaned errors as a test for serial correlation in the idiosycratic error leads to complications. This is because under the null hypothesis of no serial correlation in the idiosycratic errors, the time-demeaned errors will exhibit negative correlation. However, if (5.1) holds, the negative correlation induced is known. As we derived in the previous section, 502%,) = 02(1 — 1/7). (5.2) Further,the covariance between 12 ,7 and a,, is 5(1711il'is) = E[(uiz - 170041.: - 171') = E(uizuis) - E(uizl71) - E(uisfii) + 5071171) = o - 02/T— 02/T+ az/T = —02/T (5.3) Thus, the negative correlation induced is Corr(z'i,7fi,-s) = -1/(T— l) (5.4) for all t :1: 3. To derive a test of (5.1) define Q a E(ii,-z‘i:-). It is important to note that, while E(u,-u:-) is generally has rank T, the time-demeaning causes 0 to be singular with rank T — I. This does not cause any problems in what follows because we will use a matrix to select out the elements we wish to test. In fact, let R be a Q x T2 matrix such that the null hypothesis can be stated as H, : R'vec(Q) = 0, (5.5) where vec(-) is the “vectorization” operator. An important property of vec operator is vec(ABC) = (C ' ® A)vec(B), for any matrices A,B , and C. and we will use this property repeatedly below. Under the null hypothesis in (5.1), Q has diagonal elements 02(1 — l/ T) and off diagonal elements —02/ T. An unrestricted version of Q 75 (except that it has rank T— I) has elements (93,, s,t = 1,..., T .. Under (5.1), we have restrictions on the diagonal elements, a)“ = 0522 == can. If we want to test these restrictions directly, we can choose R to pick off the appropriate elements. Depending on what the restrictions are, we need to be careful to not choose redundant restrictions. For example, if T = 2, we cannot test a) 11 = (022 because the FE-IV residuals are identifical for the two time periods for each observation. In fact, we can only test restrictions on Q for T 2 3. Even then, we must be aware of the reduced rank of 0. Consider the T = 3 case. Then, under H0, 2 2."L2 ”12 30 3° 3° _ _L2 2.2 __L2 Q— 30 30 30 .l2 -.1_2 2.2 3“ 3° 3“ We can test the restrictions on 0 using a variety of linear combinations of the unrestricted variances and covariances. For example, for testing a)“ = (022, it is easily seen that we can choose R as R’=(1ooo—10000). which, of course, leads to a one degree-of-freedom test. We can bring in covariances by, say, testing a)” = ——a)2] - (023 by adding a row to R': R, 1000—10000 1—1—1000000 Then 76 Rivec(Q) = aJ11 -" a022 a111 -w21 -w22 and our goal is to test whether this linear combination is zero. We base the test on a consistent estimator of Q when it is unrestricted. N 1 Q = N-1 202,327) (5.6) i=1 where i},- = )7,- - 5&0 are the T x l vectors of FE-ZSLS residuals. Then, the sample analog of (5.5) is, N R'vec1_ (3 m- (Iv-1 2(u,®X)>J— (13 m+op<1> Using (5.12) and multiplying through by R' gives the representation N N R'vec(N"I/2 2 3,31) = R'vec(N‘1/2 2 32,321.) (5.13) 5 . —R(N-‘Z(X 5331,0175 13) —R(N“Z(u,®X)>J—(fi 131+op<1> To use (5.13) as the basis for a test we replace [N (B - fl) with its first-order 1 1 representation [E(X19‘ X1“)]‘1N‘1/2 21:] X’“ u,- (which holds up to op(l)) i N N R'vec N‘”2 2 15,3; = R'vec N‘”2 Z u',-z'i1- (5.14) i=1 i=1 N 1 — R’[N“ 2 (X518 a,)]1E(X;-* X*>1" i=l N 1 'N_]/2 2X?! ”1 i=l N , — R’[N-' Z (a, ®X,)][E(X}' 1??)1" N 1 . N‘“2 2X1“ u,- + 0p(l). i=l To simplify (5.]4), define the following: A] = E[X,- 81 iii], A2 = E[ii,- ® X,], and 79 I C = E(X1-“ X1“). Substituting gives N N R’vec N-'/2 2 3,31- : R’vec NW2 2 31,311- (5.15) i i N 1 -R’(A1+A2)C_IN_“/2ZX1-“ u,-+0p(l). i=1 Furthermore, letting v,- = R'vec(z‘i,-fi1-) and s,- = R'(Al +A2)C‘1X13" a,, (5.l5) can be written as N N M“2 2 i3,- = N“2 20,- — s,-) + op(1). (5.16) i=l l=1 Because E(v,-) = 0 and E(s,-) = 0 when E(u,-|z,-) = 0 and (5.1) holds, we have N N-l/2 Z 5, 5’» Normal(0, D), (5.17) i=1 where D a Var(v, — s,-). (5.18) Given a consistent estimator D f, D (as N -5 00), we can define the test statistic N ’ N 8 = (N40 25,-) 15-1 (N‘1/229,), (5.19) i=1 i=1 which converges in distribution to xZQ under H0 (assuming that D has full rank Q). Of course, the actual form of the test statistic depends on the estimator used for D. Since we do not want to rely on additional assumptions, we use a completely general estimator for D: 80 N 1‘) = N" 2(3, — 5,)(1‘2,— 3,)’. (5.20) i=1 Using (5.20) the test statistic in (5.19) becomes N ’ N ‘1 N 3 = (291') Z (91—§i)(9i “57), (291'), (5-21) i=1 i=1 i=1 whose computation is not too onerous. Still, it cannot be computed simply via regressions, and so it should be programmed in standard statistical packages, such as Stata, that allow fixed effects instrumental variables methods. 6. Application In chapter one, 1 extended the analysis of Papke (2007) by testing for endogenous spending in the pass rate equation after controlling for the unobserved district effect. Using the level of the foundation grant as an instrument of spending I found mixed evidence about the exogeneity of spending. In chapter two, I examined the spending-performance model further by applying the tests for an unobserved district effect and for possible trending of the district effect. The results indicated correlated district effects. In this chapter, I apply the test for heteroskedasticity. It is important to note that the results of Stock and Watson (2006) do not affect the test for heteroskedasticity. However, if we find evidence of heteroskedasticity, the Stock and Watson result shows that even if the errors are uncorrelated across-time the standard heteroskedasticity robust variance estimator is bias. While this is an important finding, it is very unlikely that serial correlation would not be a problem and thus justifying a variance estimator that is only robust to heteroskedasticity. Of course, 8] nothing rules out heteroskedasticity, serial correlation is generally more of a problem with fixed T. The spending-performance model analyzed by Papke (2007) models the pass rate on the fourth grade MEAP math test as a function of enrollment, poverty rates, and average real spending per student. Noting the likely endogeneity of spending Papke uses the level of the foundation grant as an instrument for spending. In addition, she uses the percentage of students eligible for the federal free lunch program as a proxy for poverty rates. Therefore, the test for heteroskedasticity developed in Section 4 involves regressing the squared fixed effects residuals on functions of enrollment, lunch, and the foundation grant. Papke uses the log of enrollment, spending, and foundation grant to allow for diminishing effects. Therefore, we use the levels, squares and cross-products of lunch, log(enrollment), and log(foundation grant) to test for heteroskedasticity. Testing the joint significance of the nine variables, after time-demeaning, gives a fully robust Wald statistic of 27.27 which gives a p-value of about .0016. Therefore, the conditional variance matrix of the idiosyncratic errors does not appear to have the standard form 0217. At a minimum, inference needs to be made robust. Plus, this suggests that more efficient estimation, particularly, generalized method of moments, can improve efficiency over FE-ZSLS. 7. Conclusion The chapter has developed a test for heteroskedasticity and general test regarding the unconditional variance of the FE-IV estimator. The test for heteroskedasticity can be computed by regressing the squared residuals, from FE-IV estimation, on various 82 functions of the time demeaned instruments. A key benefit of the regression based test is the ease in computing a test statistic that is fully robust. This is critical since the test uses residuals for FE-IV, as the within transformation leads to serially correlated time demeaned errors if the idiosycratic errors are uncorrelated. I apply the test to the spending-performance model analyzed by Papke (2007). The study uses data on the pass rates for the fourth-grade MEAP math test from 1992 though 2004 at Michigan public school districts. I test for heteroskedasticity using the levels, squares, and cross-products of the variables used to estimate the FE-IV equation. The results suggest that the conditional variance matrix of the idiosyncratic errors does not have the standard form 0217. While the test for serial correlation cannot be computed via regressions it is actually a general test regarding the unconditional variance. In addition, the asymptotic distribution can be used to adjust the variance of the Wooldridge test that is currently programed in Stata 8.0 and higher. That is, the asymptotic distribution derived in this chapter can be used to extend the Wooldridge test to panel data models estimated by instrumental variables methods. I have not analyzed the finite sample properties of either test. However, Drukker (2003) provides simulation evidence that the Wooldridge test, for autoregressive or moving average errors in panel data models, performs well in reasonable sized samples. Therefore, we would expect that if the Wooldridge test is adjusted using the asymptotic distribution derived in this chapter it might preform equally well. The tests derived in this chapter are readily extended to panel data models with fixed cross-sectional size and growing time dimension. Such a change in asymptotics 83 would necessitate assumptions regarding the stationarity or time dependency of the variables. 84 Appendix: Stata Commands for Implementing the Tests in Chapter 1 Testing for Endogeneity: Partition the model as yit = 1111131 +xiz2fi2 + 01+ ”it, t=1,2,-..,T, where x,72 is strictly exogenous and we are interested in testing if x,,] is endogenous. 1) Obtain 12,7 as the residuals from the fixed effects regression. a) areg y,, x,,, x,72, absorb (fixed effect identifier) b)predict uhat,resid The last command saves the residuals from the fixed effects regression as uhat. Note that the predict command must directly follow the regression command. In the next step if there is more than one endogenous variable step two must be carried out for each endogenous variable. In addition, there must be at least as many instruments as possible endogenous variables. 2) Since under the null hypothesis x ,7, equals v,-, and by the first order conditions of FE N‘1 21:] Z; x,,, 12,7 = 0, we need to estimate v,, as the residuals from the following FE regression, a) areg x,,, x,,2 2,7, absorb (fixed effect identifier) b)predict vhat,resid 3) Obtain 1",, as the residuals from partially out all explanatory variables from vhat. Note you do not want to include the instruments in this regression. 85 a) areg vhat x,,l x,,z , absorb (fixed effects identifier) b)predict rhat,resid 4) The fully robust test statistic is the robust t or F test of rhat from the following regression. a)reg uhat rhat, robust cluster(fixed effects identifier) b) test rhat The non-robust version of the test is simply N(T— l)R2. Where R2 is from the regression in step 4. 86 Testing Overidentifying Restrictions When testing for over-identification we do not need to estimate the misspecification indicators as they are simply a subset of the instruments. 1) Obtain 12,, as the residuals from the FE-ZSLS regression using the full set of instrumental variables. a)xtivreg dependent variable strictly exogenous explanatory variables (endogenous variables = list of instruments),fe b)predict uhat,resid 2) In computing the linear projection in equation (4.6) we can omit v,, since the misspecification indicators are a strict subset of the instruments. However, there will be a regression for each endogenous variable. That is, perform parts a and b for all endogenous variables then form xhat as (xhatl ,...,xhatk1) where k1 is the number of endogenous variables. Thus, it must be that k1+ q = L where q is the number of over-identifying restrictions and L is the total number of instruments. a)areg endogenous explanatory variable instrumental variables, absorb(fixed effects identifier) b)predict xhat,xb 3) For each over-identifying restriction, 53,-” ,...,f-,-,q is obtained as the residuals from the q FE regressions a) areg over-identifying restriction 1 all 87 explanatory variables,absorb(fixed effect identifier) b)predict rhat1,resid 4) The test statistic is obtain as the fully robust Wald or F-test on f,,1,..., $7“, from the regression; a)reg uhat rhatl,...,rhatq, robust cluster(fixed effects identifier) b)test rhatl, ...,rhatq The non-robust version of the test is simply N(T - l)R2. Where R2 is from the regression in step 4. 88 Testing for Non-linearities First apply the within transformation to remove the unobserved effect then partition the equation into endogenous and exogenous explanatory variables: in = 55121131 +55i12fi2 + 17:1, t = 1,...,T. 1) Under the null hypothesis the estimation procedure is FE-IV. Therefore, 121., can be obtain from the following regression, a) xtivreg dependent variable strictly exogenous explanatory variables (endogenous variables = list of instruments),fe b)predict uhat,resid 2) Next, we need to estimated the reduced form of the endogenous variables. That is, for each endogenous variable obtain the fitted values from the following regression using demeaned variables, a)reg demeaned endogenous variable demeaned exogenous variables demeaned outside instruments b)predict endogenous variable hat 3) Since the misspecification indicators depend on endogenous variables we replace the endogenous variables with their reduced form estimations obtained in step 2.. The simplest way to obtain the misspecification indicators is by first obtaining the fitted values from the following regression using demeaned variables, a)reg demeaned dependent variable demeaned 89 strictly exogenous explanatory variables fitted values of endogenous variables. b)predict yhat 4) Using yhat we can obtain a,,, = [aim/2, + 52,7232? and 9,,2 = [(1,181 + 52,9132? by squaring and cubing yhat. That is, a) genfim=yhat2 b) gen ha=yhat3 5) Obtain Fm and fig as the residuals from partially out all demeaned explanatory variables from the misspecification indicators. Note you do not want to include the instruments in these regressions. a)reg a”, demeaned xgl demeaned X”2 b)predict rhatl,resid c)reg 9&2 demeaned xy, demeaned Xflz d)predict rhat2,resid 6) The fully robust test statistic is the robust t or F test of rhatl and rhat2 from the following regression. a)reg uhat rhatl rhat2, robust cluster(fixed effects identifier) b)test rhatl rhat2 90 References Ahn S.C. and S. Low (1996). "A Reforrnulation of the Hausman Test for Regression Models with Pooled Cross-Section-Time-Series Data," Journal of Econometrics 71, 309-319. Arellano, M. (1990). "Testing for Autocorrelation in Dynamic Random Effects Models," Review of Economic Studies 57, 127-134. Arellano, M. (1993). "On the Testing of Correlated Effects with Panel Data," Journal of Econometrics 59, 87-97. Bhargava, A., L. Franzini, and W. Narendranathan, (1982). "Serial Correlation and the Fixed Effects Model," Review of Economic Studies 49, 533-549. Breusch, TS. (197 8). "Some Aspects of Statistical Inference for Econometrics," Unpublished Ph.D. thesis, Australian National University. Breusch, T. S., and AR. Pagan (1979). "A Simple Test for Heteroskedasticity and Random Coefficient Variation," Econometrica 50, 987-1007. Berenblut, I. I., and G. I. Webb. (1973). "A New Test for Autocorrelated Errors in the linear regression model," Journal of Royal Statistical Society, Series B, 1, 33-50. Chamberlain, G. (1980). "Analysis of Covariance with Qualitative Data," The Review of Economic Studies 47, 225-238. Comwell,C., P. Schmidt, and R., Sickles. (1990). "Production Frontiers with Cross-Sectional and Time-Series Variation in Efficiency Levels," Journal of Econometrics 46, 185-200. Davidson, R., and J .G. MacKinnon (1993). Estimation and Inference in Econometrics: New York: Oxford University Press. Drukker, D. (1998). "Testing for Serial Correlation in Linear Panel-Data Models," Stata Journal 3, 168-177. Durbin, 1., and G. Watson (1951). "Testing for Serial Correlation in Least Squares Regression-ll," Biometrika 38, 159-178. Durbin, J. (1970). "Testing for Serial Correlation in Least Squares Regression When Some of the Regressors Are Lagged Dependent Variables," Econometrica 38, 410-421. Friedberg, L. (1998). "Did Unilateral Divorce Rates Rise? Evidence from Panel Data," American Economic Review 88, 608-627. Godfrey, L. G. (1994). "Testing for Serial Correlation by Variable Addition in Dynamic Models Estimated by Instrumental Variables," The Review of Economics and 91 Statistics 76, 550-559. Godfrey, LG, (1976). "Testing for Serial Correlation in Dynamic Simultaneous Equation Models," Econometrica 44, 1077-1084. Hausman, J. (1978). "Specification Tests in Econometrics," Econometrica 46, 1251-1271 . Hausman, J ., and W. Taylor (1981). "Panel Data and Unobservable Individual Effects," Econometrica 49, 1377-1398. Heckman, J. J, and V. J. Hotz (1989). "Choosing among Alternative Nonexperimental Methods for Estimating the Impact of Social Programs: The Case of Manpower Training," Journal of the American Statistical Association 84, 862-875. 1m, K. S., S. C. Ahn, P. Schmidt, and J. M. Wooldridge (1999). "Efficient Estimation of Panel Data Models with Strictly Exogenous Explanatory Variables," Journal of Econometrics 93, 177-201 Inoue, A., and G. Solon (2006). "A Portmanteau Test for serial Correlated Errors in Fixed Effects Models," Econometric Theory 22, 835-851. Ljung, GM. and G.E.P Box (1978). "On a Measure of Lack of Fit in Time Series Models," Biometrika 65, 297-303. Metcalf, G., (1996). "Specification Testing in Panel Data with Instrumental Vatiables," Journal of Econometrics 71, 291-307. Mundlak, (1978). "On the Pooling of Time Series and Cross Section Data," Econometrica 46, 69-85. Okui, R. (2007). "Testing Serial Correlation in Fixed Effects Regression Models: The Ljung-Box Test for Panel Data," Unpublished manuscript. Papke, LE, (2004). "The Effects of Spending on Test Pass Rates: Evidence from Michigan," Journal of Public Economics 89, 821-839. Papke, LE, (2007). "The Effects of Changes in Michigan’s School Finance System," working paper. Papke, L. E. and J. M. Wooldridge (2007). "Panel Data Methods for Fractional Response Variables with an Application to Test Pass Rates," working paper. Ramsey, J. B. (1969). "Tests for Specification Errors in Classical Linear Least Squares Regression Analysis," Journal of the Royal Statistical Society, Series B, 31, 350-371 . Ruud, P. (1984). "Tests of Specification in Econometrics," Econometric Reviews 3, 21.1-242. 92 Semykina and J .M. Wooldridge (2005) "Estimating Panel Data Models in the Presence of Endogeneity and Selection: Theory and Application," unpublished working paper. Stock, J .H. and M.W. Watson (2006). "Heteroskedasticity-Robust Standard Errors for Fixed Effects Panel Data regression," National Bureau of Economic Research Technical Working Paper Number 323. White, H. (1980). "A Heteroskedasticity-Consistent Covariance Matrix Estimator and a Direct Test for heteroskedasticity," Econometrica 48, 817-838. Wooldridge, J .M. (1990). "A Unified Approach to Robust, Regression-Based Specification Tests," Econometric Theory 6, 17-43. Wooldridge, J .M. (l995a). "Selection Correction for Panel Data Models under Conditional Mean Independence Assumptions," Journal of Econometrics 68, 1 15-132. Wooldridge, J .M. (1995b). "Score Diagnostics for Linear Models Estimated by Two Stage Least Squares," in Advances in Econometrics and Quantitative Economics, ed. G.S. Maddala, P.C.B. Phillips, and TN. Srinivasan. Oxford: Blackwell, 66-87. Wooldridge, J. M. (2002). Econometric Analysis of Cross Section and Panel Data: The MIT Press: Cambridge, Massachusetts. 93 ul)l()))l))(i()l Illlll