A Spatiotemporal Deformation Modelling Method Based on Geographically and Temporally Weighted Regression

-e geographically and temporally weighted regression (GTWR) model is a dynamic model which considers the spatiotemporal correlation and the spatiotemporal nonstationarity. Taking into account these advantages, we proposed a spatiotemporal deformation modelling method based on GTWR. In order to further improve the modelling accuracy and efficiency and considering the application characteristics of deformation modelling, the inverse window transformationmethod is used to search the optimal fitting window width and furthermore the local linear estimation method is used in the fitting coefficient function. Moreover, a comprehensive model for the statistical tests method is proposed in GTWR. -e results of a dam deformation modelling application show that the GTWRmodel can establish a unified spatiotemporal model which can represent the whole deformation trend of the dam and furthermore can predict the deformation of any point in time and space, with stronger flexibility and applicability. Finally, the GTWRmodel improves the overall temporal prediction accuracy by 43.6% compared to the single-point time-weighted regression (TWR) model.


Introduction
Regression analysis is a commonly used deformation modelling method. It can establish a functional model between deformation and influence factors and then carry out physical interpretation and prediction of deformation. Specific regression modelling methods include multiple linear regression [1], stepwise regression [2], principal component regression, and independent component regression (ICR) models [3,4], but all of them are for singlepoint models without considering the spatial correlation and the spatiotemporal nonstationarity of the deformation monitoring data. In order to take into account the temporal nonstationarity, Lu et al. [5] used the time-weighted regression (TWR) method to model dam deformation. e TWR model assumes that the linear regression coefficient is a function of time to adapt the temporal nonstationarity, and the prediction accuracy of the model is higher than that of the linear regression model. However, TWR does not consider the spatial correlation between the monitoring points and still belongs to the single-point model. When there are many monitoring points, using the single-point model will cause model redundancy and it is difficult to analyze the overall deformation of the deformable body since spatial correlation is not considered. Li et al. [6] and Dai et al. [7] applied the space-time autoregressive (STAR) model and the spatiotemporal independent component regression (STICR) model to build a deformation model. Both consider the spatiotemporal correlation and can establish an overall spatiotemporal deformation model for all points. However, both do not consider the spatiotemporal nonstationarity, which will reduce the prediction accuracy of the models. In order to take both the spatiotemporal correlation and the spatiotemporal nonstationarity of the deformation data into consideration, a spatiotemporal deformation modelling method based on the GTWR model was proposed and applied for dam deformation modelling. Furthermore, to avoid the boundary effect of the model regression coefficient fitting in GTWR, the local linear estimation method is used in the fitting coefficient function. e statistical test is very important in GTWR modelling to ensure the reliability of the model. However, most of the current statistical test methods in GTWR modelling only focus on the spatiotemporal nonstationarity test of the model as a whole and ignore the spatiotemporal nonstationarity test of the regression coefficients. In this paper, we combine the existing statistical test theory of the GTWR model, including the regression coefficients test of the GTWR model proposed by Xiao et al. [8] and then establish a five-step test method to conduct a comprehensive statistical test on the GTWR model.

Geographically and Temporally Weighted Regression
Huang et al. [9] introduced a time factor based on the geographically weighted regression (GWR) model [10,11], and it is extended to the GTWR model [9,12,13]. e GTWR model assumes that the linear regression coefficient is a function of time and the coordinate parameters as follows: (1) In equation (1), j � 1, 2, . . . , n, ε j is a random error, u and v represent spatial two-dimensional coordinates, and t is defined as time coordinates. (u j , v j , t j ) represents the coordinates of the j-th space-time point, and β k (u j , v j , t j ) is the function of the k-th regression coefficient. X jk represents the dependent variable corresponding to the k-th regression coefficient of the j-th space-time point. In order to more clearly represent the sampling information of the monitoring points in different spatial positions at different times, the space-time point variation parameter j in equation (1) is separately expressed as a spatial position parameter and a time parameter, and then the GTWR model can be expressed as equation (2). In equation (2), i represents a spatial position variation parameter, h represents a time variation parameter, where i � 1, 2, . . . , n; h � 1, 2, . . . , T, β k (u i , v i , t h ) is a regression coefficient, and (Y ih ; X ih0 , X ih1 , . . . , X ihd ) are the observation values at time h of the i-th monitoring point. Let X ih0 ≡ 1, that is, the model containing the spatiotemporal intercept term β 0 (u i , v i , t h ). e random error ε ih is independent of each other and satisfies E(ε ih ) � 0 and Var(ε ih ) � σ 2 . (2)

Local Linear Estimation Method of Regression Coefficient
Function. Huang et al. [9] used the local constant estimation method to fit the GTWR model, but it has a boundary effect. Because the local linear estimation can avoid the boundary effect [14], it is used to establish the GTWR model in this paper. It is assumed that each regression coefficient function (2) has a continuous partial derivative with respect to space-time three-dimensional coordinates (u, v, t). (u m , v m , t p ) is any point in the study area, where m and p are the spatial position and time parameters, respectively. Each of the regression coefficient functions can be approximated according to the Taylor series as follows: In equation (3), , and β (t) k (u m , v m , t p ) denote the values of partial derivatives of k for u, v, and t at point (u m , v m , t p ), respectively. According to local linear fitting of the variable coefficient regression model, least squares function can be constructed as follows: where . Let the partial derivative of this function for β k (u m , v m , t p ) equal to 0, then the estimated value β k (u m , v m , t p ) of β k (u m , v m , t p ) can be obtained as where β(u m , v m , t p ), W(u m , v m , t p ), and X(u m , v m , t p ) are shown in equation (6). e nondiagonal elements of the weight W(u m , v m , t p ) are irrelevant because they are 0: . . , T) to calculate the estimated values of all regression coefficients as follows: then the fit value at each point (u i , v i , t h ) can be calculated using the following equation: where X ih � (1, X ih1 , . . . , X ihd ) in , and all the fitted values are showed as the following equation : where L is an nT × nT order matrix and L is also called a pseudohat matrix [14]: e Gaussian kernel function is used to define the spacetime weights of the regression coefficient fitting [9], and its expression is shown as the following equation: where h 1 and h 2 , respectively, represent the optimal space window width parameters and the optimal time window width parameters. As the GTWR model defines the space-time distance, the definition of time and space weights will introduce two window width parameters of time and space [7,15] which should be determined in modelling. We generalized the crossvalidation (CV) method to determine the optimal window width parameters in time and space [9,14,16]. e CV expression is shown as the following equation: For L ih (h 1 , h 2 ), the fitting value of the ih-th point is obtained by removing the observation information of the ihth point under the given space-time window width h 1  (1) Spatiotemporal global nonstationarity test: e original hypothesis H 0 is a multiple linear regression, that is, the regression model has a spatiotemporal stationarity. It is tested by constructing M statistic, and then the p value p 0 of the test is calculated according to the exact or approximate calculation formula of the quadratic distribution of the normal variables [14,21]. e expression of M is shown as follows: where H � X(X T X) − 1 X T . (2) Temporal global nonstationarity test: e original hypothesis H 0 is the GWR model, i.e., the hypothesis model has temporal stationarity and spatial nonstationarity. Based on the theory of Brunsdon's construction of test statistic using the sum of squared residuals [22], the statistic F 1 is constructed and its expression is shown as follows: where R L and R S , respectively, represent the pseudohat matrix of the GWR model and the GTWR model. (3) Spatial global nonstationarity test: e original hypothesis H 0 is a TWR model, which assumes that the model has temporal nonstationarity and spatial stationarity and constructs the F 2 statistics as the temporal global nonstationarity test. e F 2 expression is the same as equation (16), and R L is a pseudohat matrix of the TWR model. (4) Temporal nonstationarity test of regression coefficient function: After completing the global nonstationarity test, it is necessary to test the spatiotemporal nonstationarity of each coefficient function.
e original hypothesis H 0 assumes that the k-th en, the statistical T 1k is constructed for testing (20), and the expression of T 1k is as follows: In equation (20), Γ � diag((I T − (1/T)J T ), . . . , (I T − (1/T)J T )) nT×nT is a block diagonal matrix, and its subblock matrix is I T − (1/T)J T , J T is a T-order square matrix in which all elements are 1 and I T is the T-order identity matrix. en, the p value p 0 of the test is determined according to the exact or approximate calculation formula of the quadratic distribution of the normal variable [21]. (5) Spatial nonstationarity test of regression coefficient function: e original hypothesis H 0 assumes that the k-th regression coefficient function has spatial stationarity. e expression of the statistic is the same as the temporal nonstationarity test of the regression coefficient function. At this time, the Γ in equation (20) is diag((I T − (1/n)J n ), . . . , (I n − (1/n)J n )) nT×nT and the test is completed by constructing the statistic T 2k .
Given a significant level of α � 0.05, the above five hypothesis tests were tested separately. If some regression coefficients in the above tests are spatiotemporal stationary, a mixed geographically and temporally weighted regression model needs to be established [23].

Spatial and Temporal Prediction.
Since the regression coefficients in the GTWR model are all implicit function relations, it is difficult to get the display expression of the model. When the model is applied, the regression coefficient value of the predicted point should be calculated according to the coefficient function [24]. e calculation steps are as follows: First, the space-time weight matrix W(u j , v j , t k ) and the matrix X(u m , v m , t p ) of the predicted point (u j , v j , t k ) are calculated according to equation (6). en, the regression coefficient β k (u j , v j , t k )(k � 0, 1, . . . , d) of the predicted point is obtained by equation (7). When predicting, the predicted value of the predicted point is obtained by substituting the calculated regression coefficient into equation (22). In equation equation (22), X jk is the independent variable observation vector of the point to be predicted (u j , v j , t k ):

Data Source.
e experimental data are from the monitoring system of the Wuqiangxi Dam. e Wuqiangxi Dam is located above the Yuan River in the Yuanling County of Hunan Province. e dam is a concrete gravity dam with a maximum dam height of 85.83 m. e normal water level is 108 m, with a total storage capacity of 4.29 × 10 9 m 3 . e dam is equipped with automatic monitoring systems such as lead lines, inverted plumbs, static level, seepage monitoring, buoyancy monitoring, and water level measurements. is paper refers to some points on one of the lead lines on the Wuqiangxi Dam (EX2-10∼EX2-21). e distribution of the measurement points on the dam is shown in Figure 1; the points EX2-10 and EX2-16 do not participate in modelling and are used as two spatial prediction points, and then a total of 10 points are involved in the modelling. e coordinates of points EX2-10 to EX2-21 are shown in Table 1. e data  Mathematical Problems in Engineering collection time was 2005-04-27∼2008-01-29, and the sampling interval was 1 day. A total of 1000 days of data were involved in the modelling. e sampling value of 2008-01-22∼2008-01-29 was used as the prediction comparison data. Figure 2 is a flow chart of the dam GTWR deformation modelling, and then the GTWR model of the selected modelling point is built according to the flow chart.

Model Establishment.
In order to compare the GTWR model, GTWR and TWR modelling were done using the same data.

Data Preprocessing.
e horizontal displacement observation of the monitoring points uses 3 times the error method for gross error elimination. Lagrange interpolation is used to interpolate the missing item data.

GTWR and TWR Model Fitting.
e dependent variable is the displacement of monitoring sites, and the independent variables are water level, rainfall, and temperature. To model the selected 1000 days sampling data, the optimum window width parameters of TWR and GTWR models are first determined according to the CV criterion. e experimental analysis shows that the smooth parameter values of the model are all greater than 1, and the best window width h is needed in a large range, which is not only time-consuming, but also difficult to determine the search interval of h. In order to improve the search efficiency, the inverse number transformation method is used to search the optimal window width, that is, to make λ � 1/h, then search λ as a pseudowindow width parameter, and the range of λ is between 0 and 1, which greatly improves the search efficiency. Since the GTWR model is an overall model of multiple monitoring points, there is only one pair of optimal spatiotemporal window width parameters. e CV distribution and the optimal window width value are shown in Figure 3. e TWR is a single-point model, and the optimum window width parameter for each monitoring point must be determined separately. e distribution of its CV value and the optimum window width for each point are shown in Figure 4.
In Figures 3 and 4, B-h represents the optimal window width, and the position of the optimal window width in the CV distribution is indicated by the red * symbol. e optimal window width parameters of each model were used for model fitting, and the fitting precision and residual difference of GTWR and TWR models at each modelling point were obtained, respectively, as shown in Table 2 and Figure 5. Table 3 shows the comparison of overall fitting precision of the model. In Tables 2 and 3, the root mean square error (RMS) of the GTWR model is smaller than the TWR model and the fitting correlation coefficient (R 2 ) is larger. It can be concluded that the GTWR fitting result is evidently better than that of the TWR model.

GTWR Model Statistical Test.
Given a significant level of α � 0.05, the five-step hypothesis test is performed on the GTWR model according to the contents of Section 2.2. Table 4 shows the spatiotemporal global nonstationarity statistical test, the temporal global nonstationarity statistical test, and the spatial global nonstationarity statistical test. Table 5 shows the temporal nonstationarity statistical test and the spatial nonstationarity statistical test of the regression coefficients. From these tables, it can be concluded that the p value of each test of the model is less than 0.05, which indicates that both the model and the regression coefficient function are spatiotemporal nonstationarity, statistically demonstrating that the spatiotemporal observation sequence of the dam is suitable for establishing the GTWR model.

Comparison of Temporal Prediction Accuracy between GTWR and TWR Models.
e temporal prediction was carried out for the 10 points involved in the modelling, and      Table 6. e displacement predicted values, predicted residuals, and the RMS of the predicted residuals of the GTWR and TWR models at each modelling point are shown in Figures 6 and 7 and Table 6, respectively. It can be seen from Figure 6 that the predicted value of GTWR is closer to the true value than that of the TWR model. As can be seen from Table 6, except for the points EX2-11 and EX2-17, the GTWR model at all points is smaller than the predicted residual RMS of the TWR model and the temporal prediction accuracy of the GTWR model of these modelling points is improved by 27.6%∼ 68.3 compared with the TWR model. e prediction accuracy of the GTWR model at EX2-11 and EX2-17 points is lower than that of the TWR model, which may be caused by the end effect of the spatiotemporal model. It can also be seen from the prediction residual diagram that the amplitude of the predicted residual fluctuation around 0 of the GTWR model is smaller than that of the TWR model, and it        temporal prediction, but also can do the spatial prediction. However, the TWR model only considers the temporal correlation and cannot carry on the spatial prediction. We select the points EX2-10 and EX2-16 which are nonparticipating modelling points for spatial prediction. First, spatial prediction is performed on these two points that are not involved in modelling, and the prediction result is shown in Figure 8. e point EX2-16 is located in the middle of the modelling point group, and the point EX2-10 is located at the edge of the modelling point group, so the EX2-16 is more spatially correlated than the point EX2-10. From Figure 9, the point EX2-10 has a small RMS and small residual amplitude, which indicates that the point EX2-16 has higher spatial prediction accuracy than EX2-10. en, the temporal prediction of these two unknown points is carried out, and the displacement of the measuring points is predicted for the next 8 days. e prediction result is shown in Figure 9 and the accuracy statistics in Table 7. From the precision statistics in Tables 6 and 7, it can be found that the temporal prediction accuracy of the unknown points is comparable to that of the known modelling points, which shows that the spatial correlation of these measuring points is relatively strong. Compared with the TWR model, the GTWR model not only has higher temporal prediction accuracy, but also can take into account the spatial prediction for unknown points.

Conclusion
e GTWR model considers the spatiotemporal nonstationarity and the spatiotemporal correlation of deformation monitoring data. e spatial correlation between the modelling points, all of them constitute a whole model, can reflect the overall deformation trend and deformation law of the deformation body. is model can predict any point of the deformation body in time and space, avoiding the redundancy of the model and having higher prediction accuracy in deformation modelling. ese features have important significance in both deformation modelling and forecasting. When the GTWR model is built, it needs to be   tested comprehensively. If the test is not passed, the mixed geographically and temporally weighted regression model can be considered. e next step is to establish the spatiotemporal deformation model by using the mixed geographically and temporally weighted regression as shown in this paper.

Data Availability
e mat data used to support the findings of this study are included within the supplementary information files.

Conflicts of Interest
e authors declare that they have no conflicts of interest.