## 2 Materials and Methods
### Spatial Dynamic Panel Lag Instrumental Variables Fixed-Effects Model (SDPD IV)  
Regional energy consumption per capita is influenced not only by local factors but also by the region's past energy consumption and by the energy consumption per capita in other regions during both the current and previous periods. This study adopts the Spatial Dynamic Panel Lag IV Model [68; 69] to analyze the impact of energy consumption per capita on economic growth in Thailand, expressed as follows:  
\[y_{i,t}=\varphi\sum_{j=1}^{n}w_{i,j}y_{j,t}+\rho y_{i,t-1}+x_{i,t}\beta+\gamma _{y,i}f_{y,t}+\varepsilon_{i,t} \tag{6}\]  
where \(y_{i,t}\) denotes the observation on the dependent variable for individual unit \(i\) at time period \(t\), and \(x_{i,t}\) is a k \(\times\) 1 vector of covariates with slope coefficients \(\beta\). The lagged dependent variable \(y_{i,t-1}\) captures dynamic or temporal effects due to state dependence. The error term of the model is composite: \(f_{y,t}\) and \(\gamma_{y,i}\) denote ry \(\times\) 1 vectors of latent factors and factor loadings, respectively, and \(\varepsilon_{i,t}\) is an idiosyncratic error. The \"spatial-lag\" variable \(w_{i,j}y_{j,t}\) is a weighted average of the outcome variable in the neighboring locations for individual \(i\). \(w_{i,j}\) denotes the (i, j)-th element of the N \(\times\) N spatial weights matrix WN. The spatial-lag coefficient \(\varphi\) is bounded by 1 as well, and its magnitude can be interpreted similarly to the time-lag coefficient \(\rho\)[70; 71]. This model is used as a benchmark for comparison with the Spatial Lag Model (SLM). For the Spatial Dynamic Panel Lag Model, the asymptotic properties require that both the time and spatial dimensions be large. This implies that, with a sufficiently large sample size, the SDPD IV model is expected to yield more accurate results [51; 67]. The rationale behind this approach is to identify the model that provides the most accurate estimates, one that provides precise coefficient estimates in terms of both sign and magnitude, thereby allowing for reliable conclusions to be drawn and aligning with the study's objectives. Since including the time-lagged dependent variable in the equation may lead to inconsistent estimates, instrumental variable estimators are required [72]. The Hansen J statistic can be used to test whether, for example, the covariates are strictly exogenous with respect to \(\varepsilon_{i,t}\) or whether the model parameters are indeed homogeneous across i. Violating either of these assumptions invalidates the model's moment conditions [73]. The present study uses a two-stage least squares (2 SLS) model to overcome the endogeneity issue and estimate the effect of energy consumption per capita. The 2 SLS model is a widely used econometric method for estimating causal relationships in panel data [74; 75; 76; 77; 78]. In the next step, this method assesses the validity of the instrument variables included in the Spatial Dynamic Panel Model because _Landtemp_night_, _Rainfall_, and _Windspeed_ might have direct effects on \(GPP\)_pc_, \(GPP\)_pc_\({}^{2}\), \(Pop\)_dens_, and _Roaddens_ (these factors affect human settlement, e.g., [57; 59; 61; 62], but have little direct effect on energy consumption per capita (\(Energy\)cons_pc)). This study utilizes the spxtivdfreq package in Stata MP version 16.1 to estimate the Spatial Dynamic Panel Lag Instrumental Variables (SDPD IV) model. Meteorological factors can have either positive or negative effects on electricity consumption [64]. However, some studies suggest that these factors, which can reflect climate change, may lead people to migrate to areas with more favorable climatic conditions [54]. Additionally, meteorological variables influence economic growth, labor productivity, and residential location choices in various countries [55; 56; 58; 60; 63]. Furthermore, geographic studies in Thailand have found that meteorological factors affect residential settlement patterns and commercial activities among the Thai population [57; 59; 61; 62].