-
Notifications
You must be signed in to change notification settings - Fork 3
/
README.Rmd
99 lines (75 loc) · 3.15 KB
/
README.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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "##",
fig.path = "man/figures/README-",
out.width = "100%",
warning = FALSE,
message = FALSE
)
```
# gdverse <a href="https://stscl.github.io/gdverse/"><img src="man/figures/logo.png" align="right" height="139" alt="gdverse website" /></a>
<!-- badges: start -->
[![cran](https://www.r-pkg.org/badges/version/gdverse)](https://CRAN.R-project.org/package=gdverse)
[![downloads_all](https://badgen.net/cran/dt/gdverse?color=orange)](https://CRAN.R-project.org/package=gdverse)
[![downloads_month](https://cranlogs.r-pkg.org/badges/gdverse)](https://CRAN.R-project.org/package=gdverse)
[![r-universe](https://stscl.r-universe.dev/badges/gdverse?color=cyan)](https://stscl.r-universe.dev/gdverse)
<!-- badges: end -->
**Analysis of Spatial Stratified Heterogeneity**
## Overview
Current models and functions provided by **gdverse** are:
| *Model* | *Function* | *Support* |
|---------------------|--------------------|------------------|
|[GeoDetector](https://doi.org/10.1080/13658810802443457)|`geodetector()`| ✔️ |
|[OPGD](https://doi.org/10.1080/15481603.2020.1760434)|`opgd()`| ✔️ |
|[GOZH](https://doi.org/10.1016/j.isprsjprs.2022.01.009)|`gozh()`| ✔️ |
|[LESH](https://doi.org/10.1080/17538947.2023.2271883)|`lesh()`| ✔️ |
|[SPADE](https://doi.org/10.1080/13658816.2018.1476693)|`spade()`| ✔️ |
|[IDSA](https://doi.org/10.1080/13658816.2021.1882680)|`idsa()`| ✔️ |
|[RGD](https://doi.org/10.1016/j.jag.2022.102782)|`rgd()`| ✔️ |
|[RID](https://doi.org/10.1016/j.spasta.2024.100814)|`rid()`| ✔️ |
|[SRSGD](https://doi.org/10.1016/j.ins.2021.12.019)|`srsgd()`| ✔️ |
## Installation
- Install from [CRAN](https://CRAN.R-project.org/package=gdverse) with:
``` r
install.packages("gdverse", dep = TRUE)
```
- Install development binary version from [R-universe](https://stscl.r-universe.dev/gdverse) with:
``` r
install.packages('gdverse',
repos = c("https://stscl.r-universe.dev",
"https://cloud.r-project.org"),
dep = TRUE)
```
- Install development source version from [GitHub](https://github.com/stscl/gdverse) with:
``` r
# install.packages("devtools")
devtools::install_github("stscl/gdverse",
build_vignettes = TRUE,
dep = TRUE)
```
✨ Please ensure that **Rcpp** is properly installed and the appropriate **C++** compilation environment is configured in advance if you want to install **gdverse** from github.
✨ The **gdverse** package supports the use of robust discretization for the robust geographical detector and robust interaction detector. For details on using them, please refer to <https://stscl.github.io/gdverse/articles/rgdrid.html>.
## Example
```{r example_gdverse}
library(gdverse)
data("ndvi")
ndvi
```
### OPGD model
```{r}
discvar = names(ndvi)[-1:-3]
discvar
ndvi_opgd = opgd(NDVIchange ~ ., data = ndvi,
discvar = discvar, cores = 6)
ndvi_opgd
```
### GOZH model
```{r}
g = gozh(NDVIchange ~ ., data = ndvi)
g
```