{"id":32200722,"url":"https://github.com/abmantz/rgw","last_synced_at":"2025-10-22T03:55:01.077Z","repository":{"id":56936110,"uuid":"70491260","full_name":"abmantz/rgw","owner":"abmantz","description":"A lightweight R-language implementation of the affine-invariant sampling method of Goodman \u0026 Weare (2010)","archived":false,"fork":false,"pushed_at":"2023-07-26T21:21:24.000Z","size":17,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-10-22T03:54:39.938Z","etag":null,"topics":["markov-chain-monte-carlo","statistics"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abmantz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2016-10-10T13:33:36.000Z","updated_at":"2023-07-26T21:21:30.000Z","dependencies_parsed_at":"2025-09-08T15:23:49.907Z","dependency_job_id":"a1a0c599-456c-4c2c-8ac7-539e6be7bf37","html_url":"https://github.com/abmantz/rgw","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/abmantz/rgw","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abmantz%2Frgw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abmantz%2Frgw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abmantz%2Frgw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abmantz%2Frgw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abmantz","download_url":"https://codeload.github.com/abmantz/rgw/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abmantz%2Frgw/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280376551,"owners_count":26320276,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-22T02:00:06.515Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["markov-chain-monte-carlo","statistics"],"created_at":"2025-10-22T03:54:55.936Z","updated_at":"2025-10-22T03:55:01.069Z","avatar_url":"https://github.com/abmantz.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"http://ascl.net/1711.006\"\u003e\u003cimg src=\"https://img.shields.io/badge/ascl-1711.006-blue.svg?colorB=262255\" alt=\"ascl:1711.006\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://cran.r-project.org/package=rgw\"\u003e\u003cimg src=\"https://img.shields.io/cran/v/rgw.svg\" alt=\"CRAN\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://raw.githubusercontent.com/abmantz/rgw/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/cran/l/rgw.svg\" alt=\"MIT License\" /\u003e\u003c/a\u003e\n\n# rgw\n\nThis package implements in [R](https://www.r-project.org/)  the affine-invariant sampling method of [Goodman \u0026 Weare (2010)](http://dx.doi.org/10.2140/camcos.2010.5.65). This is a way of producing Monte-Carlo samples from a target distribution, which can be used for statistical inference.\n\nThis R implementation is based on the very clear description given by [Foreman-Mackey et al. (2012)](https://arxiv.org/abs/1202.3665), who provide an implementation [in python](http://dan.iel.fm/emcee).\n\n## Installation\n\n### From CRAN\n\nIn R, run ```install.packages(\"rgw\")```. Note that the version hosted on CRAN may lag behind this one (see [VERSION.md](VERSION.md)).\n\n### Manually (Linux/Unix/Mac)\n\n1. Clone this repository.\n2. In a terminal, navigate to the ```\u003crepository base\u003e/R/```.\n3. Run ```R CMD install rgw```. Alternatively, in an R session, run ```install.packages(\"rgw\", repos=NULL)```.\n\n## Use\n\nHere's the simple example that appears in the documentation:\n\n```R\n# In this example, we'll sample from a simple 2D Gaussian.\n\n# Define the log-posterior function\nlnP = function(x) sum( dnorm(x, c(0,1), c(pi, exp(0.5)), log=TRUE) )\n\n# Initialize an ensemble of 100 walkers. We'll take 100 steps, saving the ensemble after each.\nnwalk = 100\npost = array(NA, dim=c(2, nwalk, 101))\npost[1,,1] = rnorm(nwalk, 0, 0.1)\npost[2,,1] = rnorm(nwalk, 1, 0.1)\n\n# Run\npost = GoodmanWeare.rem(post, lnP)\n\n# Plot the final ensemble\nplot(post[1,,101], post[2,,101])\n# Look at the trace of each parameter for one of the walkers.\nplot(post[1,1,])\nplot(post[2,1,])\n# Go on to get confidence intervals, make niftier plots, etc.\n```\n\n## Help\n\nOpen an [issue](https://github.com/abmantz/rgw/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabmantz%2Frgw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabmantz%2Frgw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabmantz%2Frgw/lists"}