1 Introduction

Gross domestic product (GDP) holds a crucial place in the social sciences and is a guiding principle for political decisions. Nevertheless, GDP is inadequately measured worldwide (Wu et al. 2013; Feige and Urban 2008). Reliable national GDP data are unavailable in many low- and middle-income countries due to statistical capacity and budget constraints (Keola et al. 2015). Local governments are likely to inflate real data in dictatorship nations, resulting in inadequate statistical data. Even high-income countries suffer from measurement errors because they ignore the informal economy. Hence, dealing with measurement errors in GDP has stimulated economic research for many decades.

Recently, the absence of high-quality GDP data at the national and regional levels has forced many economists to use an alternative measure of regional outputs: nighttime lights (NTL). Luminosity or NTL can be detected by satellites from outer space. Exogenous characteristics, high spatial resolution, high-frequency accessibility, consistent quality, and global coverage are some of the key benefits of these data that make them appealing as an alternative measure of real GDP at various levels of subnational administrative areas. Therefore, luminosity is widely highlighted in the economic literature, especially in serving as an additional proxy for local economic outcomes (Martinez 2022; Hu and Yao 2021; Asher et al. 2021; Gibson et al. 2021; Chen and Nordhaus 2019; Keola et al. 2015; Hodler and Raschky 2014; Henderson et al. 2012; Chen and Nordhaus 2011). However, in contrast to the growing popularity of night lights in economic literature, our understanding of the main drivers of the uncertainty in the lights–GDP relationship remains unclear. Both NTL and GDP are subject to measurement errors, leading to erroneous results when their relationship is estimated. Therefore, understanding the hidden components of measurement error in assessing the lights–GDP relationship is a major concern for economists.

Economists attempt to cope with measurement errors. Table 1 presents details of several relevant studies dealing with measurement errors in the lights–GDP relationship. The existing literature focuses on two directions: (1) establishing a statistical framework to estimate errors, and (2) identifying specific elements that cause the difference between data observed from space and official measures of GDP. Although these approaches were practical, they failed to answer why the GDP and NTL relationship differ from country to country. The major limitations of the existing literature are their concentration on only a single or few factors that determine the variation between night lights and GDP (listed in Table 1). It is obvious that a country’s GDP does not solely determine the amount of light consumed by its residents. If we consider NTL to be normal goods similar to other goods discussed in economics, consumer preferences will significantly influence their demand.Footnote 1 Thousands of factors may contribute to different NTL consumption preferences across countries. Therefore, we face a large number of potential drivers contributing to uncertainty in lights-GDP relationships with a relatively limited number of observations.Footnote 2 As a result, it is often difficult to clarify what eventually drives the difference between lights and GDP. For example, South Korea and Russia have similar GDPs, but differ greatly in population density, democracy level,Footnote 3 and share of the agricultural sector in GDP. If we focus on only one of the three factors listed above, it will be difficult to ascertain which one is the main factor affecting light consumption in each country. Even if attention is given to all three aspects simultaneously, there is a high probability of missing many other relevant factors that cause differences in the lights–GDP relationship in these two countries. Therefore, it is necessary to employ a high-dimensional approach that considers thousands of elements simultaneously.

Accordingly, to optimize GDP estimation using NTL at national and subnational levels, economists and researchers must better understand the influencing factors of the lights–GDP relationship. This study aims to identify the factors that determine the variation between NLT and GDP across countries. In particular, this paper employs three modern statistical tools: the least absolute shrinkage and selection operator (LASSO), the minimax concave penalty, and the spike-and-slab regression, to examine a dataset of approximately 600 potential drivers. There are several advantages of this approach in selecting essential predictors, including the following:

  1. 1)

    These methods have the advantage of considering all potential factors but only selecting a subset of covariates.

  2. 2)

    These methods allow the computer to automatically choose important regressors without the bias of the researcher’s subjective view.

  3. 3)

    Modern statistical tools such as LASSO can evaluate the relative importance of each factor. This application is especially significant, as the relative importance of the regressors is often the primary motivation for analyzing the lights–GDP uncertainty.

  4. 4)

    Since the three methods are based on different algorithms and theories, I also seek to prove that the findings are robust and do not omit any critical factors.

The results indicate that the quality of the institution is the main factor that determines the variation between NTL and GDP across countries. The author found multiple indicators reflecting institutional quality, ranging from the degree of democracy to the number of years the leader has spent in the office and the government’s effectiveness at controlling corruption and resolving conflicts. In addition, the business environment and the level of development are also important factors. Furthermore, other factors such as economic structure, urbanization, and geography also significantly affect the lights–GDP relationship.

The remainder of this paper is organized as follows: Sect. 2 describes the theoretical framework. Section 3 summarizes the variable selection methods used in this paper. Section 4 provides a brief overview of the dataset used at the national level. Section 5 presents the empirical findings of this study, while Sect. 6 discusses the findings of this study. Finally, Sect. 7 concludes and highlights the potential for future research.

Table 1 Selected studies on dealing with measurement errors in lights–GDP estimation

2 Theoretical framework

Many studies have shown that aggregate lights per area are positively correlated with GDP in that area. Doll et al. (2000) used the log-log model to examine the linear relationship between the purchasing power parity (PPP) GDP and total lit area worldwide for 1994–1995, obtaining an R-square value of 0.85. Ghosh et al. (2010) derived an R-square value of 0.73 by regressing PPP GDP and the total amount of lights worldwide in 2006.

Henderson et al. (2012) suggested the following equation:

$$\begin{aligned} \hbox {light}/\hbox {area} = \phi (\hbox {GDP}/\hbox {area}) = \beta (\hbox {GDP}/\hbox {area})^\alpha . \end{aligned}$$
(1)

This paper is based on Wu et al. (2013)’s article. Our study differs from that of Wu et al. (2013) in that it simultaneously analyzes 600 dimensions that might affect the lights–GDP relationship instead of considering only three factors. Furthermore, our approach allows the computer to automatically select factors without the bias of the researcher’s subjective view.

Wu et al. (2013) hypothesized that the amount of lights is a power function of the GDP in each nation:

$$\begin{aligned} \hbox {light} = \phi (\hbox {GDP}) = k(\hbox {GDP})^\alpha , \end{aligned}$$
(2)

where parameter k is not a constant, and a number of unknown factors other than GDP identify it. The hidden components of k are the main focus of this paper. Several factors might be potential elements of k, for example, income per capita. This is because a higher income per capita level definitely increases the consumption of normal goods, including lights. The share of the agricultural sector would be another possible element, as a higher portion of agriculture in the GDP often results in a lower light demand for residences at night. Another aspect to consider is population density. For example, while Russia and South Korea have similar GDPs, their light intensities differ significantly, which may result in different light consumption. Since there are hundreds of potential factors, we still do not know which factors significantly affect parameter k.

Therefore, the parameter k can be decomposed and allocated to several variables:

$$\begin{aligned} k=k_0e^{k_1 x_1} e^{k_2 x_2} e^{k_2 x_3} \cdots e^{k_n x_n}, \end{aligned}$$
(3)

where \(k_0\) is constant, \(x_1, x_2, \ldots , x_n\) are unknown factors, and \(k_1\), \(k_2\), \(\ldots \), \(k_n\) are the respective coefficients of the variables above. Taking the logarithmic transformation, we obtain the following:

$$\begin{aligned} \ln (\hbox {light}) = \ln (k_0) + \alpha \ln (\hbox {GDP}) + k_1 x_1 + k_2 x_2 + \cdots + k_n x_n, \end{aligned}$$
(4)

Since different satellites or the same satellites in different years obtain different images, they cannot be directly compared. To eliminate these obstacles, we introduce time dummies into the model.

$$\begin{aligned} \ln (\hbox {light}_{it}) = \delta _t + \ln (k_0) + \alpha \ln (\hbox {GDP}_{it}) + \eta _{it}, \end{aligned}$$
(5)

where i indexes the country, t indexes the year, \(\delta _t\) is the time dummy, and

$$\begin{aligned} \eta _{it}=k_1 (x_1)_{it} + k_2 (x_2)_{it} + \cdots + k_n (x_n)_{it} +\varepsilon _{it}, \end{aligned}$$
(6)

where \(\varepsilon _{it}\) is a random error term.

To control factors that vary from country to country, Henderson et al. (2012) used country-fixed effects. As this paper examines these factors, I do not adopt country-fixed effects. Instead, I use the absolute mean value of \(\widehat{\eta }_{it}\) obtained from (5) as the dependent variable. On the right-hand side of the equation, I test approximately 600 variables representing several aspects of a country (including time-variantFootnote 4 and time-invariant variables) since we do not know which specific elements significantly affect the parameter k. These variables include the quality of the political institution, degree of democracy, economic structure, geography, demographics, infrastructure, urbanization, energy consumption, natural resources, foreign aid, remittances, statistical capacity score, cultural diversity, religion, history, lands, and climate, among others. I employ modern statistical tools, including LASSO, spike and slabs, and the minimax concave penalty, to select the most important predictors. Therefore, (6) becomesFootnote 5 the following:

$$\begin{aligned} |\bar{\widehat{\eta }_i}|=\gamma \varvec{X_{i}}+\mu _i, \end{aligned}$$
(7)

where \(|\bar{\widehat{\eta _i}}|\) is the absolute mean value of error terms (grouped by each country) obtained from (5), and \(\varvec{X_{i}}\) is a set of control variables (approximately 600 variables). The next step is to perform regressions using (7).

3 Variable selection methods

We are confronted with the problem of a high-dimensional data context. While the dataset has only 179 observations of the dependent variable corresponding to 179 countries globally, thousands of explanatory variables may significantly affect the lights–GDP relationship across countries. To address the high-dimensional nature of the data and ensure the objectivity of the results, this paper utilizes three methods of variable selection called modern statistical techniques. Specifically, I used three alternative methods to choose variables: LASSO, the minimax concave penalty, and spike-and-slab.

3.1 LASSO

The LASSO model works effectively with relatively many predictors and a low number of observations. This technique is based on the shrinkage of the least-squares regression coefficients. This process leads to some parameter estimates being set to precisely zero. In other words, the purpose of LASSO is to eliminate useless variables from the model and retain only the most important independent variables in explaining the outcome variable. This strategy allows the variable selection to be automated with high accuracy. Another advantage of LASSO is that it is computationally efficient [see for example,Varian 2014].

LASSO was first proposed by Tibshirani (1996). This method was presented in detail in Bühlmann and Van De Geer (2011) (page 7–43). It is challenging to model high-dimensional data. For a continuous response variable \(Y\in {\mathbb {R}}\), the linear model is a simple yet very useful solution:

$$\begin{aligned} Y_i=\sum _{j=1}^p\beta _jX_i^{(j)}+\varepsilon _i, \end{aligned}$$
(8)

for \(i,\ldots ,n\), where \(\varepsilon _1,\varepsilon _2,\varepsilon _3,\ldots ,\varepsilon _n\) are independent and identically distributed (iid) and independent of \(X_i\), and it is assumed that \(E[\varepsilon _i]=0\).

The matrix- and vector-notation form of (8) is:

$$\begin{aligned} Y=X\beta +\varepsilon , \end{aligned}$$

with the response vector being represented by \(Y_{n+1}\), the design matrix by \(X_{n\times p}\), the parameter vector by \(\beta _{p\times 1}\), and the error vector by \(\varepsilon _{n\times 1}\).

The ordinary least-squares estimator is not unique when \(p > n\) and substantially overfits the data. Therefore, complexity regularization is necessary. Here, we use regularization with the \(\ell 1\)-penalty. LASSO is used to estimate the parameters in model (8):

$$\begin{aligned} \hat{\beta }\left( \lambda \right) =\arg \min _{\beta }\left( \frac{\Vert Y-X\beta \Vert _2^2}{n}+\lambda \Vert \beta \Vert _1\right) , \end{aligned}$$
(9)

where \(\Vert Y-X\beta \Vert _2^2=\sum _{i=1}^n\left( Y_i-(X\beta )_i\right) ^2\), and \(\Vert \beta \Vert _1=\sum _{j=1}^p|\beta _j|\). In the above equation, \(\lambda \ge 0\) is a tuning parameter controlling the power of the penalty, and a larger \(\lambda \) corresponds to a larger shrinkage of the model. \(\lambda =0\) indicates that the problem becomes the ordinary least-squares fit. When \(\lambda =\infty \) or as \(\lambda \) becomes sufficiently large, it indicates that all parameter estimates are forced to be zero.

The estimator performs variable selection in the sense that \(\hat{\beta }_j(\lambda )=0\) for some j’s (depending on the choice of \(\lambda \)), and \(\hat{\beta }_j(\lambda )\) can be considered a shrunken least-squares estimator. This results in the exclusion of features with coefficients from the model equal to zero. LASSO is therefore a powerful method for selecting features.

3.2 The minimax concave penalty (MCP)

The MCP can yield nearly unbiased shrinkage estimates as a possible alternative to the LASSO penalization method. In particular, Zhang (2010) examined the properties of the MCP for linear regression in a high-dimensional context and found that it provides continuous, nearly unbiased, and accurate variable selection. In this section, I will provide a brief description of MCP (Breheny 2016). In the literature, one can find more detailed discussion about MCP (see for example,Zhang 2010; Breheny and Huang 2011).

Let us consider a regression analysis with response \(y\in {\mathbb {R}}^n \) and design matrix \(X \in {\mathbb {R}}^{n\times p}\). The MCP is an alternative method used to obtain more accurate regression coefficients in sparse models. This technique was first introduced by Zhang (2010) by considering the objective function:

$$\begin{aligned} Q(\beta |X,y)=\frac{1}{2n}\Vert y-X\beta \Vert ^2+\sum _{j=1}^p P(\beta _j|\lambda ,\gamma ), \end{aligned}$$
(10)

where \(P(\beta |\lambda ,\gamma )\) is a folded concave penalty.

Unlike LASSO, many concave penalties depend on \(\lambda \) in a non-multiplicative way, so that \(P(\beta |\lambda )\ne \lambda P(\beta )\). In addition, they typically involve a turning parameter \(\gamma \) that controls the concavity of the penalty.

The formula behind the MCP is expressed as follows:

$$\begin{aligned} P_{\gamma }(x;\lambda )={\left\{ \begin{array}{ll} \lambda |x|-\frac{x^2}{2\gamma }, \quad \text {if} \quad |x|\le \gamma \lambda \\ \frac{1}{2}\gamma \lambda ^2, \quad \quad \quad \text {if} \quad |x|> \gamma \lambda \end{array}\right. }, \end{aligned}$$
(11)

For \(\gamma >1\). Its derivative is

$$\begin{aligned} \dot{P}_{\gamma }(x;\lambda )={\left\{ \begin{array}{ll} \left( \lambda -\frac{|x|}{\gamma }\right) sign(x), \quad \text {if} \quad |x|\le \gamma \lambda \\ 0,\quad \quad \quad \quad \quad \quad \quad \quad \text {if} \quad |x|> \gamma \lambda \end{array}\right. }. \end{aligned}$$
(12)

MCP starts by applying the same rate of penalization as LASSO and then smoothly relaxes the rate to zero as the absolute value of the coefficient increases.

Among all penalty functions that are continuously differentiable on \((0,\infty )\) and satisfy \(\dot{P}(0+;\lambda )=\lambda \) and \(\dot{P}(t;\lambda )=0\) for all \(t\ge \gamma \lambda \), MCP minimizes the maximum concavity as follows:

$$\begin{aligned} \kappa =\underbrace{\sup }_{0<t_1<t_2}\frac{\dot{P}(t_1;\lambda )-\dot{P}(t_2;\lambda )}{t_2-t_1}. \end{aligned}$$
(13)

3.3 Spike-and-slab

A Bayesian technique to choose variables called spike-and-slab regression is a novel approach for economists. This method is described in detail in Ishwaran and Rao (2005). This section will present a brief introduction to spike-and-slab regression (see Varian 2014).

We consider a linear model with P possible predictors. Then, \(\gamma \) is denoted as a vector of P-dimensional consisting of zeros and ones, indicating whether a particular variable appears in the regression.

In the first step, a Bernoulli prior distribution is applied to \(\gamma \); for example, we might initially assume all variables have a similar probability of being included in the regression. Then, conditional on a variable being in the regression, we define a prior distribution as per its regression coefficient. For example, we might use a normal prior with a mean of 0 and a large variance. The method’s name comes from these two priors: the “spike” is the probability that a coefficient will be nonzero; and the “slab” is the (diffuse) prior that describes the possible values for the coefficient.

The next step is to sample \(\gamma \) from its prior distribution. This will result in a set of variables used in the regression. Based on this list of included variables, we draw coefficients from the prior distribution. By combining the two draws with the likelihood, we obtain a posterior distribution on the probability of inclusion and the coefficients. Through Markov Chain Monte Carlo (MCMC) simulation, we repeat this process thousands of times, giving us a summary table of the posterior distribution for \(\gamma \) (including variables), \(\beta \) (the coefficients), and the predictions associated with the prediction of y. There are various ways to summarize this table. For example, by computing the average value of \(\gamma p\), we can demonstrate the posterior probability of the variable p appearing in the regressions.

4 Data

4.1 Nighttime lights and GDP data

In this paper, I use data from the Defense Meteorological Satellite Program (DMSP) as the primary source for measures of NTL and GDP is calculated from the replication files of Pinkovskiy and Sala-i Martin (2016).Footnote 6 These replication data guarantee that the results below are not affected by ad hoc selections regarding variables and data sources (Martinez 2022). Furthermore, the results below are comparable to many key studies in the literature(Martinez 2022; Pinkovskiy and Sala-i Martin 2016; Keola et al. 2015; Chen and Nordhaus 2011). This dataset covers the period from 1992 to 2010, and Pinkovskiy and Sala-i Martin (2016) used “GDP per capita, PPP, constant 2005 international dollars” from the World Bank’s World Development Indicator (WDI). This variable contains data from almost all countries without missing values.

Observations of light at night are collected, processed, and maintained by the National Oceanic and Atmospheric Administration (NOAA). Nighttime luminosity is available at the pixel-year level (approximately 0.86 square kilometers at the equator) from 1992 to 2013. The intensity of lights is represented by a six-bit digital number (DN) in a grid format. Digital numbers range from 0 (no light) to 63 (top-coded). Adding all the digital numbers across pixels produces a light proxy for aggregate income:

$$\begin{aligned} \textrm{Light}_{j,t}=\sum _{i=1}^{63}i*(\#\, \mathrm{of\,pixels\,in\,country}\, j\, \textrm{and}\, \textrm{year}\, t\, \mathrm{with\, DN}=i). \end{aligned}$$

According to Henderson et al. (2012), the logarithms of the aggregate luminosity measure will be averaged when there are multiple satellite measurements in a given year. The literature widely uses this formula as a standard practice (Chen and Nordhaus 2011; Henderson et al. 2012; Martinez 2022).

With DMSP NTL data from 1992 to 2010, various concerns related to blurring, top-coding, and lack of calibration (Gibson et al. 2021) arise. Therefore, I will conduct various robustness checks with newer and better lights and GDP data to address this problem. In particular, I use a harmonized global NTL dataset from 1992 to 2018, a newer NTL dataset with a longer period. This dataset is obtained in GeoTIFF file format from the open-source database Scientific Data published by NatureFootnote 7 (Li et al. 2020).

The harmonized dataset is globally integrated and consistent, combining the intercalibrated NTL observations from the DMSP data with the simulated DMSP-like NTL observations from the VIIRS data. The global DMSP NTL time series (1992–2018) reveals consistent temporal trends. There is no separate quality file since the data are already produced with quality weights. I downloaded and processed the GeoTIFF file with R software for a global scale. Corresponding with alternative NTL data, I also used a newer vintage of GDP data—GDP per capita, PPP, and constant 2017 international dollars. Figure 1 presents scatter plots of log lights per capita (or log aggregate lights per area) against log GDP per capita using two alternative sources of NTL and GDP data.

Fig. 1
figure 1

Official GDP and lights

4.2 Other data

The rest of the analysis variables come from various data sources, including the World Development Indicator (WDI),Footnote 8 Freedom House,Footnote 9 Quality of Government (QoG),Footnote 10 Varieties of Democracy dataset,Footnote 11 WHOGOV dataset (Nyrup and Bramwell 2020),Footnote 12 Center of Systemic Peace (Marshall et al. 2011),Footnote 13 and others. These variables describe the quality of the political institution, degree of democracy, economic structure, geography, demographics, infrastructure, urbanization, energy consumption, natural resources, foreign aid, remittances, statistical capacity score, cultural diversity, religion, history, lands, and climate, among others. For example, to evaluate the effect of institutional quality on the lights-output relation, I intentionally use the Freedom in the World (FiW) index to ensure that the results below are comparable to the work of Martinez (2022). These data are published by Freedom House annually. Freedom House divides countries into three groups: “free, ”“partially free,” and “not free.” In this paper, instead of using the FiW index as a time series variable, I use it as a cross-sectional variableFootnote 14 to help uncover the relationship of political regimes with the difference between lights and GDP. Table 2 provides an overview of these data.

For data sources and definitions of all key variables in this paper, please refer to Appendix B and Appendix C. Table 6 in Appendix A shows the summary statistics for some key variables in this paper.

Table 2 Distribution of countries by freedom status in 2010. Source: Freedom House

5 Results

Figure 2 shows a scatterplot of log real GDP (PPP) per capita (2005 US dollars) for 2010 and the absolute value of error terms (\(N=133\)). There is a significant difference between the size of error terms across countries. On the one hand, although the UK, Germany, and France are located in the same geographical region (Western Europe) and have similar GDP per capita, the absolute values of the error terms are very different. We can also see similar patterns in some Southeast Asian countries (Philippines, Indonesia, and Vietnam) and sub-Saharan countries (Kenya, Ghana, and Lesotho). On the other hand, India and France clearly come from different income groups and geographical regions, but the magnitudes of their error terms are the same. This paper explores the kind of unobservable information contained in error terms that help us understand the difference between lights and official reported GDP across countries.

Table 3 illustrates the results of three alternative variable selection methods (I present the results in detail in Online Appendix D). First, I examine a dataset of 597 variables and 172 countries to explore the factors that determine the discrepancy between lights and GDP. The table presents 12 variables selected by LASSO, spike-and-slab, and MCP regressions. Digits in each column represent the ordinal importance of the variable, and dashes indicate that a variable was excluded from the chosen model (I excluded all other irrelevant variables). Table 3 highlights two key facts. First, the three methods draw consistent results. In other words, they selected similar variables. Second, most of the variables reflect the political institution’s quality. On the one hand, many factors determine the degree of autocracy, including freedom status (Martinez 2022), regime type, and the consecutive number of years the leader has been in office (Nyrup and Bramwell 2020). On the other hand, other variables such as starting a business score, state fragility index, public sector corruption index, or natural resource protection indicator measure a government’s effectiveness. In addition, the statistical techniques also identify other elements that might significantly affect error terms, such as geography (average distance to nearest ice-free coast) and level of economic development (agriculture, forestry, fishing, value-added). Finally, I move to the subsequent analysis to see how well these modern statistical techniques perform in selecting important predictors of error terms.

To conduct cross-sectional analysis, I estimate Eq. (7):

$$\begin{aligned} |\bar{\widehat{\eta }_i}|=\gamma \varvec{X_{i}}+\mu _i. \end{aligned}$$

Tables E2–E12 in online Appendix E report the simple linear regression of the absolute mean value of error terms on various control variables. In this analysis, in addition to using variables selected by three alternative statistical methods in Table 3, I also controlled for a diverse group of variables representing political, geographical, economic development, ethnic and cultural diversity, land, and historical and demographic factors. This is to ensure I do not omit any essential predictors in controlling for discrepancies across countries and for comparison purposes. Figure 3 plots all point estimates of all variables I tested in Tables E2–E12. Note that we use standardized variables; thus, the coefficients can be comparable. As we can see from Fig. 3, all variables that the LASSO, spike-and-slab and the MCP regressions select (in Table 3) have a relatively large effect on the absolute mean value of error terms (see red line in Fig. 3). In contrast, all other variables (which the three above models do not choose) are statistically nonsignificant (blue line) or statistically significant but economically nonsignificant (yellow line) except for the service sector as a share of GDP variables and urban population growth rate. The negative signs on the coefficients of the agricultural and service sectors indicate that the development level considerably affects the relationship between lights and GDP. Specifically, while lights typically more accurately predict GDP for countries with higher service sector shares (a negative sign), they are worse for nations with a high percentage of the agricultural sector (a positive sign). Additionally, in univariate linear regression results, the sign of all coefficients is consistent with the three statistical models in Table 3) as well as our expectations (for details see online Appendix E). The results suggest that all variable selection methods perform fairly well.

Table 4 describes the multivariate analyses. Multiple regression generally confirmed the results of the simple linear regression. However, the more variables that indicate the quality of an institution, the higher the chance of collinearity. As a result, I divided these variables and controls into separate regressions. It is clear that the coefficients of the univariate linear regression and the multivariate linear regression are generally of a similar magnitude and sign across all variables (see the same variables in Table 4 and Tables E2 and E3 in online Appendix E). It should be emphasized that coefficients on individual variables in Table 4 generally follow the expected direction. For example, the sign (positive) and magnitudes of the coefficients for the average distance to the coast are consistent and stable across regressions (see row 10 Table 4 and column 2 Table E3 in online Appendix E). Therefore, I expect that lights will be a better proxy for GDP if a country is located close to the coast. Another example shows that the absolute mean value of the error term for non-free nations will be significantly higher than that for partly free and free countries (see column 1). Additionally, the consecutive number of years the leader has spent in office also reflects the status of the degree of democracy. Columns 3 and 8 show that the signs of the coefficient of this variable are positive. In many dictatorships, leaders have been in positions for many years. Thus, autocracy regimes may manipulate GDP. This finding provides additional evidence for the conclusions drawn by Martinez (2022). In his research, he concluded, “I estimate that the most authoritarian regimes inflate yearly GDP growth rates by a factor of 1.15–1.3 on average” (page 28).

In conclusion, this section presents the results of the cross-sectional analysis. With the help of three alternative variable selection methods, I systematically analyze hundreds of variables. The results show that the degree of democracy, government effectiveness, and level of development are the key determinants of the discrepancy between lights and GDP. In addition, distance to the coast and urban population growth rate also significantly impact the lights–GDP association.

Fig. 2
figure 2

GDP per capita and error terms, all countries. Notes The figure shows the scatter plot of log real GDP (PPP) per capita for 2010 and the absolute value of the error term. The error terms come from the regression of log light per capita on log GDP per capita with year fixed effects. Additionally, I highlighted some countries in dark red. Blue points represent all other countries. \((N=133)\) (Color figure online)

Fig. 3
figure 3

Multiplot coefficients of control variables from Eq. (7). Notes I use DMSP NTL and GDP per capita, PPP (in constant 2005 international $) (1992–2010). This figure summarizes the result from Tables E2–E12 in online Appendix E. In this figure, I already standardized all control variables; thus, all coefficients are comparable. (Note that in Tables E2–E12, I report the value of coefficients of control variables without standardization)

Table 3 Comparison of variable selection methods: which factors determine the difference between lights and GDP?
Table 4 Cross-sectional analysis: multiple linear regression

5.1 Robustness check

The previous sections use DMSP NTL data and GDP per capita, PPP (in constant 2005 international $) replicated from the replicate file from data used by of Pinkovskiy and Sala-i Martin (2016) to examine the factors determining the difference between lights and GDP. Our primary purpose is to compare our significant findings with certain popular papers in the literature, such as Martinez (2022), Pinkovskiy and Sala-i Martin (2016), Keola et al. (2015), Henderson et al. (2012) and Chen and Nordhaus (2011). However, there are two limitations to this dataset. First, the data are slightly outdated, with a limited time frame between 1992 and 2010. Second, DMSP NTL is affected by various flaws, such as blurring, coarse resolution, no calibration, low dynamic range, and top-coding (Gibson et al. 2021). Therefore, this section uses alternative NTL and GDP data to check the robustness of our findings. Specifically, I use harmonized NTL data, which are longer and better DSMP-like NTL data, from 1992 to 2018. In addition, I use a newer vintage of GDP data - GDP per capita, PPP (in constant 2017 international $).

Fig. 4
figure 4

Multiplot coefficients of control variables from Eq. (7). Notes I use harmonized NTL and GDP per capita, PPP (in constant 2017 international $) (1992–2018). This figure summarizes the result from Tables F2–F12 in online Appendix F. In this figure, we already standardized all control variables; thus, all coefficients are comparable. (Note that in Tables F2–F12, we report the value of coefficients of control variables without standardization)

The difference between lights and GDP is primarily a result of the differences in the quality of institutions. Therefore, I only focus on the replication of the cross-sectional analysis. Table 5 and Fig. 4 present the results of the cross-sectional analysis using new NTL and GDP data. For all control variables, the sign and magnitude of all coefficients are similar (compare Figs. 3 and 4). In a similar vein, the multivariate analysis also draws consistent results (compare Tables 4 and 5). Therefore, the choice of whether to use the newer and longer NTL data should not be the main concern when assessing the relationship between lights and GDP. (See more details in online Appendix F).

Table 5 Cross-sectional analysis: multiple linear regression

6 Discussion

This paper examines the factors affecting the variation in the relationship between NTL and GDP across countries. I selected and processed a dataset of 600 potential drivers from various aspects, including institutional quality, degree of democracy, economic structure, geography, demographics, infrastructure, urbanization, energy consumption, natural resources, foreign aid, remittances, statistical capacity score, cultural diversity, religion, history, land, and climate, among others. I applied three modern statistical tools to select variables within a high-dimensional context: LASSO, MCP, and spike-and-slab regression. The results suggest that the cross-sectional discrepancy in the light-GDP relationship comes primarily from the quality of the institution. Our estimates show a high correlation between error terms and various indicators reflecting institutional quality. This includes the degree of democracy, the duration of a leader’s tenure in office, the government’s effectiveness in controlling corruption and its conflict resolution capabilities, the business environment, and development levels. In addition, geographic determinants such as average distance to the nearest ice-free coast considerably affect the lights–GDP relationship through benefits from trade (Henderson et al. 2012). Furthermore, urbanization is another influencing factor. It is also important to highlight that the growth rate in light might not capture the growth rate of the urban population in some regions. Our findings are robust when we use alternative NTL and GDP data.

The strong association between institutional quality and the discrepancy in the lights–GDP relationship remains a puzzle. One possibility is that many autocratic regimes manipulate GDP numbers (Martinez 2022). Additionally, our evidence indicates that the duration of the leader’s tenure in office enhances inflated accounts of national statistics in dictatorships, causing a higher value in the error terms. Furthermore, the capacity to combat corruption significantly affects the measurement errors for standard output data. Finally, the level of development reflects statistical capacity.

7 Conclusion

In summary, the uncertain association between nighttime light data and national output is a major concern, particularly in proxy research. This study provides a broad picture of factors that identify the discrepancy between lights and GDP globally. One main assumption used widely as a standard practice in the literature is that the elasticity between lights and GDP is roughly constant across time and space (Henderson et al. 2012; Pinkovskiy and Sala-i Martin 2016). However, our findings suggest that the elasticity between luminosity data and official national accounts varies across time and space. Future research can incorporate cross-sectional differences in the political system, government effectiveness, economic structure, geography, demographic factors, or infrastructure into one model with the new relaxed assumption regarding elasticity. One feasible option is the Bayesian model, which allows for relaxing the original assumption in the lights–GDP association and combines multiple factors in one model. Furthermore, a Bayesian model is more flexible since the research outcome will be a probability density function instead of a single point estimate.