# Dynamic Functional Principal Components for Testing Causality
## 3 Testing Linear Causality
### Three Procedures for Testing the Causality
In fact, we used the function \"theoretical.coef\" (package \"far\") to obtain the parameters used internaly by the function \"simul.fax\" (package \"far\") to make the simulation. Table 1 presents the different forms for \(\rho\). The first scenario \"Null 1\" is used in the last line (line 4) of Table 2 of the level. Here, we represent the space \(\mathcal{H}\) by the space \(H_{m}\times H_{m}^{\prime}\). \(H_{m}\) is the space of \(Y_{t}\) and \(H_{m}^{\prime}\) for \(X_{t}\). Then, it can have more than two lines to represent \(\rho\), depending on the dimension of approximations of the two spaces \(H_{m}\) and \(H_{m}^{\prime}\). For example, if we take \(\dim(H_{m})=3\) and \(\dim(H_{m}^{\prime})=2\) (as in the first scenario) with a basis with two components, then in the case of scenario 1, we have the following approximations:

\begin{table}
\begin{tabular}{l c c c c} \hline \hline
**Scenario** & \(\rho\) & & & & **Dim X and Y** \\ \hline \multirow{3}{*}{Null 1} & (0.45 0.00 0.0 0.00 0. \[\rho_{11}= \begin{pmatrix}0.45&0.00&0.00\\ 0.00&0.3&0.00\\ 0.00&0.00&0.34\end{pmatrix} ,\rho_{12}= \begin{pmatrix}0.002&0.001\\ 0.001&0.002\\ 0.00&0.00\end{pmatrix} ,\]

\[\rho_{21}= \begin{pmatrix}0.00&0.00&0.00\\ 0.00&0.00&0.00\end{pmatrix} ,\rho_{22}= \begin{pmatrix}0.45&0.00\\ 0.00&0.40\end{pmatrix} .\]

We use different values for \(n=100,200\), with the parameter \(ncv=20,40\) and \(m=50\). \(n\) is the sample size, \(ncv\) the number used for the cross validation in the model \(FAR(1)\) and \(m\) is the number of discretization points used for one observation of the functional time series. The level of significance that was studied was \(\alpha=0.05\). The two parameters \(L\) and \(q\) of the Dynamic-FPCA algorithm were chosen according to the freqdom.fda package initializations with \(q=30\) and \(L\) as the minimum between the maximum possibilities and \(60\) (to avoid high calcuation time). For the analysis of \(d\) and \(d^{\prime}\), we chose to give the same value \(d=d^{\prime}\) for the sake of simplicity. In order to have an idea of what we are manipulating, we made some plots of different time series; see Figures 3-5. Figure 3 represents the whole trajectory of a functional time series simulated with sample size of \(100\). Figure 4 is the same as Figure 3 but we bring back the sequence series to the same time domain. Figure 5 plots the whole trajectory of two functional time series, which are in a causal relation. Figure 4: One trajectory on the same time domain. Figure 3: One trajectory. ### Results

We present the type I error (power, respectively) in Table 2 (Table 3, respectively) for each different considered scenario. We make a replication of order 1000 for each scenario. Then, we count the number of rejections of the Null hypothesis, which in the case of a true Null hypothesis gives an approximation of the type I error and in the case of false Null hypothesis gives an approximation of the power of the test (which is \(1-\beta\) where \(\beta\) is the type II error). In Table 2, we see that the nominal level 0.05 is very well respected for the F-causality and Dynamic-FPCA tests and for different values of \(n\). The parameter \(p\) of the classical test has to be well tuned, and there are many variations for this parameter. However, for \(p=3\) and only its value in the different simulation setup, the classical test reaches the nominal level correctly. In Table 3, we perform the test for the different scenarios with parameters \(n=100\) or \(200\), \(m=50\) and \(K=1\) to \(6\). We observe, in general, that the power is sufficiently high for the five different models. The sample size plays a role in the power. Higher is the sample size, the better is the power of the test. With \(n=200\), the power is sufficient. We can also see the influence of the parameter \(K\). We also note that if \(K\) is badly selected, then there can be a lack of power, as we can see in model 3, for example.