Skip to content

Commit 88e3598

Browse files
committed
用热图表示基于空间位置的指数型相关性
1 parent f6ddde6 commit 88e3598

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

analyze-spatial-data.qmd

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,41 @@ corMatrix(cs3Exp)
198198
diag(0.2, 5) + (1 - 0.2) * exp(-as.matrix(dist(spatDat)))
199199
```
200200

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+
最后,整理模型输出结果,下面是各个参数的估计值,小数点后四舍五入保留三位有效数字。
202236

203237
- (Intercept) 截距对应于 $\beta$ 是 1.813
204238
- range 对应于 $\phi$ 是 169.747

sampling-distributions.qmd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,8 @@ F 分布 R. A. Fisher
194194

195195
Wishart 分布
196196

197+
Theodore W. Anderson 的博士论文研究[非中心的 Wishart 分布](https://twa.ckirby.su.domains/AndersonThesis.pdf),以 Wishart(威沙特)分布的构造过程串一串统计分布的情况,比如和 $\chi^2$ 分布的关系。Wishart 分布的表示和构造借助 Cholesky 分解
198+
197199
## 霍特林分布 {#hoteling-distribution}
198200

199201
霍特林分布 $T^2$

0 commit comments

Comments
 (0)