You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
The false nearest neighbours (FNN) ratio decreased to approximately 0.3 when the embedding dimension E reached 10, and remained relatively stable thereafter. Therefore, we adopted $E = 10$ as the embedding dimension for subsequent GCMC analysis.
82
82
83
+
Adopt an empirical k value derived from the square root of the product of embedding dimension and number of prediction samples:
Here we define two functions to process the results and plot the causal strengths matrix.
@@ -174,13 +182,13 @@ res1 = list(g1,g2,g3) |>
174
182
purrr::map(.process_xmap_result)|>
175
183
purrr::list_rbind()
176
184
res1
177
-
## cause effectcs sig
178
-
## 1 tem popd 0.575400 1.861243e-02
179
-
## 2 popd tem 0.089850 5.082649e-115
180
-
## 3 elev popd 0.267500 9.449794e-16
181
-
## 4 popd elev 0.077025 2.308728e-147
182
-
## 5 elev tem 0.224925 1.985034e-23
183
-
## 6 tem elev 0.477500 4.965603e-01
185
+
## cause effect cs sig
186
+
## 1 tem popd 0.61865788 6.192749e-04
187
+
## 2 popd tem 0.10636338 2.155996e-74
188
+
## 3 elev popd 0.30063067 1.757118e-09
189
+
## 4 popd elev 0.09279337 7.741115e-95
190
+
## 5 elev tem 0.24241780 1.674870e-16
191
+
## 6 tem elev 0.50017715 9.961254e-01
184
192
```
185
193
186
194
Visualize the result:
@@ -194,7 +202,7 @@ plot_cs_matrix(res1)
194
202
195
203
<br>
196
204
197
-
###An exampleof spatialgrid data
205
+
###Exampleof spatialraster data
198
206
199
207
Load the`spEDM` package and its farmland NPP data:
200
208
@@ -256,6 +264,14 @@ spEDM::fnn(npp, "npp", E = 1:25, lib = predindice, pred = predindice,
256
264
257
265
At $E = 18$, the false nearest neighbor ratio stabilizes at 0.10 and remains constant thereafter. Therefore, $E = 18$ is selected for the subsequent GCMC analysis.
258
266
267
+
Adopt an empirical k value derived from the square root of the product of embedding dimension and number of prediction samples: