Spatiotemporal Statistical Imbalance: A Long-Term Neglected Defect in UN Comtrade Dataset

: The bilateral trade data provided by the United Nations International Trade Statistics Database are some of the most authoritative trade statistics and have been widely used in many research ﬁelds. Here, we propose a new form of inconsistency in its records, namely statistical imbalance, which refers to the phenomenon of inequality between the import or export trade value of a commodity category and the total value of all its subcategories. We investigated the frequency and spatial-temporal patterns of the statistical imbalances of 15 reporters (i.e., Australia, Brazil, Canada, China, France, Germany, India, the Netherlands, the Rep. of Korea, the Russian Federation, Switzerland, the United Arab Emirates, the United States of America, and Vietnam) from 1996–2016 and explored their distributional differences in commodity categories with a co-clustering algorithm. The results show that statistical imbalance is widespread with obvious clustering patterns. Trade records related to speciﬁc categories such as fossil fuels, pharmaceuticals, machinery, and unspeciﬁed commodity categories presented severe statistical imbalances, which may lead to erroneous trade research results. Since statistical imbalance is difﬁcult to detect in studies focusing only on speciﬁc commodity categories, we suggested that researchers should prescreen the data for statistical imbalance to ensure the validity of their results. formal analysis, L.H.; investigation, P.G.; resources, C.S.; data curation, S.Y.; writing—original preparation, L.H. and S.Y.; writing—review and S.Y.; visualization, L.H.; supervision, P.G.; administration, C.S.;


Introduction
In the present era of globalization, trade is an essential component of modern society, and nations have signed bilateral trade agreements to engage in various forms of economic integration. Bilateral trade data have played an increasingly important role in various research fields, such as analyzing trade competition and cooperation among different countries or tracking global ecosystem service flows. The United Nations International Trade Statistics Database (UN Comtrade) is one of the most widely used international trade databases with a high degree of authority and uniformity. The database's records date back to 1962, and the total quantity of records exceeds 3 billion. Over 200 reporting countries provide their annual international trade statistics data detailed by commodities or service categories and partner countries. Trade records are stored according to a classification system based on the category to which the goods belong, with similar goods falling into one large category. These data are subsequently transformed into the United Nations Statistics Division standard format with consistent coding, e.g., Harmonized Commodity Description and Coding System (HS), Standard International Trade Classification (SITC), and Classification by Broad Economic Categories (BEC) and valuation in the data loading process.
UN Comtrade has made significant contributions to multiple research topics and policies, demonstrating the importance of trade records in the governance of economic activities [1,2]. First, UN Comtrade has provided basic data for enhancing the recognition of trade systematic rules and its driving factors. For instance, Veninga et al. investigate the effects of domestic political instability on the wheat trade in Egypt [3]. Oluwatoba et al. evaluate the impact of a Free Trade Agreement (FTA) on South African agricultural trade by using the Poisson Pseudo Maximum Likelihood (PPML) specification of the gravity model [4]. Other studies investigate the effects of FTAs on European agri-food trade [5], Korean seaborne trade [6], and Latin American export diversification [7].
Second, UN Comtrade has provided practical guidance for developing measurement methods of international trade. Complex network analysis has been extensively used to reveal the structures and evolution of trade relationships and interdependencies among trade partners, which are not immediately evident in a straightforward statistical analysis of trade data [8]. For instance, Cristelli quantified export similarity by building distance matrixes for products and countries based on the complex network and then determining the evolution of competitors' communities [9]. Dong constructed wheat-trading competition networks to analyze the impact of climate change on the global trade flows of wheat and then proposed a policy framework to promote a stable and healthy wheat-trading environment [10]. Other optional methods include the gravity model [4,5,11] and the digital trade feature map method [12,13].
Third, UN Comtrade has provided support for depicting global trade patterns and changing processes. Numerous indexes have been proposed to estimate the trade relationships (e.g., comparative advantage, complementarity, similarity, and technical complexity) of specific commodities or industry chains among different countries. For instance, Zheng calculated and compared the technical sophistication index and its regional heterogeneity of new energy products and new energy industries among 30 countries [14]. Cao measured the evolution of the technical complexity of China's export environmental goods and its position in the international industrial value chain [15]. Hao analyzed the overall characteristics of the iron ore importing competition pattern, the import competition region, and the main importing countries [16]. Xu calculated the trade competitiveness index and investigated the impact of Chinese textiles on UK imports [17].
Fourth, UN Comtrade has been used increasingly more widely as a medium for other themes, such as global ecological protection [18][19][20][21], pollution prevention [22], energy management [23], and national security [24]. Moran calculated the embodied ecological footprint of specific countries exerted inside the borders of their trading partners [25]. A similar method was also used to analyze the historical terms of trade in footprint units of key agricultural commodities traded between the US and Britain during the 19th century [21]. To enrich the conceptualization and policy discussion of global electronic waste, Lepawsky quantified the magnitude and direction of this trade between 206 territories in over 9400 reported trade transactions from 1996 to 2012 [22]. Dalin combined agricultural trade flows with province-level estimates of commodities' virtual water content to build China's domestic and foreign virtual water trade network and then analyzed the virtual water flow patterns as well as the corresponding water savings [20]. Meyfroidt proposed that assessments of countries' contributions to reforestation and carbon emission reductions should integrate the geographic displacement of forest clearing across countries through trade in agricultural and forest products and calculated the percentage of net wood trade offset to the total reforested area of specific countries when both agriculture and forestry sectors are included [19]. Chen evaluated the energy security of Kazakhstan and Turkmenistan (as exporters) and Kyrgyzstan (as importers) according to correlation, diversity, and the impact of international relations using energy trade data from the UN Comtrade [23].
Despite the universality and authority in applications, UN Comtrade is inconsistent because its data sources are compiled on a different country-of-origin basis without continuous observation. A typical form of this inconsistency is referred to as "bilateral asymmetries", which occur when the reported exports from country A to country B do not match the reported imports to country B from country A. "Bilateral asymmetries" create incomparability and detract from the usefulness of such trade data for some types of economic analysis. Veronese et al. empirically validated the bilateral asymmetries and discussed the reasons for it in the Mediterranean partner countries [26]. Markhonko then summarized several main reasons for bilateral asymmetries, including "application of different trade systems in data compilation", the "time lag between exports and imports", and "imports and exports are respectively reported in CIF-type and FOB-type values" [27]. Bousey compared Canada's and China's bilateral trade data and analyzed major sources of asymmetry [28]. United Nations Statistics Division in 2019 discussed ways to measure, analyze, and reduce bilateral asymmetries [29]. In contrast, we find another form of inconsistency through integrity checks of merchandise trade data and refer to it as "statistical imbalance", which can be described as the reported exports or imports of a specific commodity category not matching the summation of their all subcategories. Since data perfection has not received enough attention from researchers for a long time, few studies have focused on this form of inconsistency. This may lead to large deviations in research results if we neglect this phenomenon. To fill this gap, we sorted out and discussed the patterns, reasons and possible responses to "statistical imbalance".
In this paper, we firstly introduced the data and methods we used in Section 2, including the details of data acquisition and processing in our automatic ETL application program, as well as spatiotemporal judgment matrix for analyzing statistical imbalances and how to construct it. Then, we introduced and discussed the co-clustering algorithm. In Section 3, we calculated the occurrence frequency of statistical imbalance and its spatiotemporal distribution pattern by clustering reporters, partners, and years. We separately showed the patterns of the statistical imbalance in annual trade volume and commodity categories organized by HS 2-digit code using the co-clustering algorithm. What is more, we analyzed the results in Section 4 and discuss the causes of the statistical imbalance and limitations of our research. Finally, in conclusion, we summarized the results and proposed several strategies for reducing statistical imbalance. Overall, the statistical imbalance is a flaw in the data. These differences range from a few dollars to billions of dollars and have a very wide distribution in the UN Comtrade database. While it is acceptable to ignore some small discrepancies, we should be wary of the threat that serious and extreme ones which may pose to the accuracy and reliability of the study in relevance. If a researcher happens to use these data without noticing its imperfection, it may lead to conclusions that are contrary to the facts or incomparable between studies. Compared to bilateral asymmetries, severe statistical imbalances are no less significant in terms of trade volume, but have long been underappreciated. We hope our research can provide references for UN Comtrade data selection and integrity checks as well as help UN Comtrade to have a more profound impact in the new era of digital governance [30,31].

Data
Trade statistics are big data with long time series. On this basis, to explore the occurrence frequency and spatiotemporal pattern of the "statistical imbalance" phenomenon, a Python scrapy-based ETL application program has been developed to rapidly extract annual bilateral commodity trade records (unit: USD) of 15 reporters (i.e., Australia, Brazil, Canada, China, France, Germany, India, the Netherlands, the Rep. of Korea, the Russian Federation, Switzerland, the United Arab Emirates, the USA, and Vietnam) from 1996-2016. The selection of reporters has considered several factors such as geographical position, scale of foreign trade, commodity category, and social and economic development. All of these factors may have an impact on the accuracy, richness, and quality control of trade records. These countries have relatively complete and representative trade data for the period from 1996 to 2016, which can avoid errors due to uncertainty. Moreover, because the volume of UN Comtrade data is very large, analysis using all of the data is difficult to achieve, while some of the representative data are sufficient to efficiently obtain meaningful conclusions. For each reporter, its corresponding partners are set as all countries and regions except itself. All the commodity categories are organized with consistent and nested HS (The Harmonized Commodity Description and Coding System) rules, including HS 2-digit codes, HS 4-digit codes, and HS 6-digit codes. The HS 2-digit codes correspond to 99 commodity categories. The HS 4-digit codes and HS 6-digit codes are generated from further subdivision of HS 2-digit codes and HS 4-digit codes, respectively. The HS 6-digit codes comprise approximately 5300 commodity categories.
The logical execution process of the ETL application program is listed as follows (see Figure 1): Step 1. Data request URLs (Uniform Resource Locator) have been constructed automatically by adjusting reporters, partners, years, trade flow types (i.e., imports and exports), and HS codes. Then, for each URL, steps 2-4 were executed independently.
Step 2. Check if the URL has already been successfully executed: if yes, go to the next URL and restart step 2; if no, request the URL, obtain the records, and proceed to step 3.
Step 3. Check if the records are successfully acquired. If yes, load the records to the database, record the URL, and proceed to step 4; if no, rollback the task, record the error URL in the error log file, go to the next URL, and return to step 2.
Step 4. Check if all URLs have been executed: if yes, end the traversal; if no, go to the next URL and return to step 2.
The above process should be executed multiple times until no error URL has been recorded. The development and use of ETL applications have greatly improved the efficiency of data downloading, while avoiding errors that can occur due to duplication and omissions. In addition, one manual strategy was integrated into the data extraction process to check for unexpected data errors (omissions, repetition, and unreadable data) and guarantee the integrity of the data. Using the strategy, multiple records were randomly extracted to compare with the results obtained manually from the UN Comtrade official website. A total of 44,659,097 trade records were filtered as experimental data, including 2,232,953 HS 2-digit-code records, 12,173,521 HS 4-digit-code records, and 30,252,623 HS 6-digit-code records.

Data Spatio-Temporal Judgment Matrix for "Statistical Imbalance"
In theory, for commodity trade records with a specific reporter, partner, year, and trade flow type, the total trade volume of all commodity categories organized by HS 2-digit codes should be equal to that of the commodity subcategories organized by HS 4-digit codes. However, in practice, there are probably some differences between them, which can be treated as "statistical imbalance". The estimation of these differences in export trade statistics has been formulated as (1), for example. In the equation, i and j, respectively, represent the reporter and partner, k is the year, and m and n represent specific commodity categories organized by HS 2-digit code and HS 4-digit code, respectively. V EXPi,j,k,m represents the corresponding export trade volume of commodity m. DV EXPi,j,k represents the degree of export imbalance between reporter i and partner j in year k. Furthermore, since imbalanced features express huge differences as the condition changes, DV EXPi,j,k has been converted to LG EXPi,j,k using (3). In addition, imports and exports are exactly similar.
LG EXPi,j,k = DV EXPi,j,k DV EXPi,j,k log 10 DV EXPi,j,k + 1 Spatiotemporal judgment matrixes were constructed to intuitively express the distribution of imbalanced features and its relation to reporter, partner and year conditions, as Table 1 show. Row names are unduplicated groups of reporters-years, and column names are lists of partners. Table elements are in accordance with LG EXPi,j,k . On that basis, reporter-partner-year groups with conspicuous export imbalances (judgment criteria: LG EXPi,j,k > 4) were extracted. In addition, for each group, the export imbalance DV EXPi,j,k,m of each HS 2-code-based commodity category m (m = 1, 2, . . . , 99) is calculated by using the total exports of HS 4-code-based commodity subcategories belonging to it (i.e., C_HS4) minus that of its further subdivided HS 6-code-based commodity subcategories (i.e., C_HS6), as (3) shows. On that basis, another spatiotemporal judgment matrix (E-STJM-HS2C) was constructed by taking reporter-partner-year groups as rows and HS 2-codes as columns to present the impacts of commodity categories on export imbalance features, as Table 2 shows. Table elements LG EXPi,j,k,m are converted from DV EXPi,j,k,m through (4). Moreover, cases in imports and exports are exactly similar.

Co-Clustering Algorithm
After identifying the statistical imbalance in the data, we would like to further explore whether it shows some pattern. As one of the most common methods of data mining, clustering classifies data and finds information by measuring the similarity of attributes, structures, and information within data, which can efficiently extract patterns and effective information because of its characteristic of considering data elements at a high level of abstraction [32]. Moreover, clustering is very suitable for tasks involving processing large amounts of data [33]. Different from traditional one-way clustering that only uses data objects or attributes as features to perform similarity calculations, co-clustering algorithms equally consider data objects and attributes while clustering [34] so that their results are more meaningful. To date, co-clustering has been well developed and applied in many fields and works [33], [35][36][37]. Considering its ability to identify and classify features quickly and efficiently for large amounts of data, the co-clustering algorithm was applied to analyze the distribution characteristics of the bilateral trade data statistical imbalance in all countries (or areas), years, and commodity categories in our study. Rows of the spatiotemporal judgment matrix proposed above have been treated as data objects (combination of reporter and year or reporter, partner, and year) and columns as attributes (partner or commodity code).
The process is based on the Bregman block average co-clustering algorithm with I-divergence [36]. The process of running the algorithm is shown in Figure 2. First, the co-clustering algorithm randomly maps data objects and attributes to different clusters and generates the co-clustered data matrix as initialization. Then, the differences between the original matrix of statistical imbalance O SU and the newly generated co-clustered matrixÔ SU are determined according to I-divergence, where D I (O SU ||Ô SU ) represents the I-divergence between O SU andÔ SU . Next, the algorithm updates the mapping from data objects and attributes to the corresponding clusters through an iterative process, that is, the algorithm assigns different combinations of reporters and years (or reporters, partners, and years) and partners (or commodity codes) to the closest set to minimize the loss until its value reaches a local minimum or falls below a predetermined threshold. Since the global optimal result is difficult to determine, this process may be repeated in multiple initial random mappings to produce the best possible co-clustering result. Finally, the rows and columns of the original matrix are exchanged, putting the rows and columns belonging to the same cluster together to make a reordered data matrix, based on the results of the co-clustering algorithm.

Spatio-Temporal "Statistical Imbalance" of Annual Trade Volume
The "statistical imbalance" of import and export volumes between different reporters and partners in different years have been estimated according to the equations mentioned above. Empirically, we grouped every two orders of magnitude of statistical imbalance. The probability distributions in different ranges are shown in Table 3. The table shows that the statistical imbalance is mainly distributed in the range of small absolute values. For instance, the DV I MPi,j,k proportion and DV EXPi,j,k proportion of the range [−10 2 , 10 2 ] are, respectively, 97.899% and 95.836%. However, it is worth noting that the proportions of DV I MPi,j,k = 0 or DV EXPi,j,k = 0 are both less than 65%, indicating that statistical imbalance is widespread, but in most cases, the value is small so that it has little effect on the results of related studies. In addition, DV I MPi,j,k and DV EXPi,j,k have wide ranges of values, and cases of DV I MPi,j,k (or DV EXPi,j,k ) > 0 and DV I MPi,j,k (or DV EXPi,j,k ) < 0 both exist. Therefore, statistical imbalance cannot be simply attributed to missing data. In some cases, the absolute values of DV I MPi,j,k and DV EXPi,j,k are greater than 10 6 or even more extreme, which means that neglecting statistical imbalance may cause serious errors. Comparing exports and imports, the probability of statistical imbalance in exports is higher, and this phenomenon is more common for a severe imbalance ( DV I MPi,j,k or DV EXPi,j,k > 10 6 , where the mod operator means to take the absolute value). Overall, we considered <10 2 to be a small difference and >10 6 (including millions to billions of dollars) as serious differences because, despite their relatively low frequency of occurrence, they are already likely to have a significant impact on the associated trade analysis. Spatiotemporal judgment matrixes of import imbalances and export imbalances were constructed, as shown in Figures 3-6. The missed data (No Data) represents that the reporter country has no trade records with the partner country in a given year, which is out of scope of our study. The statistical imbalance is significantly clustered by reporter. Namely, for a specific combination of reporter and year, their corresponding partners often have similar statistical imbalance characteristics. Severe statistical imbalances are mainly concentrated in a few countries and occur in similar years, including France (1996 and 1998-1999 (2000-2003). However, these cases only cover some of the partners, and their characteristics are inconsistent. Severe export imbalance is more frequent, but the probability of LG I MPi,j,k > 10 is higher than that of LG EXPi,j,k > 10, indicating that import imbalance has a higher probability of extreme situations. Moreover, import imbalance and export imbalance tend to have a strong correlation, but there are exceptions, such as Germany (1996)(1997)(1998)(1999). In addition, the cases where there are no commodity trade records (that is, no data areas) in both matrixes mainly appear on the right side, corresponding to partners that are small regions or islands, such as HMD (Heard Island and McDonald Islands), SGS (South Georgia and The South Sandwich Islands), and VAT (Holy See (Vatican City State)), which is reasonable. The records data of Vietnam and the United Arab Emirates from 1996-2000 is also missing.

Spatio-Temporal "Statistical Imbalance" Divided by HS 2-Codes
To explore the differences in statistical imbalance of reporter, partner, and year on different commodity types, LG I MPi,j,k,m and LG EXPi,j,k,m were calculated using (5)- (8) and were used to construct spatiotemporal judgment matrixes of the import (and export) imbalance of different HS 2-digit-code-based commodity categories (E-STJM-HS2C or I-STJM-HS2C, as shown in Table 3). The results show that the number of elements where LG I MPi,j,k > 4 is 916, and the number of elements where LG EXPi,j,k > 4 is 2300. Then, the Bregman block average co-clustering algorithm with I-divergence (BBAC_I) was applied to E-STJM-HS2C and I-STJM-HS2C to express the congregation characteristics of the statistical imbalance generated by the interaction of reporter-year-partner groups and commodity categories, as Figures 7 and 8 show.        (28)(29), pharmaceutical products (30), chemical products (38), plastics and articles (39), iron or steel articles (72-73), machinery and mechanical appliances (84), and commodities not specified according to kind (99). Figure 8 shows that the clustering structure of E-STJM-HS2C is similar to that of I-STJM-HS2C. The statistical imbalance feature distributions of Cluster A of these two judgment matrixes are consistent with each other, and their corresponding reporters are both Germany (2012-2016). There are more commodity categories in Cluster B that show severe statistical imbalance, and the distribution is more clustered (compared to Figure 7). Furthermore, nearly all negative LG EXPi,j,k,m values are gathered in category 99. The results indicate that the statistical imbalance among different reporters, partners, and years shows spatiotemporal variation with differences according to commodity category. For a certain reporter-year group, its statistical imbalance is usually clustered among several commodity categories, except for Germany 2012-2016, where statistical imbalance covers almost all commodity categories.

Discussion
UN Comtrade provides basic data for research in a number of areas, but trade statistics inevitably exhibit shortcomings of inconsistency due to the complexity of international trade activities and data archiving. Inconsistencies in trade statistics may trigger bias in the results of related studies, and very often such errors are attributed by researchers as being a result of the sample or the methodology, but the data were not given sufficient attention. Typically, the imperfection of trade statistics is widely recognized [38], but the impact of this imperfection on empirical results has not received much attention [39]. Furthermore, although some researchers and organizations have discussed the "bilateral asymmetries" of UN Comtrade data, analyzing the causes and giving some suggestions to reduce their impact [26][27][28][29], few studies have paid attention to the phenomenon of "statistical imbalance" proposed in this study. We think that "statistical imbalance" is more insidious than "bilateral asymmetries". In some cases, the trade value associated with "statistical imbalance" is large, and it may be more damaging to trade studies because it is not easily detectable. In addition, many existing studies referring to imperfections in trade statistics may focus on a specific type of problem or country/region without examining and discussing the dataset as a whole. On this basis, we have studied the UN Comtrade data for multiple representative countries in a long time series and systematically analyzed the spatiotemporal pattern of the "statistical imbalance" phenomenon.
The spatiotemporal judgment matrixes of the statistical imbalance in UN Comtrade show that the distribution of the statistical imbalance exhibits a clear pattern across countries, years, and product types, rather than occurring randomly. Compared to the "bilateral asymmetries" phenomenon, which is characterized by large international trading countries (developed countries) usually having higher absolute trade differences and small trading countries (less developed countries) having higher relative trade differences [38], statistical imbalance is more concentrated in space (country) and time (year). In the period covered by this study , serious statistical imbalance was mainly found in trading countries (e.g., Germany, France, Korea, and Switzerland) and in the early years (around 2000) and involved fossil fuels, chemicals, pharmaceuticals, and iron and steel products, as well as machinery and unspecified commodity categories. The most serious country is Germany with the category "commodities not specified by type" (99), and this is also one of the very few categories with a negative statistical difference. In fact, we think that at some point, for example, when the "commodities not specified by type" has the opposite sign of the difference from the other commodity categories, it could also be a source of statistical imbalance. In addition, there is usually some correlation between statistical imbalance in imports and exports, and they may occur in consecutive years and for similar product categories. Therefore, we recommend conducting statistical imbalance tests prior to the study, especially for high-risk countries, years, and product categories. Methodologically, researchers can first perform a test on a random selection of data and then expand the examination if a statistical imbalance is found. While most trade statistics have no or only mild statistical imbalance that has little impact, a severe and large statistical imbalance such as Germany from 2012-2016 must be given sufficient attention. If there are serious problems with the data, measures should be considered to ensure that the results are authentic and credible, including avoiding countries, years, and commodity categories where statistical imbalance is concentrated; using data from local national sector statistics for corroboration and supplementation; or referring to other datasets and statistics to ensure the reliability of related studies. In general, statistical imbalance deserves attention and, accordingly, data prescreening is more important in cases when trade data are used as the basis for analysis at large spatial and temporal scales, for specific categories of commodities, or for quantitative comparisons with similar studies.
The "statistical imbalance" in UN Comtrade can be attributed to multiple reasons. Numerically, most (more than 90%) of the statistically imbalanced records have small differences in absolute values, and such small differences may be due to errors in the statistical process of the original data. For example, in 2009, Canada provided trade records on imports from France with 2-digit HS codes, and the total annual trade value was $4,950,577,714; however, for 4-digit HS codes, the total annual trade value was $4,950,577,701, with a difference of only $13. The $13 error came from meat products (02) and grains (10), and other product trades have single-digit differences. Furthermore, there are two reasons corresponding to the large difference in statistical imbalance: one is the loss of data items for an entire category, such as 2-digit HS code trade records missing for commodities coded as 99 in German exports to the UK in 2016 (HS-2 < HS-4); and, second, the differences in the trade value of several commodity categories and their accumulation lead to large differences in the total trade value. For example, the total trade value of France's exports to Japan in 1997 differed by more than 100 million US dollars, mainly from the accumulation of the differences in the trade value of powdered industrial products (11), gum and other plant sap (13), miscellaneous foodstuffs (21), and other categories of commodities. Considering that the statistical imbalance does not originate from bilateral trade but from reporters' own trade statistics, we suggest that UN Comtrade should strengthen the inspection of the data interchange process so as to control data from the source or mark the data quality so that institutions or researchers can obtain the corresponding information when using the data.
Finally, our study contains several limitations. First, due to data limitations, we are unable to fully explore the exact causes of statistical imbalance, such as whether the imbalance comes from a reporter's own trade statistics errors or errors in data archiving by UN Comtrade. Moreover, we selected only some of the reporters and did not characterize the spatiotemporal distribution of statistical imbalance globally, the summary of patterns based on only some of the countries, years, and commodity categories with significant statistical imbalances may not be perfect. Finally, we do not specify the quantitative impact of statistical imbalances in related studies of trade analysis, and this may need to be discussed and compared in the context of specific studies. Future work should focus on these aspects in order to help researchers more comprehensively understand and avoid the impacts of such factors on studies.

Conclusions
In this paper, we proposed a new form of inconsistency in the UN Comtrade dataset, namely, statistical imbalance. Statistical imbalance refers to the mismatch between the import or export trade value of a specific commodity category and the total value of all its subcategories. Here, we investigated the frequency of the statistical imbalance phenomenon and its spatial and temporal patterns as well as summarized its distribution differences in commodity categories using co-clustering algorithm. The results indicated that statistical imbalance is widespread in UN Comtrade statistics and that there are clear clustering patterns. For some countries, years, and commodity categories, statistical imbalances occur significantly more frequently. In general, trade statistics of trading countries in early years on fossil fuels, chemicals, iron and steel machinery, and unspecified commodity categories are at higher risk. For these high-risk countries, years, and commodity categories, researchers need to strengthen the testing of data quality when using relevant trade statistics data. For the given reporters and years, reporters' trade with many partners may have similar statistical imbalance characteristics, e.g., the Netherlands' import imbalance in 2012-2015 and France's export imbalance in 1996-1999. This feature may provide a perspective for the rapid detection of statistical imbalances. That is, for reporters with statistical imbalances with some of their trading partners, the accuracy of their trade records with other partners during similar time periods are questionable and need to be examined in a focused manner. In addition, there is a correlation of statistical imbalance between import and export records in some trade statistics, which is also a point of concern. This means that if statistical imbalance is found in the import trade records of some commodity categories during a certain time period, then, correspondingly, the export trade records are at a relatively higher risk and need to be checked more intensively, and vice versa. In fact, although most of the recorded differences are small, there are still cases of large absolute values that cannot be ignored, such as the German import records from 2012-2016, which show large discrepancies in almost all commodity categories. The most serious inconsistency appeared in Germany in 2012-2016, where statistical imbalances were detected in almost all commodity categories. Severe statistical imbalance can significantly jeopardize the perfection of trade statistics and, thus, the validity of the research results based on them. This could cause problems for scholars using this dataset for relevant research and policy makers for decision-making. Considering that statistical imbalances are usually concentrated in a few commodity groups for a given country and year as well as that the import and export imbalance is somewhat correlated, studies using such data should perform targeted prescreening as much as possible. At the same time, it is the responsibility of government statistical offices, as producers of data, to pay sufficient attention to this problem. We strongly recommend that the United Nations Statistics Division (UNSD) make statistical imbalance testing a necessary quality control component in the data archiving process, to minimize statistical imbalance and give corresponding quality markers for scholars, experts, and policy makers.

Data Availability Statement:
The data presented in this study are available on request from the corresponding author.