@@ -198,7 +198,41 @@ corMatrix(cs3Exp)
198
198
diag(0.2, 5) + (1 - 0.2) * exp(-as.matrix(dist(spatDat)))
199
199
```
200
200
201
- 各个参数的估计值小数点后四舍五入保留三位有效数字。
201
+ 接下来,将 rongelap 观测数据代入,得到下图所示的位置相关性。
202
+
203
+ ``` {r}
204
+ #| label: fig-rongelap-corr-mat
205
+ #| fig-cap: "用热图表示基于空间位置的指数型相关性"
206
+ #| fig-showtext: true
207
+ #| fig-width: 5
208
+ #| fig-height: 4.5
209
+ #| code-fold: true
210
+ #| echo: !expr knitr::is_html_output()
211
+
212
+ csExp <- corExp(c(500, 0.2), form = ~ cX + cY, nugget = TRUE)
213
+ csExp <- Initialize(csExp, rongelap)
214
+ rongelap_corr_mat <- corMatrix(csExp)
215
+
216
+ library(lattice)
217
+ levelplot(rongelap_corr_mat,
218
+ xlab = NULL, ylab = NULL,
219
+ aspect = 1, colorkey = T, col.regions = cm.colors,
220
+ scales = list(draw = FALSE),
221
+ lattice.options = list(
222
+ layout.widths = list(
223
+ left.padding = list(x = 0, units = "inches"),
224
+ right.padding = list(x = 0, units = "inches")
225
+ ),
226
+ layout.heights = list(
227
+ bottom.padding = list(x = 0, units = "inches"),
228
+ top.padding = list(x = 0, units = "inches")
229
+ )
230
+ ),
231
+ par.settings = list(axis.line = list(col = "transparent"))
232
+ )
233
+ ```
234
+
235
+ 最后,整理模型输出结果,下面是各个参数的估计值,小数点后四舍五入保留三位有效数字。
202
236
203
237
- (Intercept) 截距对应于 $\beta$ 是 1.813
204
238
- range 对应于 $\phi$ 是 169.747
0 commit comments