Template-Type: ReDIF-Paper 1.0 Series: Tinbergen Institute Discussion Papers Creation-Date: 2024-08-22 Number: 24-052/III Author-Name: Igor Custodio João Author-Workplace-Name: Vrije Universiteit Amsterdam Title: Testing for Clustering Under Switching Abstract: I refine the test for clustering of Patton and Weller (2022) to allow for cluster switching. In a multivariate panel setting, clustering on time- averages produces consistent estimators of means and group assignments. Once switching is introduced, we lose the consistency. In fact, under switch- ing the time-averaged k-means clustering converges to equal, indistinguishable means. This causes the test for a single cluster to lose power under the alternative of multiple clusters. Power can be regained by clustering the N times T observations independently and carefully subsampling the time dimension. When applied to the empirical setting of Bonhomme and Manresa (2015) of an autoregression of democracy in a panel of countries, we are able to detect clusters in the data under noisier conditions than the original test. Classification-JEL: C12, C33, C38 Keywords: File-URL: https://papers.tinbergen.nl/24052.pdf File-Format: application/pdf File-Size: 2.283.508 bytes Handle: RePEc:tin:wpaper:20240052