-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathREADME.Rmd
More file actions
79 lines (53 loc) · 3.11 KB
/
README.Rmd
File metadata and controls
79 lines (53 loc) · 3.11 KB
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
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# BKP: An R Package for Beta Kernel Process Modeling <img src="man/figures/logo.png" align="right" height="140"/>
<!-- badges: start -->
[](https://deepwiki.com/Jiangyan-Zhao/BKP)
[](https://cran.r-project.org/package=BKP)

[](https://github.com/Jiangyan-Zhao/BKP/actions/workflows/R-CMD-check.yaml)
[](https://app.codecov.io/gh/Jiangyan-Zhao/BKP)
<!-- badges: end -->
We present **BKP**, a user-friendly and extensible **R** package that implements the **Beta Kernel Process (BKP)**---a fully nonparametric and computationally efficient framework for modeling spatially varying binomial probabilities. The BKP model combines localized kernel-weighted likelihoods with conjugate beta priors, resulting in closed-form posterior inference without requiring latent variable augmentation or intensive MCMC sampling. The package supports binary and aggregated binomial responses, allows flexible choices of kernel functions and prior specification, and provides loss-based kernel hyperparameter tuning procedures. In addition, BKP extends naturally to the **Dirichlet Kernel Process (DKP)** for modeling spatially varying multinomial data.
## Features
- ✅ Bayesian modeling for binomial and multinomial count data
- ✅ Kernel-based local information sharing
- ✅ Posterior prediction and uncertainty quantification
- ✅ Class label prediction using threshold or MAP rule
- ✅ Simulation from posterior (Beta or Dirichlet) distributions
## Installation
You can install the stable version of **BKP** from [CRAN](https://CRAN.R-project.org/package=BKP) with:
```{r, eval=FALSE}
install.packages("BKP")
```
Or install the development version from [GitHub](https://github.com/Jiangyan-Zhao/BKP) with:
```{r, eval=FALSE}
# install.packages("pak")
pak::pak("Jiangyan-Zhao/BKP")
```
## Documentation
The statistical foundations and example applications are described in the following vignette:
* [**BKP User Guide (PDF)**](https://arxiv.org/pdf/2508.10447)
## Citing
If you use **BKP** in your work, please cite both the methodology paper and the R package:
- **Methodology paper**
Zhao, J., Qing, K., and Xu, J. (2025). *BKP: An R Package for Beta Kernel Process Modeling.*
arXiv:2508.10447. <https://arxiv.org/abs/2508.10447>
- **R package**
Zhao, J., Qing, K., and Xu, J. (2025). *BKP: Beta Kernel Process Modeling.*
R package version 0.2.3. <https://cran.r-project.org/package=BKP>
You can also obtain the citation information directly within R:
```r
citation("BKP")
```
## Development
The BKP package is under active development. Contributions and suggestions are welcome via GitHub issues or pull requests.