*The Dynamic of Residential Energy Demand Function: Evidence from Natural Gas DOI: http://dx.doi.org/10.5772/intechopen.102451*

as space heating, water heating, cooking, and so on is not directly produced from natural gas. Households use natural gas to meet these demands.

The production function of the welfare services S can be written as:

$$\mathbf{S} = \mathbf{S}(\mathbf{G}) \tag{1}$$

Natural gas is denoted by the letter G. The quantity of natural gas acquired determines the output, which is welfare services (S). In fact, welfare services S, as well as total consumption X, are regarded to be an element of the household's utility function. The demographic factors Z and the weather of the household's country, designated W, have an impact on this utility function. As a result,

$$\mathbf{U} = \mathbf{U}(\mathbf{S}(\mathbf{G}), \mathbf{X}, \mathbf{Z}, \mathbf{W}) \tag{2}$$

The above utility function is maximized by the household under a budget constraint:

$$\mathbf{Y} - \mathbf{P} \cdot \mathbf{S} - \mathbf{X} = \mathbf{0} \tag{3}$$

Where *Y* is the household income and *P* is the price of natural gas. Solving this optimization issue involves demand function for natural gas:

$$G\* = G\*(P, Y; Z, W) \tag{4}$$

Based on the Eq. (4) and employing a log linear specification, The static model is as follows:

$$\ln\text{GT}\_{\text{it}} = \text{B}\_0 + \text{B}\_1\text{lnELD}\_{\text{it}} + \text{B}\_2\text{lnURB}\_{\text{it}} + \text{B}\_3\text{lnDEN}\_{\text{it}} + \text{B}\_3\text{summl}X\_{\text{it}} + \text{e}\_{\text{it}} \tag{5}$$

Where GTit is per capita residential natural gas consumption, ELDit is the elderly population, URBit is the urban population, DENit is the population density in the country I in year *t*, Xit is the sum of the control variables that are likely to influence per capita natural gas consumption, and eit is the error component to account for unobserved factors. The parameters were simply interpreted as demand elasticities after the dependent variable and regressors were transformed into logarithms.

When estimating a static energy demand model using panel data, the endogeneity problem is often addressed by using the fixed or random effects with the Within estimator or GLS [13], respectively, to avoid the heterogeneity bias with a constant term that the OLS may suffer from.

Nerlove [14], on the other hand, claims that economic behavior models are dynamic in nature, and that current behavior is dependent on the state of the system defining it. Furthermore, according to Gutiérrez [15], disregarding the influence of path-dependency can lead to erroneous estimations of the entire variables. The lagged dependent variable was inserted on the right-hand side of the equation to compensate for the intrinsic dynamic feature of the demand function, assuming that natural gas demand in the residential sector is affected by prior levels. As a result, the dynamic version of the natural gas demand model is:

$$\ln\text{GT}\_{\text{it}} = \mathbf{B}\_0 + \mathbf{B}\_1\ln\text{GT}\_{\text{it}-1} + \mathbf{B}\_1\ln\text{ELD}\_{\text{it}} + \mathbf{B}\_2\ln\text{URB}\_{\text{it}} + \mathbf{B}\_3\ln\text{DEN}\_{\text{it}} + \mathbf{B}\_3\text{sum}\ln\text{X}\_{\text{it}} + \mathbf{e}\_{\text{it}} \tag{6}$$

According to Achen [16], the lagged dependent variable will capture not only the impact of the omitted variables, but also the impact of the variables that have previously been included, with the possibility of modifying or decreasing their impact, sometimes to the point of being inconsequential.

*The Dynamic of Residential Energy Demand Function: Evidence from Natural Gas DOI: http://dx.doi.org/10.5772/intechopen.102451*

In reality, adding a lagged dependent variable to a static model will result in skewed results because the latter variable may be associated with the error component eit. Thus, the within transformation and GLS will be biased since (*Yi*,*<sup>t</sup>* �1 -1) is linked with (eit-*i*.) and its consistency is dependent on *T* being big, where *y* is the log natural gas consumption per capita and. -1 are the average lagged log per capita natural gas consumption inside nation *i*. [13]. To deal with this problem, one can first change the model to remove the country-fixed effects:

$$\begin{aligned} \Delta \text{lnGT}\_{\text{it}} &= \mathbf{B}\_0 \, \Delta \, \ln \text{GT}\_{\text{it}-1} + \Delta \text{lnELD}\_{\text{it}} \, \mathbf{B}\_1 + \Delta \text{lnURB}\_{\text{it}} \, \mathbf{B}\_2 + \Delta \text{lnDEN}\_{\text{it}} \, \mathbf{B}\_3 \\ &+ \Delta \text{sum} \, \ln \mathbf{X}\_{\text{it}} \, \mathbf{B}\_4 + \Delta \varepsilon\_{\text{it}} \end{aligned} \tag{7}$$

Then using *Yi,t* �<sup>2</sup> as an instrument for Yi,t-1 [17]. Because it does not use all of the available moment conditions, this instrumental variable estimation approach produces consistent but not necessarily efficient estimates of the model's parameters [18]. Arellano and Bond [19] presented a generalized method of moment (GMM), which entails using the orthogonality criteria that exist between lagged values of Yit and the disturbances eit in Eq to add additional instruments (7). As a result of this discussion, as well as the fact that the dataset had *N* = 29 and *T* = 12, the dynamic demand function was estimated and stated in Eq. (6) using a dynamic system GMM using differenced and lagged variables as instruments for the differenced and level equations, respectively. The GMM system uses the entire set of instruments and puts cross-equation limitations on the coefficients entering the two models (corresponding to the full set of orthogonality conditions for both models). The validity of the orthogonality assumptions in the estimate procedure determines the consistency of the system GMM estimator. Two specification tests are used, as recommended by Arellano and Bond [19, 20]; and Blundell and Bond, [21]. The Arellano-Bond tests (AR1) and (AR2) were used to assess the first and second serial correlation among error terms and the Sargan/Hansen test was used to check the validity of the instruments. These experiments assist us in determining the most appropriate model for national natural gas demand.
