# Stability Analysis of GNSS Stations Affected by Samos Earthquake
## 2 Materials and Methods  
### S-Transformation  
Conversion of a three-dimensional coordinate system into another reference frame or coordinate system acquires seven parameters: three parameters for the translation or shift of the origin between two coordinate systems for each axis, three parameters for the rotation of one coordinate system into the other around each axis and a scale factor for any scale differences between these systems. The S-transformation model for transforming 3D cartesian coordinates with seven parameters in matrix format is carried out using the following formula:  
\[ \begin{bmatrix}X^{\prime}\\ Y^{\prime}\\ Z^{\prime}\end{bmatrix} = \begin{bmatrix}t_{x}\\ t_{y}\\ t_{z}\end{bmatrix} +(1+k) \begin{bmatrix}1&\mathcal{E}_{z}&-\mathcal{E}_{y}\\ -\mathcal{E}_{z}&1&\mathcal{E}_{x}\\ \mathcal{E}_{y}&-\mathcal{E}_{x}&1\end{bmatrix}\begin{bmatrix}X\\ Y\\ Z\end{bmatrix}  \tag{1}\]  
where \(t_{x},\;\;t_{y}\) and \(t_{z}\) are shift parameters; \(\mathcal{E}_{x},\;\mathcal{E}_{y}\) and \(\mathcal{E}_{z}\) are rotation parameters; and \(k\) is the scale factor. The first thing to do is to estimate these parameters using two measurement cartesian coordinates (\(X^{\prime},\;Y^{\prime},\;Z^{\prime}\) and \(X,\;Y,\;Z\)). If the number of common stations is more than three, LS adjustment can be used for estimating seven parameters [16]. The least squares method for this transformation in matrix form is represented by Equations (2) and (3):  
\[ \begin{bmatrix}l_{x}\\ l_{y}\\ l_{z}\end{bmatrix} + \begin{bmatrix}v_{x}\\ v_{y}\\ v_{z}\end{bmatrix} = \begin{bmatrix}1&0&0&0&-Z&Y&X\\ 0&1&0&Z&0&-X&Y\\ 0&0&1&-Y&X&0&Z\end{bmatrix}\begin{bmatrix}t_{x}\\ t_{y}\\ t_{z}\\ \mathcal{E}_{y}\\ \mathcal{E}_{z}\\ k\end{bmatrix}  \tag{2}\]  
as \(l+v=Ax\)  
\[ \begin{bmatrix}l_{x}\\ l_{y}\\ l_{z}\end{bmatrix} = \begin{bmatrix}X^{\prime}-X\\ Y^{\prime}-Y\\ Z^{\prime}-Z\end{bmatrix}  \tag{3}\]  
where \(\vartheta(n\,\times\,1)\) is the residual vector, \(A(n\,\times\,u)\) is the design matrix and \(\hat{x}(u\,\times\,1)\) is the parameter vector, where \(n\) denotes the number of observations and \(u\) the number of parameters. The residual vector plays a very important role both in hypothesis testing and the threshold approach. Hypothesis testing is a statistical test that determines whether the sample values confirm a hypothesis or whether the hypothesis will be accepted. A null hypothesis and an alternative hypothesis are created, and the likelihood that the observed data would support or reject the null hypothesis is assessed using statistical tests in Equations (4)-(7):  
\[H_{0}\,:E(l)=0,\;H_{1}\,:E(l)\
eq 0 \tag{4}\]  
where \(H_{0}\) is the null hypothesis and \(H_{1}\) is the alternative hypothesis. \[T_{i}=\frac{|v_{i}|}{s_{0}\sqrt{Q_{v_{i}v_{i}}}}\;\;\sim\;\tau_{f} \tag{5}\]  
\[s_{0}=\sqrt{\frac{v^{T}Pv}{n-u}} \tag{6}\]  
\[\tau_{f,1-\alpha_{0}/2}=\sqrt{fF_{1,f-1,1-\alpha_{0}}/\left(f-1+F_{1,f-1,1- \alpha_{0}}\right)} \tag{7}\]  
where \(Q_{v_{i}v_{i}}\) is the cofactor matrix of the residual vector, \(s_{0}\) is the standard deviation of unit weight, \(T_{i}\) is a test value and \(\tau_{f,1-\alpha_{0}/2}\) is a critical value [31]. If \(T_{i}<\tau_{f,1-\alpha_{0}/2}\), the null hypothesis is accepted, which means that all the stations are stable at the \(\alpha=0.05\) significance level. If \(T_{i}>\tau_{f,1-\alpha_{0}/2}\), the null hypothesis is rejected; in other words, the alternative hypothesis is accepted, which means that there is at least one station that is unstable at the significance level. The threshold approach is a statistical method to assess whether a value exceeds a threshold or a critical value. Here, the threshold values are residuals which represent in Equation (8) the differences between the second epoch measurements and the transformed first epoch measurements. \[v_{i}\leq\pm 2*\sqrt{\sigma_{i_{II}}^{2}+\sigma_{i_{I}}^{2}} \tag{8}\]  
where \(v\) is the residuals while \(i=X,\ Y,\ Z,\ P\)[16]. Note that the residuals should be absolute values.