Pattern Causality Analysis
Overview
Infer causation from observational data through pattern causality analysis (PC), with original algorithm for time series data from Stavroglou et al. (2020) doi:10.1073/pnas.1918269117, as well as methodological extensions for spatial cross-sectional data introduced by Zhang & Wang (2025) doi:10.1080/13658816.2025.2581207, together with a systematic description proposed in Lyu et al. (2026) doi:10.1016/j.compenvurbsys.2026.102435.
new
- Provide
dmigeneric for *delayed mutual information* method (#77).
enhancements
- Clarify output indexing and boundary handling in
fnngeneric (#69).
breaking changes
- Reverse argument order for variable indices to
(source, target)(#85). - Impose geometric constraint
k >= E+1inopsgeneric (#81). - Euclidean/Manhattan distances now automatically compensate for dimensions skipped due to
NA/NaN, aligned with base Rdist()function (#79).
bug fixes
- Fix incorrect prediction horizon parameter in the time series pattern causality implementation (#80).
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK12 OK2026-04-25
- NOTE12 OK, 1 NOTE2026-04-22
- ERROR11 OK, 1 NOTE, 1 ERROR2026-04-18
Show 1 earlier changeHide 1 earlier change
- NOTE6 OK, 1 NOTE2026-03-31
Documentation
- Help pages
- 4
- Examples that run
- 100%4 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- not tracked
- Return-value docs
- not tracked
- Help pages citing references
- 75%
- pc HTML
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 10
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
7 development-tooling and community-health practices detected across 4 families in the upstream repository
Checks run against github.com/stscl/pc on 2026-10-22.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-10-10 · The repository has a site deploy workflow
pkgdown site last built 2026-10-10
Dependencies
Installing pc adds 46 packages (31 with compiled code, 50 MB of source tarballs). Heaviest: sf 9.3 MB, ggplot2 6.0 MB, spdep 4.5 MB.
Code & Tests
People & History
Package metadata
- First published
- 2026-03-30
- Total releases
- 3 / 1 yrs
- License
- GPL-3 OSI
- Minimum R
- ≥ 4.1.0
- Download size
- 1.3 MB
Cite
Cite this package
Run in R for the authors' entry:
citation("pc")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.32614/cran.package.pc.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.