EconBase
← Back to paper

Specification testing with grouped fixed effects

Extracted main text — title through conclusion, appendix excluded. This is what our citation measures are computed over, published so the extraction can be checked by eye.

77,793 characters · 19 sections · 77 citation commands

Rendered from LaTeX for readability, not typeset faithfully. Citation keys are highlighted; maths is left as source; figures, tables and equation environments are summarised rather than reproduced; unrecognised commands are greyed out so nothing is silently dropped. Email addresses are removed.

Specification testing with grouped fixed effects

abstractWe propose a Hausman test for the correct specification of unobserved heterogeneity in both linear and nonlinear fixed-effects panel data models. The null hypothesis is that heterogeneity is either time-invariant or, symmetrically, described by homogeneous time effects. We contrast the standard one-way fixed-effects estimator with the recently developed two-way grouped fixed-effects estimator, that is consistent in the presence of time-varying heterogeneity (or heterogeneous time effects) under minimal specification and distributional assumptions for the unobserved effects. The Hausman test compares jackknife corrected estimators, removing the leading term of the incidental parameters and approximation biases, and exploits bootstrap to obtain the variance of the vector of contrasts. We provide Monte Carlo evidence on the size and power properties of the test and illustrate its application in two empirical settings.

\vskip3mm {\bf Keywords:} {\sc Group fixed effects, Hausman test, Jackknife bias correction, Parametric bootstrap, Time-varying heterogeneity} \vskip3mm {\bf JEL Classification:} {\sc C12, C23, C25}

\doublespacing

Introduction

Correct specification of unobserved heterogeneity is crucial in panel data modeling. For long, empirical applications have only considered individual time-constant fixed effects, but the assumption of time-invariant unobserved heterogeneity is often hardly tenable in practice, especially over a long time dimension. Therefore the current mainstream approach includes both subject- and time-specific intercepts, in order to achieve credible identification of the effects of interest. The simplest and most widely employed setup is the specification of additive individual and time heterogeneity, namely the two-way fixed-effects model, that in the linear model is equivalent to the two-way correlated random effects approach wooldridge2021. For nonlinear models with additive fixed effects, FVW2016 provide analytical and jackknife bias corrections for the maximum likelihood (ML) estimator, which is plagued by the incidental parameters problem.

While of simple implementation, the two-way fixed-effects specification fails to capture the specific impact common factors may have on each subject. There is now an important stream of literature focused on developing identification results and estimation strategies for models with interactive time and individual fixed effects. Contributions have been spurred by the seminal paper by Bai2009, who provided identification results along with the asymptotics for the interactive fixed-effects estimator in linear models. More recently, interactive fixed-effects have been introduced in nonlinear panel data and network models by chenfvweidner2021.

Testing the assumptions on the unobserved heterogeneity specification has also received considerable attention in the recent econometric literature. BBP2015 propose a Hausman-type test for the null hypothesis of time-constant unobserved heterogeneity in generalized linear models, where conditional ML estimators are compared with first-differences or pairwise conditional ML estimators. In the context of large stationary panel models, the factor specification could be tested by comparing additive to interactive fixed-effects models, on the basis of the Hausman test suggested by Bai2009 and its fixed-$T$ version, derived by Westerlund2019. However, it has been shown that the Hausman-type test fails to reject the null hypothesis when individual factor loadings are independent across equations CRT2015. On this basis, kapetanios2023testing use a Hausman-type test contrasting additive and interactive fixed-effects to detect such correlation, whereas castagnetti2015 overcome the issue by proposing an alternative max-type test for the null hypothesis of time-invariant unobserved heterogeneity.

Despite its increasing popularity, the interactive effects approach based on Bai2009's procedure comes with some non trivial issues. First, estimation relies on solving a non convex objective function with possibly multiple minima moon2023nuclear. Secondly, the reliability of the iterative procedure crucially depends on the consistency of the parameter estimates chosen as the starting point for the algorithm hsiao2018panel. These drawbacks might be even more hampering when nonlinear models with interacted fixed effects are involved chenfvweidner2021. In light of these considerations, a simpler specification might therefore be preferable, provided it gives a good enough representation of the structure of the unobserved heterogeneity.

In this paper we propose a Hausman test for the fixed-effects specification, in both linear and nonlinear models and where the unobserved heterogeneity, under the null hypothesis, is only individual or time-specific. The test contrasts One-Way Fixed Effects (OW-FE henceforth) ML estimators with the Two-Way Grouped Fixed Effects (TW-GFE henceforth) approach, recently put forward by blm2022. The TW-GFE approach is based on a first-step data-driven approximation of the unobserved heterogeneity, which is clustered by the {\em kmeans} algorithm using individual and time-series sample moments to assign individual and time group memberships. Cluster dummies are then interacted and enter the model specification as group effects, and the associated parameters are estimated along with the regression coefficients in the second step. The resulting second-step estimator is consistent in the presence of unspecified forms of the time-varying unobserved heterogeneity with minimal assumptions on the unobserved components, which makes it a perfect candidate to contrast with the OW-FE estimator that is consistent with only time-constant (or time-specific) heterogeneity. Note that, in order to perform the proposed test, there is no need to estimate interactive fixed effects models, as the TW-GFE encompasses this as well as more sophisticated specifications for the unobserved heterogeneity.

We show that, under the null hypothesis of one-way effects, the TW-GFE estimator converges to the OW-GFE, for which the asymptotic framework has been established by blm2022, implying that the Hausman statistic Hausman1978 has asymptotic $\chi^2$ distribution. There are, however, two sources of asymptotic bias: the incidental parameters problem, that in nonlinear models plagues both estimators, and the approximation bias, that affects the TW-GFE. We tackle the resulting non-centrality by reducing the bias of the vector of constrasts via leave-one-out jackknife HN2004. In addition, we rely on parametric bootstrap mackinnon2006, horowitz2019bootstrap to estimate the variance of the debiased vector of contrasts.

In the linear model, our test can also be used to detect violations of two-way additive individual- and time-specific heterogeneity, as one-sided demeaning reconciles this setting with the specification of one-way heterogeneity of our null hypothesis. In this framework, additional assumptions on one of the heretogeneity components and a modification of the moment functions used the the first-step clustering are required. One potential application is the pre-trend test to verify the crucial idenfying assumption of pre-treatment common trends when applying Difference-in-Differences. In this respect, the proposed test finds natural application in contexts where the generating model for potential outcomes has an interactive fixed effects structure callaway2023treatment, bai2024causal.

We report the results of an extensive Monte Carlo study showing evidence that the test has correct size and good power. Size properties crucially depend on how effective is the clustering procedure in approximating the unobserved heterogeneity for the TW-GFE, that is choosing a sufficiently large number of groups and ensuring that the moments used for the {\em kmeans} clustering are informative about the latent traits and common factors. Power properties are studied under the alternative hypothesis of a factor structure. While computationally more intensive than the testing procedures put forward by castagnetti2015 and BBP2015, the proposed test represents an improvement as the former can only be applied to linear models in a large-$T$ framework and the latter, while viable for generalized linear models admitting sufficient statistics for incidental parameters, lacks power when time effects are independent.

We also provide two empirical applications for the proposed test. The first concerns a linear model for the determinants of housing prices in the U.S. : the test rejects the null hypothesis of time-invariant heterogeneity, in line with the literature suggesting a factor structure for unobservable traits holly2010spatio. In the second application we analyze the inter-temporal decisions of labor market participation for female workers, revisiting the application in dj2015, among others. The test does not provide evidence of a more complex structure for the unobserved heterogeneity, as it fails to reject the null hypothesis of time-variant latent traits.

Literature review

This paper relates to the stream of literature that has studied fixed-effects panel data models with grouped structures for the unobserved heterogeneity. Discrete heterogeneity has long been considered within the random-effects approach Heckman1984, especially by a large body of statistical literature; see, for instance, MacLahlan2000 on finite-mixture models and Bartolucci2012 on latent Markov models. On the contrary, the investigation of grouped patterns of heterogeneity in fixed-effects models is relatively recent in the econometric literature.

hahnmoon2010 study the asymptotic bias arising form the incidental parameters problem in nonlinear panel data models where unobserved heterogeneity is assumed to be discrete with a finite number of support points. besterhansen2016 investigate the asymptotic behavior of the ML estimator for nonlinear models with grouped effects, under the assumption that subjects are clustered according to some external known classification. Models with unknown grouped membership are studied by phillips2016, who propose penalized techniques for the estimation of models where regularization by classifier-Lasso shrinks individual effects to group coefficients, by andobai2016, ando2023large who consider unobserved group factor structures in (generalized) linear models with interactive fixed effects, and finally by wang2023, lumsdaine2023estimation, studying group structures combined with structural breaks.

Discrete unobserved heterogeneity can serve as a regularization device that allows to identify the parameters of interest in panel data models with time-varying individual effects but not necessarily characterized by a factor structure. In this vein, bm2015 introduce a GFE estimator for linear models where the discrete heterogeneity is assumed to follow time-varying grouped patterns and cluster membership is left unrestricted. By contrast, the TW-GFE estimator by blm2022 is consistent even with unspecified forms of time-varying unobserved heterogeneity. While using discretization as an approximation device introduces an asymptotic bias, the function of the unobserved heterogeneity they consider encompasses a variety of specifications, such as additive and interactive effects, under minimal distributional assumptions. To the best of our knowledge, the only alternative approach based on approximating heterogeneity is by freemanweidner2023, which is however viable only for the linear model.

Outline

The rest of the paper is organized as follows: Section (ref) briefly describes the models and estimators; Section (ref) reviews the assumptions required to characterize the asymptotic distribution of the TW-GFE and outlines the main theoretical contribution; Section (ref) illustrates the proposed test and the asymptotic behavior of the resulting test statistic, and briefly illustrates the alternative testing procedures; Section (ref) presents the results of the simulation study in both linear and probit cases; Section (ref) illustrates the two empirical applications; Finally, Section (ref) concludes.

Models, estimators, and intuition of the proposed test

Consider a panel data setup where subjects are indexed by $i=1, \ldots, N$ and time occasions are indexed by $t=1, \ldots, T$. Throughout the paper, we assume that observations are independent, conditional on the observed covariates and unobserved heterogeneity, and that the models are {\em static}. The traditional specification of OW-FE models depicts unobserved heterogeneity as individual-specific intercepts, so that the conditional distribution of the response variable $y_{it}$ given an $r$-vector of exogenous covariates $x_{it}$ is of the type

equation[equation omitted — 125 chars of source]

where $ \theta_0 $ is the vector of parameters of interest, $\alpha_{i0}$ denotes the individual-specific time-invariant effect, and $f(\cdot)$ is a generic known density function. When (ref) is a linear regression model, consistent OLS estimators of $\theta_0$ can be trivially obtained on the basis of standard de-meaning or first-differences transformations, whereas ML estimators in non-linear models are not consistent in $T$ is fixed, unless probability formulations admit sufficient statistics for the individual intercepts and:70, Chamberlain1980. Instead, under rectangular array asymptotics Li2003, the ML estimator is consistent but exhibits a bias in the limiting distribution, which can be reduced by analytical or jackknife corrections HN2004, AH2007.

In this paper, we contrast the TW-GFE with the OW-FE estimator to perform specification tests and possibly detect more sophisticated structures for the unobserved heterogeneity. Consider the following model formulation

equation[equation omitted — 124 chars of source]

The time-varying unobserved heterogeneity $\alpha_{it0}$ is characterized by two vectors $ \xi_{i0}$ and $ \lambda_{t0}$, and a function $\alpha$$(\cdot)$, satisfying requirements that will be discussed later in more detail, such that $\alpha_{it0} = \alpha( \xi_{i0},\lambda_{t0})$. This characterization of $\alpha_{it0}$ follows that of blm2022 and can be easily reconciled with the structures for the unobserved heterogeneity in models (ref) and (ref):

equation*[equation* omitted — 699 chars of source]

where $\alpha_{i0}$ depends on individual traits only. It is worth noting that the formulation for time-varying heterogeneity accomodates the widespread approach based on including common time effects that enter the specification in an additive manner, i.e., $ \alpha_{i0} + \zeta_{t0} \equiv \alpha(\xi_{i0}, \lambda_{t0})$ where $\zeta_{t0}$ represents such time-varying heterogeneity.

As for the TW-GFE approach, the estimator is obtained via a two-steps procedure. The first-step deals with the classification of subjects and time occasions into two different sets of groups. It is worth to stress that clustering here serves as an approximation tool for the unobserved heterogeneity, so that there is no number of clusters to be known a priori. As a consequence, groups should not be intended as aggregation levels coming from external information papke2023simple. Classification relies on performing {\em kmeans} clustering twice, using the vectors of sample moments $ h_i = \frac{1}{T}\sum_{t=1}^T h( y_{it}, x_{it})$ and $ w_t = \frac{1}{N}\sum_{i=1}^Nw( y_{it}, x_{it})$ of fixed dimensions. Both vectors have to be informative about $ \xi_{i0}$ and $ \lambda_{t0}$, respectively, meaning that $ \xi_{i0}$ can be uniquely recovered from $ h_i$ for large $T$ and $\lambda_{t0}$ can be uniquely recovered from $w_t$ for large $N$. The two {\em kmeans} clustering procedures return a number of $K$ groups for the subjects and a different number of $L$ groups for the time occasions, from which two sets of dummies identifying the related group memberships are created. In the second step, cluster dummies for the cross-sectional and time dimensions are then interacted and enter the linear index of the model specified for the response variable as $KL$ group fixed effects. Estimation is then carried out by ML and the resulting estimator is consistent for the regression parameters, although asymptotically biased due to a combination of incidental parameters problem and approximation error, as shown by blm2022.

The characteristics of the OW-FE and TW-GFE estimators are such that the Hausman principle can be invoked to perform specification testing. In particular, with $N,T \rightarrow \infty$, the OW-FE estimator is consistent under the null hypothesis of time-constant unobserved heterogeneity, whereas the TW-GFE estimator remains consistent under more complex time-varying forms of heterogeneity.

Let $\hat{\delta}$ be the difference between the OW-FE and TW-GFE estimators. The null hypothesis of the proposed test is then \[ H_0: \underset{N,T \rightarrow \infty}{\mathrm{plim}} \hat{\delta} = 0. \] Under $H_0$ we show that the Hausman statistic \[ H^{\dagger} = NT \hat{\delta}^{\dagger '} \left(\widehat{W}_*\right)^{-1} \hat{\delta}^\dagger \] is asymptotically chi-square distributed with degrees of freedom equal to the dimension of $\theta_0$, where $\hat{\delta}^\dagger$ is the debiased vector of contrasts and $\widehat{W}_*$ is its bootstrap variance estimator. This result relies on the main theoretical contribution of this paper, which is the derivation of the asymptotic distribution of the TW-GFE estimator under $H_0$. In fact, blm2022 do not provide conditions under which the TW-GFE estimator can be debiased.

Assumptions and asymptotic behavior of the compared estimators

In the following we recall the main assumptions and asymptotic results for the OW-FE estimator, along with the characterization of the asymptotic distribution of the TW-GFE estimator under $H_0$. The assumptions listed below recall those in blm2022, suppblm2022.

assUnobserved Heterogeneity: There exist $ \xi_{i0}$ of fixed dimension $d_{\xi}$ and a function $\alpha(\cdot)$ and $ \lambda_{t0}$ of fixed dimension $d_\lambda$ and two functions $\alpha(\cdot)$ and $\mu(\cdot)$ that are Lipschitz-continuous in both arguments, such that $\alpha_{it0}=\alpha(\xi_{i0},\lambda_{t0})$ and $\mu_{it0}=\mu(\xi_{i0},\lambda_{t0})$; (ii) the supports of $ \xi_{i0}$ and $ \lambda_{t0}$ are compact.

Assumption (ref) gives the minimal properties of the unobserved heterogeneity. This specification encompasses time-constant heterogeneity, i.e, $\alpha_{it0} \equiv \alpha_{i0}$, with $\lambda_{t0} = \lambda_0$. In general, we will consider $d_{\xi} = 1$ and $d_\lambda$ either $0$ or $1$. It is also important to the GFE approach that covariates are affected by the same source of heterogeneity, so that $x_{it}$ depends on $\mu_{it0}$, where $\mu_{it0} = \mu( \xi_{i0}, \lambda_{t0})$, with $\mu(\cdot)$ satisfying the same requirements as $\alpha(\cdot)$.\footnote{The requirements on $\alpha(\cdot)$ and $\mu(\cdot)$ are those necessary for the viability of the GFE approach. Clearly the standard ML fixed-effects framework is unaffected by such assumptions.}

assSampling: (i) $(y_{it}, x'_{it})'$, for $i=1,\dots N$ and $t=1,\dots T$, are i.i.d. given $\xi_{i0}$ and $ \lambda_{t0}$; (ii) $ \xi_{i0}$ and $ \lambda_{t0}$ are also i.i.d.

Assumption (ref) outlines the sampling requirements that are more restrictive than that usually required to characterize the asymptotic distribution of ML estimators under rectangular-array asymptotics for fixed-effects models with time heterogeneity. For example, FVW2016 assume independence over $i$ while relaxing time independence by allowing for $\alpha$-mixing.\footnote{See FVW2016, Assumption 4.1 (ii).} Assumption (ref) is instead required for consistency of the TW-GFE, which effectively rules out the possibility of applying the proposed test to models with (i) feedback effects and (ii) unobserved heterogeneity that depends on dynamic factors.

assRegularity: Let $\ell_{it}(\alpha_{it}, \theta)$= ln $f (y_{it} | x_{it}, \alpha_{it}, \theta)$ and let \\ $\frac{1}{NT} \sum_{i=1}^N\sum_{t=1}^T \ell_{it}(\bar{\alpha}(\theta,\xi_{i0},\lambda_{t0}),\theta)$, with $\bar{\alpha}(\theta,\xi,\lambda) =\underset{\alpha}{\operatorname{argmax}}\;\mathbb{E}_{\xi_{i0}=\xi,\lambda_{t0}=\lambda}(\ell_{it}(\alpha,\theta))$, be the target log-likelihood:\\ (i) $\ell_{it}(\alpha, \theta)$ is three time differentiable in $(\alpha, \theta)$; $\theta_0$ is an interior point of the parameter space $\Theta$; $\Theta$ is compact; \\ (ii) $\ell_{it}$ is strictly concave as a function of $\alpha$, $\emph{inf}_{\xi,\lambda,\theta}\mathbb{E}_{\xi_{i0}=\xi,\lambda_{t0}=\lambda} \left( -\frac{\partial^2 \ell_{it}(\bar{\alpha}(\theta,\xi,\lambda),\theta)}{\partial\alpha\partial\alpha'}\right) >0;\\ \mathbb{E}[\frac{1}{NT} \sum_{i=1}^N\sum_{t=1}^T \ell_{it}(\bar{\alpha}(\theta,\xi_{i0},\lambda_{t0}),\theta)]$ has a unique maximum at $\theta_0$ on $\Theta$, and its second derivative is negative definite. \\ (iii) Regularity conditions on boundedness of moments and asymptotic covariances in suppblm2022 Assumption S2 (iv,v) apply. \\ (iv) There exists a function $M(y_{it}, x_{it})$ such that $\left| \ell_{it}(\alpha_{it}, \theta) \right| \leq M(y_{it}, x_{it})$; $\left|\frac{\partial \ell_{it}(\alpha_{it}, \theta)}{\partial(\theta,\alpha_{it})}\right| \leq M(y_{it}, x_{it})$; $\sup_i \mathbb{E} \left[ M(y_{it}, x_{it})^{33} \right] < \infty$; $ \sup_i \mathbb{E} \left[ M(y_{it}, x_{it})^{Q} \right]<\infty$, for some $Q>64$; $\left | \frac{\partial^{m1+ m2}\ell_{it}(\alpha_{it}, \theta)}{\partial\theta^{m1}\partial\alpha^{m2}}\right | \leq M(y_{it}, x_{it}) $ for $0,\leq,m1+m2,\leq 1, \dots, 6$\\

The conditions stated in Assumption (ref) are standard requirements for a well-posed maximization problem. Under Assumptions (ref),(ref), and (ref) the OW-FE estimator of $ \theta$, $\hat{\theta}$, for model (ref) is consistent as $N,T \to \infty$. For asymptotic normality, $N$ and $T$ are also required to grow at the same rate.

assAsymptotics: as $N, T \rightarrow \infty$, $N/T \rightarrow \rho^2$, with $0 < \rho < \infty$.

Additionally under Assumption (ref), $\hat{\theta}$ has the following asymptotic distribution

equation*[equation* omitted — 132 chars of source]

where $ B$ is constant. Notice that, in the case of informational orthogonality between the structural and nuisance parameters, such as in the linear model, $B = 0$, whereas characterizations of these asymptotic biases are given in HN2004 for nonlinear models with OW-FE. Finally, $I(\theta_0)$ is the information matrix of the profile log-likelihood.

Consistency of the TW-GFE estimator relies on specific conditions ensuring that the first-step discretization effectively approximates the unobserved heterogeneity. These conditions have to be placed on the information used for clustering, namely sample moments of $(y_{it}, x_{it})$.

assMoment informativeness: There exist sample moment vectors \[h_i = \frac{1}{T}\sum_{t=1}^T h(y_{it},x_{it}'), \quad \quad w_t= \frac{1}{N}\sum_{i=1}^N w(y_{it},x_{it}') \] of fixed dimension, and two unknown Lipschitz-continuous functions $\phi$ and $\psi$, such that \[ \underset{T \to \infty}{\mathrm{plim}} \, h_i = \phi(\xi_{i0}), \quad \quad \underset{N \to \infty}{\mathrm{plim}} \, w_t = \psi(\lambda_{t0}), \] and $ \frac{1}{N} \sum_{i=1}^N \Vert h_i - \phi(\xi_{i0})\Vert^2 = O_p(1/T)$, $ \frac{1}{T} \sum_{i=t}^T \Vert w_t - \psi(\lambda_{t0})\Vert^2 = O_p(1/N)$ as $N,T \to \infty$. Furthermore, there exist two Lipschitz-continuous functions $\varphi$ and $\nu$, such that $\xi_{i0} = \varphi(\phi(\xi_{i0}))$ and $\lambda_{t0} = \nu(\psi(\lambda_{t0}))$.

Assumption (ref) formalizes moments informativeness in order to have an effective individual and time clustering. Intuitively, by comparing two different sets of moments $h_i$ and $h_j$, two different types $\xi_{i0}$ and $\xi_{j0}$ can be separated. This is guaranteed by sample moments being asymptotically injective functions of the unobserved heterogeneity.

Let $\tilde{\theta}$ be the TW-GFE estimator. Then under Assumptions (ref), (ref), (ref), and (ref), blm2022 show that the TW-GFE estimator has asymptotic expansion

equation[equation omitted — 145 chars of source]

\[ \hspace*{2cm} + O_p\left(\frac{1}{T}+ \frac{1}{N} + \frac{KL}{NT}\right) + O_p(K^{-\frac{2}{d_\xi}} + L^{-\frac{2}{d_\lambda}} ) + o_p\left(\frac{1}{\sqrt{NT}}\right), \] as $N,T,K,L \rightarrow \infty$, such that $KL/(NT)$ tends to zero suppblm2022. Here $J(\cdot)$ and $s_{it}(\cdot)$ are the negative expected Hessian and the score associated with the likelihood function. Three main different sources of bias can be identified: the $1/T$ and $1/N$ terms depend on the number of time occasions and subjects used for $h_i$ and $ w_t$ in the classification step; the $KL/NT$ term reflects the estimation of $KL$ group-specific parameters using $NT$ observations; the $K^{-\frac{2}{d_{\xi}}} + L^{-\frac{2}{d_{\lambda}}}$ terms refer to the approximation bias arising from the discretization of $ \xi_{i0}$ and $ \lambda_{t0}$ via {\em kmeans}.

The $O_p(\cdot)$ terms in the above expansion can be shown to become $O_p(1/T + 1/N)$ under suitable choices for the number of groups, $K$ and $L$. The rule suggested by blm2022 and the consequent characterization of the $O_p(\cdot)$ terms are summarized in the following proposition.

remarkNumber of groups and approximation bias:\\ i) The number of groups $K$ and $L$ are chosen according to the following rules \begin{equation*} \hat{K} = \min_{K\ge 1}\{K:\hat{Q}(K) \le \gamma_K\hat{V}_{h}\}, \qquad \hat{L} = \min_{L\ge 1}\{L:\hat{Q}(L) \le \gamma_L\hat{V}_{w}\}, \end{equation*} where $Q(\cdot)$ is the {\em kmeans} objective function, $\gamma \in (0,1]$ is a user-specified parameter, $ \hat{V}_h = \mathbb{E}\left[ \Vert h_i - \phi(\xi_{i0}) \Vert^2\right] + o_p\left( \frac{1}{T} \right)$, and $ \hat{V}_w = \mathbb{E}\left[ \Vert w_t - \psi(\lambda_{t0}) \Vert^2\right] + o_p\left( \frac{1}{N} \right)$.\\ ii) With $K = \hat{K}$ and $L = \hat{L}$, the approximation errors are $O_p(1/T)$ and $O_p(1/N)$, so that the $O_p(\cdot)$ terms in (ref) become $O_p(1/T + 1/N)$.

The quantities $V_h$ and $V_w$ are the variability of the moments $h_i$ and $ w_t$, that, under Assumption (ref), can be estimated by $\hat{V}_h = \frac{1}{NT^2}\sum_{i=1}^N\sum_{t=1}^T \Vert h(y_{it}, x_{it}') - h_i \Vert^2$ and $\hat{V}_w = \frac{1}{N^2T}\sum_{i=1}^N\sum_{t=1}^T \Vert w(y_{it}, x_{it}') - w_t \Vert ^2$, respectively. We refer the reader to blm2022 for derivations and proofs of these results. In practice, the value $\gamma$ set by the researcher governs the number of groups, with smaller values of $\gamma$ yielding a larger number of groups.

We now state our main theoretical result, that is the asymptotic distribution of the TW-GFE under the null hypothesis of time-constant unobserved heterogeneity which, as per Assumption (ref), can now be formulated $H_0: \lambda_{t0} = \lambda_{0}$, for $t=1, \ldots,T$.

theoremUnder Assumptions (ref)-(ref), when data are sampled under $H_0$ and when the number of groups are determined according to the rule in Remark (ref) (i), then \begin{equation} \sqrt{NT}(\tilde{\theta} - \theta_0) \stackrel{d}\rightarrow N\left(\frac{C}{T}, J(\theta_0)^{-1}\right), \end{equation} where the bias term $C$ is given by blm2022, Corollary \S 2.

The proof is given in Appendix (ref). The TW-GFE is therefore asymptotically normal with constant bias as $N,T$ grow at the same rate. Hence, standard theory on the Hausman test can be applied and the non-centrality of its distribution, arising from the asymptotic biases of both the OW-FE and TW-GFE estimators, can be addressed by conventional bias reduction techniques.

Specification test

In this section, we first illustrate the proposed test stating the related theoretical results; we then offer an overview of the alternative approaches already present in the literature; finally, we describe a potential additional application for the proposed procedure to the testing for parallel trends in linear two-way fixed-effects models.

Proposed test

We propose a Hausman test for the specification of the unobserved heterogeneity considering, as null hypothesis $H_0$, that data are generated from the model portrayed by Equations (ref). In order to perform the test we rely on a Hausman-type statistic based on the difference $\hat{\delta} = \hat{\theta} - \tilde{\theta}$, namely, by contrasting OW-FE estimator with the TW-GFE estimator. Formally, the null hypothesis can be expressed as \[ H_0: \underset{N,T \rightarrow \infty}{\mathrm{plim}}\hat{\delta} = 0. \]

We cannot adopt the traditional formulation of the Hausman test Hausman1978, for which the test statistics is

equation[equation omitted — 90 chars of source]

where $\widehat{W}$ is a consistent estimator of the variance of the contrasts $\hat{\delta}$, $W$. In our scenario, the asymptotic biases of $\tilde{\theta}$ and $\tilde{\theta}$ propagate to the asymptotic distribution of $\hat{\delta}$ under $H_0$.

corAssume that $V(\hat{\delta}) = W_0$ exists and is non-singular and that Assumptions (ref)-(ref) hold. If data are sampled under $H_0$ and the number of groups are determined according to the rule in Remark (ref) (i), then \begin{equation} \sqrt{NT} \; \hat{\delta} \stackrel{d}\rightarrow N\left(\frac{C -B}{T}, W_0 \right), \end{equation}

Corollary (ref) shows that the bias in the asymptotic distribution of $\hat{\delta}$ makes $\hat{H}$ a non-pivotal quantity. The proof follows by standard arguments. In order to overcome this issue, we remove the $O(1/T)$ bias term of $\hat{\delta}$ via the the leave-one-period-out jackknife procedure HN2004. We therefore consider

equation[equation omitted — 141 chars of source]

where $\hat{\delta}^{(t)}$ denotes the contrasts vector computed on a subsample excluding observations in period $t$. The following theorem established asymptotic validity of the jackknife bias reduction for the vector of contrasts.

theoremUnder the assumptions of Corollary (ref), we have \begin{equation} \sqrt{NT} \; \hat{\delta}^\dagger \stackrel{d}\rightarrow N\left(0, W_0 \right). \end{equation} \begin{proof} The proof is given in Appendix (ref). \end{proof}

The jackknife correction poses an additional challenge concerning the estimation of the covariance matrix of $\delta^{\dagger}$, say $\widehat{W}$. First, the analytical expression should take into account the two-steps nature of the TW-GFE estimator. Secondly, it is not straightforward to derive the formulation for the variance of the difference of the two estimators. Finally, the estimator may not reflect the potential variance inflation due to the jackknife procedure in finite samples.\footnote{For example, FVW2016 show how the split-panel jackknife correction induces a variance inflation of the ML estimator of regression parameters in the two-way additive fixed effects models.} We overcome this issue by relying on a bootstrap estimate of the variance of the contrasts.\footnote{bartolucci2023conditional also consider bootstrap standard errors for marginal effects of fixed-effects logit models after a split-panel jackknife correction.} Specifically we rely on parametric bootstrap, thus generating the data based on the OW-FE estimates $\hat{\theta}$, that reflect the model specification under $H_0$. We compute the quantity in Equation (ref) for each of the $R$ generated samples in order to get the bootstrap estimate of its covariance matrix, denoted as $\widehat{W}_{*}$.

The proposed test statistic is therefore defined as a Hausman statistic, as outlined by the Corollary below, the proof of which follows by standard arguments.

corUnder the assumptions of Corollary (ref), we have \[ \hat{H}^\dagger = NT \hat{\delta}^{\dagger \prime} \left( \widehat{W}_{*} \right)^{-1}\hat{\delta}^{\dagger} \stackrel{d}\rightarrow \chi^2_r. \]

Alternative approaches

There are two alternative tools that can be used to test the same null hypothesis as the one here considered: the max-type test put forward by castagnetti2015 (CRT test henceforth) to detect factor structures in a linear framework and the test for time-invariant unobserved heterogeneity developed by BBP2015 (BBP test) that applies to both linear and non-linear models.

The CRT test considers a linear model in which the unobserved heterogeneity is depicted as in (ref) and $\alpha_{it0}$ has a factor structure, that is $\alpha(\xi_{i0}, \lambda_{t0}) = \alpha_{i0}'\zeta_{t0}$. The procedure tests the null hypothesis of no factor structure, defined as $H_0: \zeta_{t}= \zeta$, that is a model with only individual effects. The max-type test statistics is formulated as

equation*[equation* omitted — 163 chars of source]

where factors are estimated using the common correlated effects approach by pesaran2006,\footnote{It is worth recalling that the approach by castagnetti2015 can in general be implemented in models with heterogeneous slopes.} $\hat{\bar{\zeta}}$ is the sample mean of $\hat{\zeta}_t$ and the $\hat{\Sigma}_{t}$ is an estimate of the asymptotic factor covariance matrix castagnetti2015. The test statistic $S$ has an asymptotic Gumbel distribution. It is worth noting that CRT test requires large $T$ settings in order attain the correct size in finite samples.

Differently from CRT test, the BBP test can be employed with generalized linear models that admit a sufficient statistic for the OW unobserved heterogeneity parameters. Therefore, the BBP is a generalized Hausman test that compares estimators that are consistent only under time-constant unobserved heterogeneity with estimators that are consistent even in presence of a time-varying latent variable.

For linear models, the BBP test contrasts the OW-FE estimator with the first difference estimator. For the logit and Poisson models, the BBP test compares estimators based on two different formulation of the conditional likelihood: the standard conditional ML (CML) estimator and the Pairwise CML estimator (PCML). The former is consistent with time-constant heterogeneity since the probabilities for the models considered admit sufficient statistics for the incidental parameters. The PCML approach considers pairs of consecutive time observations for every individual and the corresponding log-likelihood is conditioned on the sufficient statistic, thereby allowing for different individual effects in every couple of periods. The PMCL estimator is therefore consistent in presence of time-varying unobserved heterogeneity. It is worth stressing that the BBP test has power only when certain conditions are met, namely $T$ must be greater than 3, otherwise the estimators coincides, and common factors must have a dynamic structure.

Testing for parallel trends

In the following we illustrate the application of the proposed procedure to test for parallel trend assumption in a Difference-in-Differences (DiD) setting, which is crucial to achieve identification of the causal effect of interest. \footnote{DiD one of the most widely applied methods in treatment evaluation and the related literature is indeed vast. We refer to roth2023s for a review about recent developments and open issues. }

The standard setting in empirical applications is based on a linear model including additive individual and time heterogeneity, that is the Two-Way FE (TW-FE) model de2023two,de2024difference. This formulation implies homogeneity of the time effects across units and time-constant individual heterogeneity, that are crucial for the parallel trend assumption to hold but might be of concern in applications where individual latent variables are likely to change over time. For these reasons, recent contributions have focused on departures from the additive specification for the fixed effects. In particular, callaway2023treatment discuss the identification and estimation of the treatment effect on the treated relying on an interactive effects model for the untreated units, allowing for heterogeneous trends among units. Similarly, gobillon2016regional first, and bai2024causal later, extend the latter approach in order to model both treated and untreated units.

The proposed method can be used to test for the form of the unobserved heterogeneity in the following model

equation[equation omitted — 115 chars of source]

where the parallel trend assumption is violated by the presence, in the pre-treatment period, of heterogeneous time effects, namely $\eta_if_t$.

As the proposed test can be used to detect departures from specifications with one-way unobserved heterogeneity, the quantities in Equation (ref) must be demeaned in order to contemplate one source of heterogeneity under the null hypothesis. Since the aim is to verify the parallel trend assumption, we transform the model by eliminating time-constant heterogeneity, so that Equation (ref) becomes

equation[equation omitted — 148 chars of source]

where the superscript refers to the individual de-meaned variable, e.g $\ddot{x}_{it}= x_{it} - \sum_{t=1}^{T} x_{it}$. In this vein, the proposed test compares the TW-GFE and the OW-FE estimator for a model where the one-way unobserved heterogeneity is represented by time fixed effects. Both are consistent under the null hypothesis of the presence of a common trend, that is $H_0:\eta_i=\eta$.

There are two key differences with respect to the aforementioned use of our test. Due to the individual de-meaning, the moments used in the search of the $K$ groups are null vectors by construction and hence they would not lead to meaningful clustering. We propose to tackle this issue by employing second moments to discretize the individual heterogeneity. This choice does not conflict with the requirements on the unobserved heterogeneity, provided the following assumption holds.

assPositive support: The support of \( \eta_i \) is a bounded subset of \( \mathbb{R}_+ \), i.e., \( \eta_i \in [0, a] \) for some \( a > 0 \).

Assumption (ref) guarantees the informativeness of individual-specific second moments as it ensures the injectivity and Lipschitz-continuity of the function $h(z_{it})=1/T\sum_{t=1}^Tz_{it}^2$, as required by Assumption (ref). Instead, clustering for time occasions does not pose any additional issue.

Furthermore, since we employ OW-FE with only time effects, we perform the leave-one-individual-out jackknife correction on the vector of contrasts, as the incidental parameter problem pertains to the time dimension. In formulae:

equation*[equation* omitted — 148 chars of source]

where $\hat{\delta}^{(i)}$ denotes the vector of contrasts computed on the subsample excluding unit $i$.

Simulation study

In the following Section, we describe the design and report the results of an extensive simulation study. First, we investigate empirical size and power properties of the test for the linear and probit model. We then turn to the comparison of the proposed approach with the CRT and BBP tests. Finally, we present simulation results in the context of testing for the parallel trend assumption in the TW-FE model.

Linear model

We design a Monte Carlo experiment where observations are generated by a linear regression model with two exogenous covariates. For the null hypothesis we consider a scenario where the unobserved heterogeneity is specified as in model (ref).

In particular, in the case of individual time-constant effects, for $i = 1, \ldots, N$ and $t=1, \ldots, T$, we generate samples according to the following equations, which we denote as DGP-FE-L:

eqnarray*[eqnarray* omitted — 220 chars of source]

where $\alpha_i = \varrho\Gamma_i +\sqrt{(1-\varrho^2)}A_i$ , with $A_i,\Gamma_i \sim N(1,3)$, and $\varrho=0.5$. Finally, $\varepsilon_{it}$ is an idiosyncratic standard normal error term. We let the coefficients $\theta = (\theta_1, \theta_2)'$ be equal to $(1, 1)'$. In this design, we explore the size properties of the proposed test by comparing the OW-FE with the TW-GFE estimator.

In order to investigate the power of the proposed test, the scenario generated under the alternative hypothesis is a linear panel data model with interactive fixed effects. Specifically, samples are generated according to a simplified version of the design outlined by Bai2009, with one latent factor:

eqnarray*[eqnarray* omitted — 184 chars of source]

where $\zeta_t \sim N(1,\sigma^2_{\zeta_t})$. We consider three values of the standard deviation of the time factor, $\sigma_{\zeta_t}=(1,3,5)$. We denote this design as DGP-IFE-L.

For each scenario, we consider $N = 50,100$, $T = 10, 20$, and $199$ bootstrap replications when computing the variance-covariance matrix of the vector of contrasts, for each of the $1000$ Monte Carlo replications. It is worth recalling that the performance of the TW-GFE estimator is closely linked to the number of groups chosen for the first-step {\em kmeans} clustering. Even following the rule outlined in Remark (ref), this number depends on the variability in the data, which affects how informative $h_i, w_t$ are about the unobserved heterogeneity, and the user-defined parameter $\gamma$. We account for the former by allowing for large variances in the composite error term, and for the latter by running scenarios where $\gamma=0.2,0.5,1$, resulting in a decreasing number of clusters.

Table (ref) reports the average of the Hausman test $\hat{H}$ in (ref) across simulations, for both uncentered and centered test statistics, along with the respective empirical size based on the quantile of the central $\chi^2_r$ with $r=2$. When evaluating the null hypothesis, we report the empirical size for three values of statistical significance (0.05, 0.1, 0.2) in order to show that the proposed test exhibits a uniform p-value. In Appendix (ref), we also present the average bias and standard deviation for all estimators involved, under both the null and the alternative hypotheses. For the TW-GFE estimator we also report the average selected number of groups in the first step, according to the rule outlined in Remark (ref).

As expected, the empirical size of the uncentered test statistics does not attain the nominal one. Instead, the centered Hausman test exhibits an empirical size that is always close to the nominal one. The $\gamma$ parameter seems to have no effect on the size of the test: coherently with the theory, the number of groups found by TW-GFE for the time dimension is always equal to one (see Table (ref) in Appendix (ref)), meaning that the estimator manages to identify the absence of variation of heterogeneity over time.

Table (ref) reports results under the alternative hypothesis. The proposed test presents good rejection rates when the true DGP has a factor structure for the unobserved heterogeneity, with power improving as both the standard deviation of the time factor and the $N,T$ dimensions increase. Accordingly, under the alternative hypothesis TW-GFE and its jackknife counterpart exhibit a bias which is substantially smaller with respect to ML and its bias corrected versions. Moreover, we conjecture that further increasing the number of individuals/time occasions or enriching the information entailed in factors may further improve the power of the test.

landscape\begin{table} \caption{Size analysis: DGP-FE-L, OW-FE vs TW-GFE} \begin{center} \begin{footnotesize} \begin{tabular}{lcccccccccccc} \hline \\ & \multicolumn{4}{c}{$\gamma = 0.2$} & \multicolumn{4}{c}{$\gamma = 0.5$} & \multicolumn{4}{c}{$\gamma = 1$} \\[2pt] & \multicolumn{2}{c}{T=10} & \multicolumn{2}{c}{T=20} & \multicolumn{2}{c}{T=10}& \multicolumn{2}{c}{T=20}& \multicolumn{2}{c}{T=10}& \multicolumn{2}{c}{T=20}\\[2pt] $N$ & \multicolumn{2}{c}{$50$\quad$100$} & \multicolumn{2}{c}{$50$\quad$100$} & \multicolumn{2}{c}{$50$\quad$100$} & \multicolumn{2}{c}{$50$\quad$100$} & \multicolumn{2}{c}{$50$\quad$100$} & \multicolumn{2}{c}{$50$\quad$100$}\\[2pt] \hline \\ Unc. H & 5.195 & 8.477 & 4.361 & 6.897 & 7.434 & 12.769 & 6.247 & 10.845 & 10.106 & 17.401 & 8.544 & 14.436 \\ [3 pt] size 0.05 & 0.323 & 0.584 & 0.266 & 0.459 & 0.511 & 0.799 & 0.395 & 0.717 & 0.654 & 0.924 & 0.589 & 0.839 \\ [3 pt] size 0.1 & 0.422 & 0.686 & 0.358 & 0.591 & 0.623 & 0.872 & 0.506 & 0.818 & 0.749 & 0.950 & 0.696 & 0.902 \\ [3 pt] size 0.2 & 0.557 & 0.798 & 0.475 & 0.732 & 0.728 & 0.940 & 0.643 & 0.884 & 0.841 & 0.977 & 0.801 & 0.951 \\ [3 pt] \hline \\ JK H & 2.020 & 2.191 & 1.904 & 1.964 & 2.102 & 2.095 & 1.987 & 2.007 & 2.083 & 2.131 & 2.105 & 2.067 \\ [3 pt] size 0.05 & 0.052 & 0.062 & 0.042 & 0.048 & 0.050 & 0.053 & 0.051 & 0.050 & 0.051 & 0.059 & 0.060 & 0.052 \\ [3 pt] size 0.1 & 0.103 & 0.116 & 0.082 & 0.093 & 0.110 & 0.100 & 0.091 & 0.101 & 0.105 & 0.112 & 0.100 & 0.111 \\ [3 pt] size 0.2 & 0.191 & 0.225 & 0.179 & 0.178 & 0.210 & 0.221 & 0.188 & 0.210 & 0.209 & 0.214 & 0.204 & 0.220 \\ [3 pt] \hline \\ \end{tabular} \end{footnotesize} \end{center} \begin{scriptsize} 1000 Monte Carlo (MC) replications. “Unc H” is the average of the uncentered Hausman test statistic, across MC replications. “ JK H ” is the average of the centered Hausman test statistic, across MC replications. “size” denotes the rejection rate for a nominal size of 5,10 and 20%. 199 bootstrap replications used for the jackknife correction. \end{scriptsize} \end{table}
table[table omitted — 1,771 chars of source]

Probit model

We investigate the small sample properties of the test in a nonlinear setting, specifically by considering the probit model. For $i = 1, \ldots, N$ and $t=1, \ldots, T$, we generate samples according to the following equations, which we denote as DGP-FE-P:

eqnarray*[eqnarray* omitted — 242 chars of source]

where $\mathbf{I}(\cdot)$ is an indicator function, $\alpha_i = \varrho\Gamma_{i} +\sqrt{(1-\varrho^2)}A_i$, $A_i,\Gamma_{i} \sim N(1,1)$, $\varrho=0.5$, and $\varepsilon_{it}$ is an idiosyncratic standard normal error term. The slope parameters $\theta=[\theta_1, \theta_2]$ are both equal to 1.

We evaluate the power of the proposed test under the alternative hypothesis of interactive fixed effects with one latent factor, that is

eqnarray*[eqnarray* omitted — 206 chars of source]

where the product $\alpha_i\zeta_t$ is rescaled to have unit variance and $\zeta_t \sim N(1,\sigma^2_{\zeta_t})$. We refer to this design as DGP-IFE-P.

For each experiment, we consider $N = 50,100$, $T = 10,20$, and $199$ bootstrap draws when computing the variance-covariance matrix of the vector of contrasts, in $1000$ Monte Carlo replications. When dealing with DGP-IFE-P, we employ three values of the standard deviation of time factor $\sigma_{\zeta_t}=\sqrt{0.5},1,\sqrt{2}$. We focus on $\gamma=1$ only. It is useful to recall that population moments used to cluster the unobserved heterogeneity may include the average of the binary dependent variable. In this case, however, the individual averages of $y_{it}$ may not provide enough information to detect more complex forms of unobserved heterogeneity, introducing only noise instead. For this reason we exclude the sample moments of the dependent variable in the clustering step.

Tables (ref) and (ref) report size and power analysis. Table (ref) and (ref) in Appendix (ref) report average bias and standard deviation of the estimators. In the size analysis we report the empirical rejection rate for three values of statistical significance (0.05, 0.1, 0.2). As expected, the centered Hausman test approaches the correct size and has uniform p-value, while the one based on biased estimators is not reliable. Unlike what happens with the linear model, here the test starts approaching the nominal size when the $T$ dimension grows larger, namely from $T=20$ onward. However, due to the more intense computational cost in the nonlinear case, we restrict our analysis to smaller samples.

The power analysis shows that the test has also good power properties, increasing both in the $N,T$ dimensions and in the variance of the time factor. We conjecture that further increasing the sample size could lead to a larger rejection rate.

table[table omitted — 1,364 chars of source]
table[table omitted — 1,713 chars of source]

Comparison with CRT and BBP tests

Table (ref) reports the simulation results for the CRT and BBP tests under the null and alternative hypotheses described by DGP-FE-L and DGP-IFE-L. In particular, the CRT test can be implemented by considering the null hypothesis of no factor structure with time-constant individual effects and the alternative hypothesis of a factor model with one latent factor (DGP-IFE-L).The test fails to attain the correct size in short panels, as also reported by castagnetti2015. The BBP test has good size properties in both linear and nonlinear frameworks, while it displays remarkably low power, due to the absence of a dynamic factor structure in DGP-IFE-L, as also discussed in Subsection (ref).

table[table omitted — 1,927 chars of source]

Testing for parallel trends in DID

In this Section we evaluate the performance of the proposed test when the null hypothesis is the presence of a common trend between treated and untreated units. We generate data from the linear model:

eqnarray*[eqnarray* omitted — 177 chars of source]

where $\xi_{i} \sim N(1,1)$, the coefficients $\theta = (\theta_1, \theta_2)'$ are both equal to 1, $\zeta_t \sim N(1,3)$ and $\varepsilon_{it}$ is an idiosyncratic standard normal error term. We refer to this DGP as DGP-DID-0. After the de-meaning procedure, DGP-DID-0 traces back to a model where unobservable traits are time-varying.

Under the alternative hypothesis we generate data according to the following model:

eqnarray[eqnarray omitted — 260 chars of source]

where $D_i=1$ for a proportion $p=0.5$ of treated individuals and 0 otherwise, while $\delta_1=1$ and $\delta_2=2,3$. In this way, we generate two different trends for treated and untreated units, ending up in a simplified version of a model with heterogeneous trends: in this light, it can be seen as a factor model with two individual-specific loadings, $\delta_1$ and $\delta_2$. We refer to this DGP as DGP-DID-1. For each experiment, we consider $N = 10,20$, $T = 50$, and $199$ bootstrap draws in $1000$ Monte Carlo replications.

Table (ref) reports results of the simulation study: the left part of the table refers to the size analysis, while the right part refers to the power analysis. We report results for the two versions of the test statistics, the centered (“JK H”) and the uncentered (“Unc. H”). The centered version of the Hausman test exhibits a uniform p-value between experiments. Using second moments in the clustering procedure may introduce noise, resulting in the identification of a greater number of groups than there actually are. We find that the choice of $\gamma=1$ is optimal, as it helps alleviating the noise, keeping under control the number of groups.\footnote{We conjecture that the noise tends to disappear as the $N,T$ dimensions grow larger. In unreported simulations available upon request, we find that smaller values of $\gamma$ lead to a slightly non-uniform p-value.}. We highlight that, in this setting, the test requires a large $T$ dimension in order to achieve proper size control. Conclusions drawn on the uncentered test statistics are, instead, not reliable.

Finally, the test exhibits good power properties, increasing in the difference between the two factor loadings $\delta_1$ and $\delta_2$.

table[table omitted — 1,691 chars of source]

Empirical applications

We evaluate the proposed test on real data in two applications, one concerning determinants of housing prices, the other concerning intertemporal decisions on labor market participation of working women.

Determinants of housing prices

In this section we evaluate the proposed test by revisiting the empirical application on housing prices in holly2010spatio. This study argues that accounting for a factor structure for unobservable traits gives a better understanding of determinants of housing prices in the U.S. These conclusions are confirmed by an extended study which examines housing data at a metropolitan level baltagi2014further. Similar findings are reported in the empirical section of freemanweidner2023, where the Authors use the giglio2016no’s dataset on housing market. The presence of critical events, such as the financial crisis in 2008 may introduce structural breaks, suggesting the adoption of a factor structure in the specification. The outcome variable in exam is the growth rate of the housing price index for $N=49$ States, observed for $T=35$ time occasions, from 1977 to 2011. We observe additional covariates such as the growth rate of population, the US State real cost of borrowing, net of real house price appreciation/depreciation and the inflation rate.

Table (ref) reports results for the estimation of a linear model. We report estimated coefficients for FE, jackknife, TW-GFE with $\gamma=1$ and its jackknife version. Moreover, we report the estimated coefficients for the IFE estimator Bai2009 with $r=1$ factor. Let us start from the second panel of Table (ref), reporting the outcome of the test: the proposed test rejects the null hypothesis of time-invariant heterogeneity. The first panel in Table (ref) shows the different outcomes of estimation: real cost of borrowing and inflation are deemed statistically significant by all estimation methods, while the population is recognized as significant by none of them, but the TW-GFE jackknife. The real cost of borrowing is associated to a decrease of the growth rate of housing price index, while the inflation has a strong positive effect.

table[table omitted — 1,523 chars of source]

A model for determinants of inter-temporal occupational decisions of working women

We apply the proposed Hausman test on a popular dataset concerning inter-temporal labor supply decisions of women, employed in many studies fernandez2009fixed,dj2015. Data are relative to the employment status of $N=1461$ married women aged between 18 and 60 years in 1985, whose husbands were always employed in the period 1980-1988 (T=9) (PSID waves 15-22). Studies on relationship between fertility and employment make use of standard nonlinear models with specifications that include one or more lags of the occupational status hyslop1999state. We estimate a static logit model and compute the proposed test comparing the FE estimator with fixed effects at individual level and the TW-GFE. Due to the assumptions on TW-GFE we can not estimate a dynamic model, while we include all the other variables described in the empirical application in dj2015: the number of kids of different ages and the logarithm of the yearly income of the husband. Table (ref) reports results of the estimation, together with the outcome of the Hausman test. The first two columns refers to the one-way fixed effects. We present the results of the TW-GFE estimation using three values of $\gamma=0.2,0.5,1$, corresponding to a decreasing number of groups found in the data by the k-means algorithm. The proposed test fails to reject the null hypothesis of time-invariant heterogeneity, meaning that a logit model with individual fixed effects gives right quantification of the parameters of interest. This suggested specification for the unobserved heterogeneity is in line with that mostly used in the labour economics literature.

As for the estimated coefficients, they are all in line with economic intuition: the presence of small children and a high income of the husband are negatively associated with the labor force participation. Moreover, the coefficients associated to children in age 0-2, children in age 3-5 and the income of the husband are statistically significant for all estimators (but for the TW-GFE with $\gamma=1$ for the income).

table[table omitted — 1,895 chars of source]

Final remarks

We propose a specification test for the form of the unobserved heterogeneity in panel data models. The test is based on the recently proposed TW-GFE approach and serves to detect departures from the commonly assumed time-invariant specification.

The main advantage of our proposal is that it allows practitioners to avoid the specification and estimation of models with complex forms of time-varying heterogeneity, which might pose identification and computational problems in both linear and nonlinear models. By contrast, the TW-GFE approach is a rather simple non-iterative two-step strategy, involving unsupervised clustering in the first step and estimation of group effects in the second. The proposed approach is a Hausman test constrasting the ML and TW-GFE estimators. We show that, under the null hypothesis of time-invariant effects, the TW-GFE estimator is equivalent to the OW-GFE, implying that the Hausman statistic has asymptotic $\chi^2$ distribution. This distribution is however non-centered because of the bias arising from incidental parameters, for both the ML (at least in the non-linear case) and TW-GFE estimators, and from the approximation error induced by the discretization of the unobserved heterogeneity, that arises with the GFE approach. We make the statistic pivotal by reducing the bias of the vector of contrasts with leave-one-out jackknife. Parametric bootstrap is then used to estimate the variance of the vector of contrasts.

The two empirical applications considered suggest that the test is reliable with real world data and suggest specifications for unobserved heterogeneity in line with the relevant literature. Finally, the proposed test also emerges as a viable alternative to existing procedures with short panel datasets and can also be applied to test for the common trend assumption in the DiD setting.

Acknowledgments

Claudia Pigini and Alessandro Pionati would like to acknowledge the financial support by Project Title: “The use of the Grouped Fixed Effects estimator in panel data analysis addressing unobserved heterogeneity”, financial coverage D.D. MUR 47/2025, CUP I33C25000280001.