-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.Rmd
60 lines (42 loc) · 1.62 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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-"
)
```
# waspr
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/waspr)](https://cran.r-project.org/package=waspr)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3971910.svg)](https://doi.org/10.5281/zenodo.3971910)
The goal of waspr is to compute Wasserstein barycenters of subset posteriors.
## Installation
The R-package waspr can be installed from CRAN as follows:
```{r gh-installation cran, eval = FALSE}
install.packages("waspr")
```
You can install a beta-version of waspr from github with:
```{r gh-installation, eval = FALSE}
install.packages("devtools")
devtools::install_github("joliencremers/waspr")
```
## Citation
To cite the package ‘waspr’ in publications use:
Jolien Cremers (2020). waspr: Wasserstein Barycenters of Subset Posteriors. R package
version 1.0.1. https://CRAN.R-project.org/package=waspr
or
Jolien Cremers (2020). waspr: Wasserstein Barycenters of Subset Posteriors. Zenodo, doi: 10.5281/zenodo.3971910
## Example
This is a basic example which shows you how to compute the Wasserstein
barycenter from a set of MCMC outputs for several data subsets. A more extensive
explanation of the usage of the package can be found in the Tutorial vignette.
```{r example}
library(waspr)
wasp(pois_logistic,
par.names = c("beta_s", "alpha_l", "beta_l",
"baseline_sigma", "baseline_mu",
"correlation", "sigma_s", "sigma_l"))
```