rgw
A lightweight R-language implementation of the affine-invariant sampling method of Goodman & Weare (2010)
Science Score: 33.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
✓DOI references
Found 3 DOI reference(s) in README -
✓Academic publication links
Links to: arxiv.org -
✓Committers with academic emails
2 of 2 committers (100.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.9%) to scientific vocabulary
Keywords
Repository
A lightweight R-language implementation of the affine-invariant sampling method of Goodman & Weare (2010)
Basic Info
Statistics
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
rgw
This package implements in R the affine-invariant sampling method of Goodman & Weare (2010). This is a way of producing Monte-Carlo samples from a target distribution, which can be used for statistical inference.
This R implementation is based on the very clear description given by Foreman-Mackey et al. (2012), who provide an implementation in python.
Installation
From CRAN
In R, run install.packages("rgw"). Note that the version hosted on CRAN may lag behind this one (see VERSION.md).
Manually (Linux/Unix/Mac)
- Clone this repository.
- In a terminal, navigate to the
<repository base>/R/. - Run
R CMD install rgw. Alternatively, in an R session, runinstall.packages("rgw", repos=NULL).
Use
Here's the simple example that appears in the documentation:
```R
In this example, we'll sample from a simple 2D Gaussian.
Define the log-posterior function
lnP = function(x) sum( dnorm(x, c(0,1), c(pi, exp(0.5)), log=TRUE) )
Initialize an ensemble of 100 walkers. We'll take 100 steps, saving the ensemble after each.
nwalk = 100 post = array(NA, dim=c(2, nwalk, 101)) post[1,,1] = rnorm(nwalk, 0, 0.1) post[2,,1] = rnorm(nwalk, 1, 0.1)
Run
post = GoodmanWeare.rem(post, lnP)
Plot the final ensemble
plot(post[1,,101], post[2,,101])
Look at the trace of each parameter for one of the walkers.
plot(post[1,1,]) plot(post[2,1,])
Go on to get confidence intervals, make niftier plots, etc.
```
Help
Open an issue.
Owner
- Name: Adam Mantz
- Login: abmantz
- Kind: user
- Repositories: 5
- Profile: https://github.com/abmantz
GitHub Events
Total
Last Year
Committers
Last synced: over 3 years ago
All Time
- Total Commits: 15
- Total Committers: 2
- Avg Commits per committer: 7.5
- Development Distribution Score (DDS): 0.333
Top Committers
| Name | Commits | |
|---|---|---|
| Adam Mantz | a****z@s****u | 10 |
| Adam Mantz | a****z@x****u | 5 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 11 months ago
All Time
- Total issues: 0
- Total pull requests: 2
- Average time to close issues: N/A
- Average time to close pull requests: 10 days
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- abmantz (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 206 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 2
- Total maintainers: 1
cran.r-project.org: rgw
Goodman-Weare Affine-Invariant Sampling
- Homepage: https://github.com/abmantz/rgw
- Documentation: http://cran.r-project.org/web/packages/rgw/rgw.pdf
- License: MIT + file LICENSE
-
Latest release: 0.3.0
published almost 6 years ago
Rankings
Maintainers (1)
Dependencies
- parallel * imports