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.
41,712 characters · 16 sections · 39 citation commands
Blocked Clusterwise Regression
We often believe that there may be significant cross-sectional heterogeneity in the structural relationship between observed covariates and response. Even with panel data, however, estimating distinct regression coefficients for each cross-sectional unit can be noisy or infeasible when the time dimension is small. Clusterwise regression methods (e.g. LinNg2012, BonhommeManresa2015), which model individual heterogeneity as a function of a one-dimensional discrete latent type, have recently become popular as a viable compromise between the common parameter assumption and full heterogeneity. However, as we show, this discretization of heterogeneity can be badly misspecified even when the panel has significant cross-sectional structure. By introducing multiple, imperfectly correlated latent types, we can relieve this issue and significantly enrich the set of panel structures that can be handled by clustering methods. In particular, our approach is motivated by a class of data-generating processes where units are clustered along multiple latent dimensions or “response-types” to distinct blocks of the covariate vector. We motivate this generalization with several examples from finance and production function estimation. The main contribution of this paper is to modify existing clustering methods for use in this larger family of models and show that they can likewise be used to perform inference on regression parameters. \\
Following BonhommeManresa2015 (henceforth BM), we establish consistency and asymptotic normality for a k-means style estimator in our setting. The estimation algorithm is iterative and alternates between (1) solving a least-squares problem to estimate cluster parameters for each block and (2) updating latent types for each cross-sectional unit based on a unit-wise predictive criterion. As in BM, our proof proceeds by establishing asymptotic equivalence with the oracle estimator where each unit's latent types are known. We extend the approach in AndoBai2016 to give a $C_p$ style information criterion to choose the number of clusters (types) for all the latent variables simultaneously. \\
In general, the true number of clusters in a given data set is unknown. Thus, the behavior of estimators with a misspecified number of clusters is important both for model selection theory as well as for our understanding the finite-sample properties of clustering estimators. Here, we make some contributions to the theory of models with an over-specified number of clusters, improving the convergence rates given in LiuOverspecifiedGroups for the linear regression setting. In contrast to the well-specified case, difficulty obtaining the “fast rate” $O_p(\frac{1}{NT})$ when we over-specify the number of clusters suggests that over-fitting may be severe when the number of clusters is over-specified. We conjecture that $\sqrt{T}$-consistency may be optimal for over-specified models.
Consider panel data on firms' production levels and factor usage. We are interested in estimating the firm-specific production functions
where $y_{it}$ is a measure of output and $L_{it}, K_{it}, M_{it}$ are labor, capital and materials (all in logs), and $\text{Elec}_{it}$ is a measure of electricity usage. Suppose that the heterogeneity in factor elasticities can be well approximated by \[ \theta_{i\ell} \in \{\theta^{low}_{\ell}, \theta^{mid}_{\ell}, \theta^{high}_{\ell} \} \quad 1 \leq \ell \leq 4 \]
Ignoring endogeneity in input choice, we consider estimation of (ref) with clusterwise regression. The problem with this approach is readily apparent - although each firm can only have one of $3 \cdot 4 = 12$ elasticity types, $\theta_i$ can take up to $3^4 = 81$ distinct values. Thus, estimating this model with clusterwise regression would require $k=81$ clusters to be well-specified. For a panel of $200$ firms, this would lead to estimation with approximately $N/81 \leq 3$ firms in each regression, in spite of significant cross-sectional homogeneity. However, with $k=81$ clusters the model is also significantly over-parameterized. For instance, there will be $27$ distinct clusters with each level of labor elasticity coefficient. \\
The problem is that current clustering models assume limited heterogeneity in the individual parameter vectors $\theta_i$. In our example, however, cross-sectional heterogeneity takes the form of a few discrete elasticity levels for each input factor, while the support of $\theta_i$ itself is large. This suggests a model with multiple latent heterogeneity types. For instance \[ \theta_i = (\theta_1(c_{i1}), \theta_2(c_{i2}), \theta_3(c_{i3}), \theta_4(c_{i4})) \] with latent type $c_{i\ell}$ for $1 \leq \ell \leq 4$ controlling the elasticity level of factor $\ell$.
Early contributions to the econometric literature on clustering include Sun2005 and BuchinskyHotz2005. Linear panel data models with discrete unobservable heterogeneity have recently been studied in LinNg2012, BonhommeManresa2015, Su2016, Su2016Homogeneity, DzemskiOkui2018. Our asymptotic normality results for the well-specified case closely follow the analysis pioneered in BonhommeManresa2015. AndoBai2016 extends clustering methods to linear factor models and gives an information criterion for choosing the number of clusters. We develop a similar $C_p$-style criterion in our setting. Outside of the linear case, Zhang2019 and Chen2019 study clustered linear conditional quantile regression, and BonhommeManresa2019Discretizing considers discrete latent types as an approximation to continuous unobserved heterogeneity. LiuOverspecifiedGroups studies clustering in M-estimation with an over-specified number of groups. We build on their techniques and significantly sharpen their rate results for the linear case. In contemporaneous work, Cheng2019 consider a clustering model with two latent types in a GMM setting. By contrast, we allow for $B > 1$ latent types in a linear model with individual fixed effects. Clusterwise regression was initially proposed in Spath1979 as “Algorithm 39 - Clusterwise Linear Regression.”\\
Further afield, this paper is related to a number of literatures in statistics and computer science, such as the literature on clustering functional data, e.g. Wasserman2005CATS, Yamamoto2014, LintonVogt2019, and subspace clustering, e.g. Candes2012. In statistics, related methods include homogeneity pursuit, proposed in Ke2015. See also Ke2016 and Lian2019. In the Bayesian literature, clusterwise regression is also known as multilevel regression; see GelmanHill2007. \\
The paper is organized as follows - we introduce our model and estimator in section (ref). Asymptotic properties of the estimator and consistency of model selection are given in section (ref). Section (ref) discusses models with an over-specified number of clusters. Monte Carlo simulations are given in section (ref), and proofs in section (ref). Supplementary appendix (ref) collects technical lemmas and other ancillary discussions.
Let $y_{it}$ and $x_{it}$ denote repsonse and covariates for $t = 1, \dots, T$ time periods and $i = 1, \dots, N$ cross-sectional observations. The covariate vector $x_{it} \in \mathbb{R}^p$ is divided into $1 \leq \ell \leq B$ blocks $x_{it}^{\ell}$, where $x_{it} = (x_{it}^1, \dots, x_{it}^{B})$, and $B$ denotes the total number of blocks. We let $k = (k_1, \dots, k_{B})$, where $k_{\ell}$ denotes the number of distinct latent types (clusters) associated with the $\ell^{th}$ block. Possible cluster assignments are denoted $c = (c_1, \dots, c_{B}) \in \prod_{\ell} [k_{\ell}] \equiv \mathcal{C}$. For instance, a unit in cluster $1$ in the first block and cluster $3$ in the second block would have $c=(1, 3)$. \\
Each cross-sectional unit belongs to exactly one cluster for each block. We let $\gamma: [N] \to \prod_{\ell} [k_{\ell}]$ denote an assignment of cross-sectional units to cluster vectors, so that $\gamma(i) = c_i$. The set of all possible cluster assignments is denoted $\Gamma$. In the main specification, we assume that the response $y_{it}$ is given by
with the $\ell^{th}$ block parameter selected by the latent variable $c_{i\ell}$
Thus, each covariate grouping $\ell$ is associated with $k_{\ell}$ parameter sub-vectors with $\theta_{\ell}(c_{\ell}) \in \mathbb{R}^{d_{\ell}}$. Our goal is to jointly estimate the true parameter $\theta^0$ and true cluster assignments $\gamma^0(i) = (c^0_{i1}, \dots, c^0_{iB})$ of each cross-sectional unit. In appendix (ref), we also give results for the model with individual fixed effects
\quad \\ Relationship with Clusterwise Regression: The model above nests clusterwise regression (as in LinNg2012) when $B=1$. For $B > 1$, it is statistically equivalent to clusterwise regression when the conditional pdf $\mathbb{P}(c^0_{i(-\ell)} | c^0_{i\ell})$ is degenerate (perfectly correlated types). Similarly, clusterwise regression ($B=1$) with exponentially many clusters $k = \prod_{\ell=1}^{B} k_{\ell}$ and exponentially many constraints nests our model. For instance, let $p=B$ and assume $\theta_{\ell} \in \{\pm 1\}$ for each $\ell$. Then our model would be equivalent to a clusterwise regression model with $2^p$ clusters and $p2^{p-1}$ linear equality constraints. \\
Example - Exchange Rates: Consider financial market data with $y_{it}$ the exchange rate against USD of country $i$ at time $t$, $p^{oil}_{t}$ the price of crude oil, $b_{it}$ a measure of the country's business cycle and $r_{t}$ the US discount rate, we model \[ y_{it} = \theta_{i1} p^{oil}_{t} + \theta_{i2} b_{it} + \theta_{i3} r_{t} + e_{it} \] Due to differences in national industry composition, the magnitude and composition of foreign trade, financial openness and so on, we may expect heterogenous marginal responses $\theta_{i \ell}$ of $y_{it}$ to each of the factors above. As in the introduction, we may model $\theta_{i\ell} \in \{\theta_{\ell}(1), \dots, \theta_{\ell}(k_{\ell})\}$, corresponding to $k_{\ell}$ different sensitivity levels to factor $\ell$. However, we don't expect these unobserved types to be perfectly correlated across factors. For instance, we might expect both Venezuela and China to have large $\theta_{i1}$ but very different $\theta_{i3}$. A factor error structure could be accommodated using the techniques in AndoBai2016.
We define our estimator of the parameter $\theta^0$ and cluster assignment $\gamma^0$ as
We let $\widehat{Q}(\theta, \gamma)$ denote the sample risk in (ref). There are many algorithms available for the least squares partitioning problem above\footnote{See, for instance, the discussion in BM Appendix S1.}. One benchmark approach, known as Lloyd's algorithm (Lloyd1982) in the setting of k-means clustering, takes a coordinate ascent approach to the problem in (ref), alternately updating the parameters $\theta$ and assignments $\gamma$ until convergence. \\
Lloyd's Algorithm - Fix a division of the covariate vector $x_{it} = (x_{it}^1, \dots, x_{it}^{B})$ into blocks with $x_{it}^{\ell} \in \mathbb{R}^{d_{\ell}}$ and fix the number of clusters $k = (k_1, \dots, k_{B})$ in each block. Our approach is a modification of Lloyd's algorithm for k-means clustering. We perform coordinate ascent on the sample objective $\widehat{Q}(\theta, \gamma)$ by alternating parameter updates and cluster assignment updates until convergence. \\
(1) Randomly initialize parameters $\theta^1$ and cluster assignments $\gamma^1$. \\ (2) Given $\theta^s$, set $\gamma^{s + 1} = \operatorname*{argmin}_{\gamma \in \Gamma} \widehat{Q}(\theta^s, \gamma)$. \\ (3) Given $\gamma^{s + 1}$, update $\theta^s \to \theta^{s + 1}$. \\ (4) Repeat (2) and (3) until convergence. \\
Since problem (ref) is not generally convex, we repeat steps (1) through (4) from different random initializations (in parallel), and take the estimate that achieves the lowest sample risk $\widehat{Q}$. See appendix (ref) for more discussion of the implementation of this algorithm and related computational issues.
In this section, we investigate the asymptotic properties of the estimator $(\widehat{\theta}, \widehat{\gamma})$ defined above as $N, T \to \infty$. In what follows, we assume the data is generated from the model (ref) with $(\theta^0, \gamma^0)$ the true slope parameters and cluster assignment function. We let $\| \cdot \|$ denote the usual Euclidean norm.
Assumption (ref) is the usual parameter space compactness condition. Assumption (ref) can be seen as limiting the time-series dependence of errors and covariates, averaged over cross-sectional units. Condition (ref) ensures that the clusters within each grouping are non-identical. The final assumption (ref) is the analogue in our setting of assumption S2(a). in BM. This condition is used to ensure curvature of the sample risk function $\widehat{Q}$. If there is a common parameter ($B = 1$, $k = 1$), this is the usual non-collinearity condition for pooled panel regression. See section (ref) in the appendix for further discussion, as well as section S4.2 in the supplementary appendix of BM.\\
Cluster Label Ambiguity. The minimizer $\operatorname*{argmin}_{\gamma \in \Gamma, \theta \in \Theta} \widehat{Q}(\theta, \gamma)$ is only unique up to permutations of the labels in $\mathcal{C}$ and their associated parameter vectors in $\theta$. Thus, the $c \in \mathcal{C}$ used to label estimated clusters in each block is arbitrary, and to resolve this ambiguity we need to fix a correspondence $\sigma_{\ell}: [k_{\ell}] \to [k_{\ell}]$ between true and estimated cluster parameters for each $\ell$\footnote{ Note that, for finite $T$, it can be the case that $\widehat{\theta}(\widehat{c}_i) \not = \widehat{\theta}(\widehat{c}_j)$, but $c_i^0 = c_j^0$, so the estimates $\widehat{\theta}(\widehat{c}_i)$ do not in general induce a well-defined estimator of any fixed cluster parameter $\theta^0_{\ell a}$.}. Let
and define the estimator of the true parameter $\theta^0_{\ell a}$ to be $\widehat{\theta}_{\ell \sigma({a})}$. Note that this is infeasible without access to the true parameters $\theta^0$.
By the lemma, we can relabel the estimated clusters $\widehat{\theta}_{\ell \sigma(a)} \to \widehat{\theta}_{\ell a}$, and this is well-defined w.h.p as $N, T \to \infty$.
See section (ref) for the proof of the theorem and lemma.
In this section, we establish asymptotic equivalence of $\widehat{\theta}$ to the infeasible oracle estimator with known clusters. We need the following assumptions in addition to those already stated in (ref).
We will show that $\widehat{\theta}$ is asymptotically equivalent to the infeasible oracle estimator where true cluster membership $c_i^0$ is known for all $i$. Define the problem
The following theorem shows that $\widehat{\theta}$ and $\Tilde{\theta}$ are asymptotically equivalent.
See appendix (ref) for the proof. Because of this theorem, for asymptotic sequences with $N$ growing at a sub-polynomial rate relative to $T$, it suffices to characterize the asymptotic distribution of the estimator $\Tilde{\theta}$.
Notation - To aid the exposition, we start with a few definitions. For $A \in \mathbb{R}^{p \times q}$, let $\operatorname{vec}(A) \equiv ((A^1)', \dots, (A^q)')' \in \mathbb{R}^{pq}$. Thinking of $\theta = \{\theta_1, \dots, \theta_{B}\}$ as a collection of matrices $\theta_{\ell} \in \mathbb{R}^{d_{\ell} \times k_{\ell}}$, we denote $\operatorname{vec}(\theta) = (\operatorname{vec}(\theta_1)', \dots, \operatorname{vec}(\theta_{B})')' \in \mathbb{R}^{d_{\theta}}$, where $d_{\theta} \equiv \sum_{\ell} k_{\ell} d_{\ell}$ is the total dimension of $\operatorname{vec}(\theta)$. For $1 \leq \ell \leq B$ and $a \in [k_{\ell}]$, we use the block index convention that $\operatorname{vec}(\theta)_{\ell a}$ refers to the $d_{\ell}$ dimensional sub-vector in the $a^{th}$ position of the $\ell^{th}$ block. Using the notation above, for $1 \leq \ell, s \leq B$ and $a \in [k_{\ell}]$, $b \in [k_s]$ define $\widehat{M} \in \mathbb{R}^{d_{\theta} \times d_{\theta}}$ and $v \in \mathbb{R}^{d_{\theta}}$ by
The proof follows by taking the first order conditions of (ref) and rearranging. Note that the first order conditions $\nabla_{\theta_{\ell a}} \Tilde{Q}(\Tilde{\theta}) = 0$ can potentially vary with all the other parameters $\theta_{sb}$ in the model (for $s \not = \ell$). Therefore, in contrast to the $B = 1$ case considered in the existing literature, the estimator $\Tilde{\theta}$ is not equivalent to simply running $k$ separate regressions over the partition of the cross-sectional units. \\
Consider the following assumptions that allow us to characterize the asymptotic distribution of the infeasible $\Tilde{\theta}$.
The proof of this theorem is given in appendix (ref). \\
Consider the case where cross-sectional units are independent, then under assumption (ref), the terms in (ref) with $i \not = j$ vanish. In this case, we propose the HAC estimators
where $\widehat{M}$ is as in equation (ref). Variance estimators of this form were originally proposed in Arellano1987, and their asymptotic theory for $N, T \to \infty$ jointly was first analyzed in Hansen2007Robust. For further discussion on adapting the results of Hansen2007Robust to our setting, see appendix (ref).
In this section we let $k^0 = (k_1^0, \dots, k_{B}^0)$ denote the true number of clusters and develop a Cp-like criterion to estimate $k^0$. We suppose that prior information can be used to bound the true number of clusters from above $k^0 \leq k_{max}$. So far, we have defined the sample risk $\widehat{Q}(\theta, \gamma)$ with domain the true parameter space i.e. $\theta \in \prod_{\ell} \mathbb{R}^{d_{\ell} \times k^0_{\ell}}$ and $\gamma: [N] \to \prod_{\ell} [k^0_{\ell}]$. However, note that $\widehat{Q} = \frac{1}{NT} \sum_{i, t} (y_{it} - x_{it}'\theta(\gamma(i)))^2$ only varies through $\theta(\gamma(i)) \in \mathbb{R}^p$. Thus, we can extend the domain of $\widehat{Q}$ to models with $k \not = k^0$, since $\theta(\gamma(i)) \in \mathbb{R}^p$ for any conformable $(\theta, \gamma)$.\footnote{Formally, let $\widehat{Q}: \bigcup_{k \geq 0} \left \{\prod_{\ell} \mathbb{R}^{d_{\ell} \times k_{\ell}} \times [\, [N] \to \prod_{\ell} [k^0_{\ell}]\, ]\right \} \to \mathbb{R}_{\geq 0}$ with $\widehat{Q}(\theta, \gamma) = \frac{1}{NT} \sum_{i, t} (y_{it} - x_{it}'\theta(\gamma(i)))^2$}\\
We slightly strengthen some assumptions above
We can think of assumption (ref) as stating that a CLT holds for $e_{it} x_{it} \mathds{1}(c_i^0 = c)$ for each $c \in \mathcal{C}^{k_0}$. This will be easiest to satisfy when $E[e_{it} x_{it} \mathds{1}(c_i^0 = c)] = 0$, a stronger form of unconfoundedness. Assumption (ref) is the extension of assumption (ref) in our consistency proof to the case of models with misspecified number of clusters. See section (ref) of the supplementary appendix for a discussion of this condition. In the stationary case with identically distributed cross-sectional units, having $E[x_{it} x_{it}']$ of full rank is sufficient for assumption (ref). Finally, assumption (ref) requires that $\log N$ is sub-polynomial in $T$ as $N, T \to \infty$. \\
Information Criterion - Let $(\widehat{\theta}^k, \widehat{\gamma}^k)$ be the minimizer of $\widehat{Q}$ with $(k_i)_i$ clusters and denote $\widehat{Q}(k) = \widehat{Q}(\widehat{\theta}^k, \widehat{\gamma}^k)$. Then we define the $C_p$ criterion
We have the following result on consistency of model selection
For the proof, see appendix (ref).
In this section, we report new results on the performance of k-means style estimators with an over-specified number of clusters. The work in this section builds on and sharpens the results in LiuOverspecifiedGroups for the case of linear regression. Our proof of model selection consistency in Theorem (ref) heavily relies on the following result.
In this section, we describe the results of our Monte Carlo simulations. All tables are reported in section (ref) of the appendix. Throughout, we denote
We use two specifications for the joint distribution $(x_{it}, y_{it})$. (1) Specifications labeled AR(1) take $e_{it} \sim \text{AR}(1)$ and $x_{it} \sim \text{VAR}(1)$. The AR process $e_{it}$ has normal innovations, and $x_{it}$ has multivariate normal innovations with constant, diagonal covariance matrix. The respective autocorrelation parameters are $\rho_e = 0.3$, $\rho_x = 0.5$. (2) Specifications labeled HK use a heteroskedastic design inspired by Hansen2007Robust. With $x_{it}$ as above, we use $e_{it} = \rho e_{it-1} + v_{it} \cdot \sqrt{\frac{1}{2} + \frac{\|x_{it}\|^2}{2p}}$, with independent normal innovations $v_{it}$. Innovation variances are normalized so that $\mathrm{Var}(e_{it}) =1$ for all designs and all $(i, t)$. All simulations use $500$ independent samples. See appendix (ref) for additional details on the computational specification.
Clustering methods have recently become popular as a way of modeling limited heterogeneity in panel data. This paper motivates a family of panel structures, nesting the standard regression clustering model, that have significant cross-sectional homogeneity but are nevertheless ill-suited to estimation by the clustering methods currently considered in the literature We propose a modified procedure that simultaneously clusters on multiple discrete latent types, significantly expanding the set of panel structures that can be accommodated by these methods. We employ Lloyd's algorithm to compute the estimator, and give consistency and asymptotic normality results for the resulting estimates.