This repository has been archived by the owner on Sep 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
/
article4report.Rmd
110 lines (75 loc) · 2.92 KB
/
article4report.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
---
title: "空间广义线性模型"
subtitle: "代码实现"
author: "黄湘云"
date: "2018年3月"
geometry: margin=1.18in
fontsize: 12pt
linestretch: 1.5
links-as-notes: yes
output:
bookdown::pdf_document2:
latex_engine: xelatex
citation_package: natbib
number_sections: yes
keep_tex: no
toc_depth: 4
toc_unnumbered: no
toc_appendix: yes
toc_bib: yes
pandoc_args: "--top-level-division=section"
extra_dependencies:
ctex: fontset = fandol
bibliography: ../refer.bib
biblio-style: apalike
biblio-title: 参考文献
link-citations: yes
colorlinks: yes
classoption: "hyperref,a4paper,oneside"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# 模型形式
## 贝叶斯框架
分层多水平模型
### 泊松
### 二项
# 程序实现
## PrevMap 包
[@PrevMap2017JSS] 将 MCML 和 MCMC 方法应用于空间广义线性混合效应模型的参数估计和预测,
## geoR 与 geoRglm 包
## Stan 框架
[Stan](http://mc-stan.org/) 是一种概率编程语言[@Stan2017JSS],可以替代 BUGS ( **B**ayesian inference **U**sing **G**ibbs **S**ampling ) [@BUGS] 作为 MCMC 的高效实现,可用于贝叶斯框架下,标准地统计模型的参数估计,Stan 提供多种语言的接口实现,方便起见,本文采用它提供的 R 语言接口 -- rstan 包 [@RStan]。
```r
suppressPackageStartupMessages(library(rstan))
```
## PyMC 框架
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.
When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
```{r cars}
summary(cars)
```
## CUDA 框架
基于 GPU 加速是一个不错的选择, Stan 开发者也把 GPU 加速列入开发日程。scikit-cuda [@scikitcuda2015] ArrayFire [@ArrayFire2015] 等基于 CUDA 开发的通用加速框架获得越来越多的关注。
```{r pressure, echo=FALSE}
plot(pressure)
```
Note that the `echo = FALSE` parameter was added to the code chunk to prevent printing of the R code that generated the plot.
## R 进程信息
```{r}
sessionInfo()
```
\cleardoublepage
# (APPENDIX) Appendix {-}
# 算法细节
主要基于 Stan 框架实现
```r
library(rstan)
```
## 两个证明
渐进正态性和相合性
## 符号约定
斜体用于扩展包和框架,如 *knitr*、*PrevMap*、*CUDA*、*Stan* 等,粗体用于软件,如 **R**、**Python** 等,等宽体用于代码和代码块。
> 可能由于**Pandoc**转化不当, *knitr* 出来的 PDF 文档,其目录中参考文献是英文 Bibliography,因此需要手动修改 tex 文件的倒数第二行,将 bibname 改为 refname,然后在 **R** 控制台执行 `tinytex::xelatex(file = 'draft4report.tex')` 。
\cleardoublepage