| Title: | Analysis of Coupling Coordination Degree |
|---|---|
| Description: | Implements coupling coordination degree (CCD) models and supports metacoupling analysis following Tang et al. (2021) <doi:10.1016/j.scs.2021.103405>. |
| Authors: | Wenbo Lyu [aut, cre, cph] (ORCID: <https://orcid.org/0009-0002-6003-3800>) |
| Maintainer: | Wenbo Lyu <[email protected]> |
| License: | GPL-3 |
| Version: | 0.1 |
| Built: | 2026-05-15 22:02:01 UTC |
| Source: | https://github.com/cran/coupling |
Coupling Coordination Degree (CCD)
ccd(data, weight = NULL, method = c("standard", "wang", "fan"), threads = 1)ccd(data, weight = NULL, method = c("standard", "wang", "fan"), threads = 1)
data |
A numeric matrix or data.frame. Rows are observations, columns are indicators. |
weight |
Numeric vector of indicator weights. Must have length equal
to |
method |
Coupling model. One of |
threads |
Number of threads used in computation. |
Full model definitions and formulas are available at: https://github.com/stscl/coupling/discussions/3
A data.frame with:
C: coupling degree
D: coordination degree
Input values should be normalized to [0, 1].
set.seed(42) mat = matrix(runif(20), nrow = 5) coupling::ccd(mat)set.seed(42) mat = matrix(runif(20), nrow = 5) coupling::ccd(mat)
Metacoupling Analysis
metacoupling( data, swm_peri = NULL, swm_tele = NULL, weight = NULL, method = c("standard", "wang", "fan"), threads = 1 )metacoupling( data, swm_peri = NULL, swm_tele = NULL, weight = NULL, method = c("standard", "wang", "fan"), threads = 1 )
data |
A numeric matrix or data.frame. Rows are observations, columns are indicators. |
swm_peri |
A numeric matrix representing the peri (local) spatial weight matrix.
Must be square with dimension equal to |
swm_tele |
A numeric matrix representing the tele (long-distance) spatial weight matrix.
Must be square with dimension equal to |
weight |
Numeric vector of indicator weights. Must have length equal
to |
method |
Coupling model. One of |
threads |
Number of threads used in computation. |
Full model definitions and formulas are available at: https://github.com/stscl/coupling/discussions/8
A data.frame with:
Intra_C: intra-system coupling degree
Intra_D: intra-system coordination degree
Peri_C: peri-coupling degree
Peri_D: peri coordination degree
Tele_C: tele-coupling degree
Tele_D: tele coordination degree
Input values should be normalized to [0, 1]. Spatial weight matrices are
typically symmetric.
set.seed(42) mat = matrix(runif(20), nrow = 5) swm1 = apply(matrix(runif(25), 5, 5), 1, \(.x) .x / sum(.x)) swm2 = apply(matrix(runif(25), 5, 5), 1, \(.x) .x / sum(.x)) coupling::metacoupling(mat, swm1, swm2)set.seed(42) mat = matrix(runif(20), nrow = 5) swm1 = apply(matrix(runif(25), 5, 5), 1, \(.x) .x / sum(.x)) swm2 = apply(matrix(runif(25), 5, 5), 1, \(.x) .x / sum(.x)) coupling::metacoupling(mat, swm1, swm2)