Repository: stan-dev/posteriordb (language: python)

Issue:
Fix implementation info for pymc3 eight schools model
Currently the model info for `eight_schools_centered` indicates that it has a pymc3 implementation, when the implementation is actually for `eight_schools_noncentered`. This PR corrects the model info.


Discussion / hints:

Fix patch:
diff --git a/.github/workflows/posteriordb_content.yml b/.github/workflows/posteriordb_content.yml
index bdfd7537..82394d6f 100644
--- a/.github/workflows/posteriordb_content.yml
+++ b/.github/workflows/posteriordb_content.yml
@@ -6,9 +6,6 @@ on:
     branches:
       - master
       - development
-    paths:
-      - 'posterior_database/*'
-      - 'tests/*'
   pull_request:
     branches:
       - master
@@ -26,9 +23,9 @@ jobs:
     env:
       GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
     steps:
-      - uses: actions/checkout@master
+      - uses: actions/checkout@v3
 
-      - uses: r-lib/actions/setup-r@master
+      - uses: r-lib/actions/setup-r@v2
 
       - id: files
         uses: jitterbit/get-changed-files@v1
diff --git a/doc/CONTRIBUTING.md b/doc/CONTRIBUTING.md
index 75db46e3..19499fa5 100644
--- a/doc/CONTRIBUTING.md
+++ b/doc/CONTRIBUTING.md
@@ -1,254 +1,39 @@
 Contributing
 ============
 
-We are happy for you to contribute with code or new posteriors to the database. Just create a Pull Request with your new content to the posteriordb; the content will be checked using Travis CI.
+We are happy for you to contribute with code or new posteriors to the database. Create a Pull Request (PR) with your new content to the posteriordb; the content will be checked using Github Actions.
 
-Don't hesitate to make a Pull Request (PR) with a new model, data, or posterior to the repository. We use the PR for discussion on new material!
+Don't hesitate to make a PR with a new model, data, or posterior to the repository. We use the PR for discussion on new material!
 
 Copyright
 -------------
-All models supplied will use the BSD3 license by default (see R package). It is possible to specify an altenrative open-source license in data, model or reference posterior info object.
+All models supplied will use the BSD3 license by default. Specifying an alternative open-source license for data, model or reference posterior object is possible.
+
 
 Pull request workflow
 -------------
 
-1. Fork this repository
-1. Make a contribution and add to the local (cloned) posteriordb
-1. Commit the contribution and push to the fork
-1. Open a pull request (the tests of the contribution will the automatically run on Github Action)
+1. Fork this repository and clone the repository
+1. Contribute and add data/models/posteriors to the local (cloned) posteriordb
+1. Commit the contribution and push to your fork
+1. Open a pull request (the tests of the contribution will automatically run on Github Action)
 
 
 CONTRIBUTING CONTENT
 -------------
 
-It is currently much simpler to add new content through R, but hopefully, this will be simplified further on.
-
-## Add content through R
+There are currently two ways to contribute content to the posterior database: (1) Adding new content directly, (2) Adding content using R and the `posteriordb` R package.
 
-Start by installing and loading the posteriordb R package. We then
-
-```
-devtools::install_local("rpackage/")
-library(posteriordb)
-library(rstan)
-
-# We setup a connection to the local posteriordb
-pdbl <- pdb_local()
-```
-
-### Add Data
-
-The next step is to add and write down information about the data. Below is a test example using data from the eight schools example.
-
-```
-x <- list(name = "test_eight_schools_data",
-          keywords = c("test_data"),
-          title = "A Test Data for the Eight Schools Model",
-          description = "The data contain data from eight schools on SAT scores.",
-          urls = "https://cran.r-project.org/web/packages/rstan/vignettes/rstan.html",
-          references = "testBiBTeX2020",
-          added_date = Sys.Date(),
-          added_by = "Stanislaw Ulam")
-
-# Create the data info object
-di <- pdb_data_info(x)
-
-# Access the data
-file_path <- system.file("test_files/eight_schools.R", package = "posteriordb")
-source(file_path)
-
-# Create the data object
-dat <- pdb_data(eight_schools, info = di)
-```
-
-We can now add the data object to the database (or remove it). The function ```write_pdb()``` will write and zip the data.
-
-```
-write_pdb(dat, pdbl)
-# We can then remove the data from the database in a similar way.
-# remove_pdb(dat, pdbl)
-```
-
-### Add Model
-
-Similarly, we can add stan-files and model information as follows: a test case using the eight school model.
-
-```
-x <- list(name = "test_eight_schools_model",
-          keywords = c("test_model", "hiearchical"),
-          title = "Test Non-Centered Model for Eight Schools",
-          description = "An hiearchical model, non-centered parametrisation.",
-          urls = c("https://cran.r-project.org/web/packages/rstan/vignettes/rstan.html"),
-          framework = "stan",
-          references = NULL,
-          added_by = "Stanislaw Ulam",
-          added_date = Sys.Date())
-mi <- pdb_model_info(x)
-
-# Read in Stan model and compile the model
-file_path <- system.file("test_files/eight_schools_noncentered.stan", package = "posteriordb")
-smc <- readLines(file_path)
-sm <- rstan::stan_model(model_code = smc)
-mc <- model_code(sm, info = mi)
-
-# Write the model to the database
-write_pdb(mc, pdbl)
-
-# We can then remove the data from the database with:
-# remove_pdb(mc, pdbl)
-```
-
-### Add Posterior Object
-```
-x <- list(pdb_model_code = mc,
-          pdb_data = dat,
-          keywords = "posterior_keywords",
-          urls = "posterior_urls",
-          references = "posterior_references",
-          dimensions = list("dimensions" = 2, "dim" = 3),
-          reference_posterior_name = NULL,
-          added_date = Sys.Date(),
-          added_by = "Stanislaw Ulam")
-po <- pdb_posterior(x, pdbl)
-
-# We write to the database as done previously
-write_pdb(po, pdbl)
-# To remove the posterior, we use:
-# remove_pdb(po, pdbl)
-```
-
-Finally, we want to check that everything is in order with the posterior. We do this as follows:
-
-```
-check_pdb_posterior(po)
-```
-We have not added `testBiBTeX2020` to the bibliography, and hence the function throws an error.
-
-If the posterior passes all checks, it can be added to the posteriordb, so it is just to open a Pull Request with the proposed posterior.
-
-
-### Add Posterior Reference Draws
-
-If possible, we would like to supply posterior reference draws, i.e., draws of excellent quality from the posterior. The [REFERENCE_POSTERIOR_DEFINITION.md](https://github.com/MansMeg/posteriordb/blob/master/doc/REFERENCE_POSTERIOR_DEFINITION.md) contain details on quality criteria for reference posteriors.
-
-```
-pdbl <- pdb_local()
-po <- posterior("test_eight_schools_data-test_eight_schools_model", pdbl)
-
-# Access the Makevar for reproducibility
-M <- file.path(Sys.getenv("HOME"), ".R", ifelse(.Platform$OS.type == "windows", "Makevars.win", "Makevars"))
-Mfile <- if(file.exists(M)) paste(readLines(M), collapse = "\n") else ""
-
-# Setup reference posterior info ----
-x <- list(name = posterior_name(po),
-          inference = list(method = "stan_sampling",
-                           method_arguments = list(chains = 10,
-                                                   iter = 20000,
-                                                   warmup = 10000,
-                                                   thin = 10,
-                                                   seed = 4711,
-                                                   control = list(adapt_delta = 0.92))),
-          diagnostics = NULL,
-          checks_made = NULL,
-          comments = "This is a test reference posterior",
-          added_by = "Stanislaw Ulam",
-          added_date = Sys.Date(),
-          versions = list(rstan_version = paste("rstan", utils::packageVersion("rstan")),
-                          r_Makevars = paste(readLines("~/.R/Makevars"), collapse = "\n"), # This works for macosx
-                          r_version = R.version$version.string,
-                          r_session = paste(capture.output(print(sessionInfo())), collapse = "\n")))
-
-# Create a reference posterior draws info object
-rpi <- pdb_reference_posterior_draws_info(x)
-```
-
-The reference posterior draws info contain all information to compute the posterior using rstan. We then check that the reference posterior criteria are fulfilled and add checked diagnostics to the object.
-
-```
-# Compute the reference posterior
-rp <- compute_reference_posterior_draws(rpi, pdbl)
-rp <- check_reference_posterior_draws(x = rp)
-```
-
-We can now write the reference posterior draws to the posteriordb.
-
-````
-write_pdb(rp, pdbl, overwrite = TRUE)
-# To remove the object, just run:
-# remove_pdb(rp, pdbl)
-````
+It is currently simpler to add new content through R, but hopefully, we will simplify other approaches further on.
 
 
 ## Add content directly
 
-It is possible to add content directly to the database by manually specifying the JSON objects. A simple approach is to use eight_schools posterior as a template.
-
-
-
-Pre-commit and Tests
-====================
-
-Below are more details on how to run pre-commits for code cleaning and
-tests to test your contribution locally before opening up a PR.
-
-Installing pre-commit
---------------
-
-[pre-commit](https://pre-commit.com/) helps catch style issues early so
-reviewing PRs can focus on more meaningful parts of the PR.
-
-Install it with
-```bash
-python3 -m pip install --user pre-commit
-```
-Your system needs to have Python 3.6 or higher.
-
-Check that it works correctly.
+It is possible to add content directly to the database by manually specifying the JSON objects. A simple approach is to use the `eight_schools-eight_schools_noncentered` posterior,the `eight_schools_noncentered` model, and the `eight_schools` data as a template to start out from.
 
-```
-pre-commit run --all-files
-```
+The exact content of each information file can be found in [doc/DATABASE_CONTENT.md](https://github.com/stan-dev/posteriordb/blob/master/doc/DATABASE_CONTENT.md).
 
-Install pre-commit hooks
-
-```bash
-pre-commit install
-```
-
-Now, pre-commit hooks get run when you `git commit`. For example, if a file
-that you are committing has trailing whitespace `pre-commit` will remove
-the trailing whitespace, abort the commit and let you stage the modifications.
-Then you can run `git commit` again.
-
-All the checks are also run by continuous integration when you make a pull request.
-These checks mean that you don't necessarily have to use `pre-commit` locally.
-However, we suggest using it locally as that gives more immediate feedback.
-
-
-Tests
------------
-
-See python and R test sections.
-
-### Python tests
-
-
-1. Install `tox`: `pip install tox`
-1. Run
-   ```bash
-   tox
-   ```
-   Tox automatically configures several python versions and runs the tests on each of them.
-   **NOTE**: python 3.6 and python 3.7 need to be installed.
-
-   It is also fine to run on just one python version if, for example, you don't have
-   all the versions installed locally. (as continuous integration will cover
-   running on all versions)
-   ```bash
-   tox -e py36, linting
-   ```
-   This bash script runs the tests on python3.6 and also runs the linting step.
+## Add content through R
 
-### R tests
+You can find an extensive vignette detailing how to add content from R [here](https://htmlpreview.github.io/?https://github.com/stan-dev/posteriordb-r/blob/main/vignettes/contributing.html).
 
-See ```rpackage/tests```.
diff --git a/doc/DATABASE_CONTENT.md b/doc/DATABASE_CONTENT.md
index 429b0cc9..14fd99f4 100644
--- a/doc/DATABASE_CONTENT.md
+++ b/doc/DATABASE_CONTENT.md
@@ -1,8 +1,8 @@
 
-The Content of the Database
+The Content of the Posterior Database
 =================================================
 
-Travis CI is used to check that the database conforms in the following way.
+Github Actions is used to check that the database conforms to the following structure.
 
 ## Posteriors `posteriors`
 
@@ -11,23 +11,22 @@ Posteriors are stored as json files as `posteriors/[posterior_name].json`.
 All posteriors in the database contain (at minimum):
 - `data_name`: Data (name)
 - `model_name`: Model (name)
-- `added_by`: Added by (name and github name)
-- `added_date`: Added date (name and github name)
+- `added_by`: Name of the person that added the posterior
+- `added_date`: Date of the person that added the posterior
 
 Also, the posterior can contain slots on
-- `references`: What references should be cited if the posterior is used. This is BibTeX slots. The actual references can be found in `references/references.bib`.
-- `gold_standard_name`: Gold standard name / posterior name if it extists. Otherwise is `null`.
-- `dimension`: Dimensions of different parameter names. The sum is the total dimension of the posterior, hence the dimension of Dirichlet vector of length K is K - 1.
+- `references`: What references should be cited if the posterior is used. These are using BibTeX short names. You can find the actual references in `references/references.bib`.
+- `reference_posterior_name`: Reference posterior name if it exists/has been computed. Otherwise is `null`.
+- `dimension`: Dimensions of different parameter names. The sum is the total dimension of the posterior. Hence the dimension of the Dirichlet vector of length K is K - 1.
 - `keywords`: Keywords for the data (see keywords below)
 
 
 ## Data `data`
-
-All datasets are stored as zipped JSON-objects in `data/data` and information on the specific data is stored in `data/info`. The raw datasets and reproducible scripts can be found `data/data-raw`.
+All datasets are stored as zipped JSON objects in `data/data`, and information on the specific data is stored in `data/info`. The raw datasets and reproducible scripts can be found `data/data-raw`.
 
 ### `data/data`
 
-1. All data are stored as zipped JSON files stored as `data/data/[data_name].json.zip`.
+1. All data are stored as zipped JSON files as `data/data/[data_name].json.zip`.
 2. Matrices are stored as a list of row vectors.
 
 ### `data/info`
@@ -38,38 +37,37 @@ All data in the database contain (at minimum):
 - `name`: The dataset name
 - `data_file`: Path to data JSON in the database
 - `title`: The title for the dataset (used for printing)
-- `added_by`: Added by (name and github name)
-- `added_date`: Date the file was added (name and github name)
+- `added_by`: Name of the person who added the dataset.
+- `added_date`: Date when the dataset was added.
 
 Also, the posterior can contain slots on
-- `references`: What references should be cited if the data is used. This is BibTeX slots. The actual references should be found in `references/references.bib`.
+- `references`: What references should be cited if the dataset is used. These are using BibTeX short names. You can find the actual references in `references/references.bib`.
 - `description`: A short description of the data used.
-- `urls`: URLs to the data to read more.
+- `urls`: URLs to the data with more information.
 - `keywords`: Keywords for the data (see keywords below)
 
 
 ### `data/data-raw`
 
-The raw dataset and conversion scripts from raw format to the usable JSON-files can be found in `data-raw/[data_name]`.
+We can find the raw dataset and conversion scripts from raw format to the usable JSON files in `data-raw/[data_name]`.
 
-The script should be executable (in R or Python) to reproduce the data-set at the given location and be called `[data_name].r` or `[data_name].py`.
+The script should be executable (in R or Python) to reproduce the dataset at the given location and be called `[data_name].r` or `[data_name].py`.
 
 ## Models `models`
 
 ### `models/info`
 
-The model info file contains information on the model and is stored as   `models/info/[model_name].info.json`.
+The model info file contains information on the model and is stored as `models/info/[model_name].info.json`.
 
-All data in the database contain (at minimum):
+All models in the database contain (at minimum):
 - `name`: The model name
 - `model_code`: A named JSON object with one element per framework. For example, the "stan" points to a model representation as stan code.
 - `title`: The title for the model (used for printing)
-- `dimensions`: A named list with dimensions per parameter name. Can be used to identify the parameters of the given model if, for example, transformed variables are used. If null, all parameters are relevant and are included in the gold standard.
-- `added_by`: Added by (name and github name)
-- `added_date`: Date the file was added (name and github name)
+- `added_by`: Name of the person who added the dataset.
+- `added_date`: Date when the dataset was added.
 
-Also, the posterior can contain slots on
-- `references`: What references should be cited if the model is used. This is BibTeX elements. The actual references should be included in `references/references.bib`.
+Also, the models can contain slots on
+- `references`: What references should be cited if the model is used. These are using BibTeX short names. You can find the actual references in `references/references.bib`.
 - `description`: A short description of the model used.
 - `urls`: urls to the model to read more.
 - `keywords`: Keywords for the model (see keywords below)
@@ -78,31 +76,25 @@ Also, the posterior can contain slots on
 
 Contain models as stan files stored as `models/stan/[model_name].stan`.
 
-## Gold standard `gold_standards`
+## Posterior reference draws `reference_draws`
 
-Contain gold standard information are stored as JSON in `gold_standards/info/[posterior_name].info.json`. The actual draws
-are stored in `gold_standards/draws/[posterior_name].json.zip`.
+Contain reference draws information are stored as JSON in `reference_posteriors/draws/info/[posterior_name].info.json`. The actual draws are stored in `reference_posteriors/draws/[posterior_name].json.zip`.
 
-See [GOLD_STANDARD_CRITERIA.md](https://github.com/MansMeg/posteriordb/blob/master/docs/GOLD_STANDARD_CRITERIA.md) for details on what is considered to be a gold standard in the posteriordb.
+See [REFERENCE_POSTERIOR_DEFINITION.md](https://github.com/stan-dev/posteriordb/blob/master/doc/REFERENCE_POSTERIOR_DEFINITION.md) for details on what is considered to be reference posterior draws in the posteriordb.
 
-All gold_standard in the database contains (at minimum) the following information:
-- `name`: The posterior/gold_standard name.
+All reference draws in the database contains (at minimum) the following information:
+- `name`: The reference_posterior name.
  "comments", "added_by", "added_date", "versions"
 - `inference`:
   - `method`: How were the draws created (e.g. "stan_sampling" or "analytical")
-  - `method_arguments`: arguments used to create reference_posterior, such as `chains`, `iter`, `warmup`, `algorithm`, `seed` etc. for full reproducibility.
+  - `method_arguments`: arguments used to create reference_posterior, such as `chains`, `iter`, `warmup`, `algorithm`, `seed` etc., for full reproducibility.
 - `diagnostics`: Stored diagnostic values of the reference posterior
-- `checks_made`: Checks that has been made on the reference posterior to asses it comply to the reference posterior definition. See [REFERENCE_POSTERIOR_DEFINITION.md](https://github.com/MansMeg/posteriordb/blob/master/docs/REFERENCE_POSTERIOR_DEFINITION.md).
+- `checks_made`: Checks made on the reference posterior to asses it complies with the reference posterior definition. See [REFERENCE_POSTERIOR_DEFINITION.md](https://github.com/stan-dev/posteriordb/blob/master/doc/REFERENCE_POSTERIOR_DEFINITION.md).
 - `comments`: Additional comments on the
 - `added_by`: Added by (name)
 - `added_date`: Date the file was added
 - `versions`:
 
-
-In addition the gold_standard posterior draws ziped JSON file contain at least the following:
-- a named list with all parameters specified in the stan model file of the posterior nested as chains, parameters, draws.
-
-
 ## References `references`
 
 It contains a bib-tex file with all references in the databases for quickly assembling bibliographies of a specific set of posteriors, models or data.
@@ -115,5 +107,5 @@ JSON-schemas for all elements in the database. Currently not included.
 
 ## Keyword
 
-In the database, there are multiple keywords used (and can be added by users). Some relevant keywords of interest:
+In the database, multiple keywords are used (and can be added by users). Some relevant keywords of interest:
 - `stan_benchmarks`: Models included in the Stan Benchmarks
diff --git a/posterior_database/bibliography/references.bib b/posterior_database/bibliography/references.bib
index 3c2f68c7..207d98dc 100644
--- a/posterior_database/bibliography/references.bib
+++ b/posterior_database/bibliography/references.bib
@@ -218,17 +218,17 @@ @article{lampinen2001bayesian
 }
 
 @misc{jonasson2021rapid,
-Author = {Johan Jonasson and Måns Magnusson},
-Title = {Rapid mixing in unimodal landscapes and efficient simulated annealing for multimodal distributions},
-Year = {2021},
-Eprint = {arXiv:2101.10004},
+  Author = {Johan Jonasson and Måns Magnusson},
+  Title = {Rapid mixing in unimodal landscapes and efficient simulated annealing for multimodal distributions},
+  Year = {2021},
+  Eprint = {arXiv:2101.10004},
 }
 
 @misc{farkas2014threemen,
-Author = {Andras Farkas},
-Title = {Three Men and a Boat, translated by Andras Farkas to French and Swedish},
-url = {FarkasTranslations.com},
-Year = {2014},
+  Author = {Andras Farkas},
+  Title = {Three Men and a Boat, translated by Andras Farkas to French and Swedish},
+  url = {FarkasTranslations.com},
+  Year = {2014},
 }
 
 @misc{reif2008bird,
@@ -262,3 +262,55 @@ @book{reif1995euro
   year={1995},
   publisher={Inter-university Consortium for Political and Social Research}
 }
+
+@misc{mrc1winbugs,
+  Author = {MRC Biostatistics Unit},
+  Title = {Examples Volume 1},
+  url = {http://www.mrc-bsu.cam.ac.uk/wp-content/uploads/WinBUGS_Vol1.pdf},
+}
+
+@misc{mrc2winbugs,
+  Author = {MRC Biostatistics Unit},
+  Title = {Examples Volume 2},
+  url = {http://www.mrc-bsu.cam.ac.uk/wp-content/uploads/WinBUGS_Vol2.pdf},
+}
+
+@article{roche1975rwt,
+  author = {Alex F. Roche and Howard Wainer and David Thissen},
+  title = {The RWT Method for the Prediction of Adult Stature},
+  journal = {Official Journal of the American Academy of Pediatrics},
+  year = {1975},
+  volume = {56},
+  number = {6},
+  pages = {1026--1033},
+  publisher = {American Academy of Pediatrics}
+}
+
+@article{gelfand1990illustration,
+  author = {Alan E. Gelfand and Susan E. Hills and Amy Racine-Poon and Adrian F. M. Smith},
+  title = {Illustration of Bayesian Inference in Normal Data Models Using Gibbs Sampling},
+  journal = {Journal of the American Statistical Association},
+  volume = {85},
+  number = {412},
+  pages = {972-985},
+  year  = {1990},
+  publisher = {Taylor & Francis},
+  doi = {10.1080/01621459.1990.10474968},
+  URL = {https://www.tandfonline.com/doi/abs/10.1080/01621459.1990.10474968},
+  eprint = {https://www.tandfonline.com/doi/pdf/10.1080/01621459.1990.10474968}
+}
+
+@article{crowder1978beta,
+  author = {Martin J. Crowder},
+  title = {Beta-Binomial Anova for Proportions},
+  journal = {Journal of the Royal Statistical Society: Series C (Applied Statistics)},
+  volume = {27},
+  number = {1},
+  pages = {34-37},
+  keywords = {anova for proportions, beta-binomial distribution},
+  doi = {https://doi.org/10.2307/2346223},
+  url = {https://rss.onlinelibrary.wiley.com/doi/abs/10.2307/2346223},
+  eprint = {https://rss.onlinelibrary.wiley.com/doi/pdf/10.2307/2346223},
+  abstract = {Summary A method is proposed for the regression analysis of proportions based on the Beta-binomial distribution.},
+  year = {1978}
+}
diff --git a/posterior_database/data/data/bones_data.json.zip b/posterior_database/data/data/bones_data.json.zip
new file mode 100644
index 00000000..7617457a
Binary files /dev/null and b/posterior_database/data/data/bones_data.json.zip differ
diff --git a/posterior_database/data/data/dogs.json.zip b/posterior_database/data/data/dogs.json.zip
index b30dda3c..3625cdb6 100644
Binary files a/posterior_database/data/data/dogs.json.zip and b/posterior_database/data/data/dogs.json.zip differ
diff --git a/posterior_database/data/data/dugongs_data.json.zip b/posterior_database/data/data/dugongs_data.json.zip
new file mode 100644
index 00000000..965d7f4a
Binary files /dev/null and b/posterior_database/data/data/dugongs_data.json.zip differ
diff --git a/posterior_database/data/data/lsat_data.json.zip b/posterior_database/data/data/lsat_data.json.zip
new file mode 100644
index 00000000..a9011c9d
Binary files /dev/null and b/posterior_database/data/data/lsat_data.json.zip differ
diff --git a/posterior_database/data/data/nes_logit_data.json.zip b/posterior_database/data/data/nes_logit_data.json.zip
new file mode 100644
index 00000000..2b9fc11d
Binary files /dev/null and b/posterior_database/data/data/nes_logit_data.json.zip differ
diff --git a/posterior_database/data/data/rats_data.json.zip b/posterior_database/data/data/rats_data.json.zip
new file mode 100644
index 00000000..a1e49f78
Binary files /dev/null and b/posterior_database/data/data/rats_data.json.zip differ
diff --git a/posterior_database/data/data/seeds_data.json.zip b/posterior_database/data/data/seeds_data.json.zip
new file mode 100644
index 00000000..1ca0310a
Binary files /dev/null and b/posterior_database/data/data/seeds_data.json.zip differ
diff --git a/posterior_database/data/data/surgical_data.json.zip b/posterior_database/data/data/surgical_data.json.zip
new file mode 100644
index 00000000..91c86927
Binary files /dev/null and b/posterior_database/data/data/surgical_data.json.zip differ
diff --git a/posterior_database/data/info/bones_data.info.json b/posterior_database/data/info/bones_data.info.json
new file mode 100644
index 00000000..446238f6
--- /dev/null
+++ b/posterior_database/data/info/bones_data.info.json
@@ -0,0 +1,11 @@
+{
+  "name": "bones_data",
+  "keywords": ["bone", "radiograph", "skeletal", "maturity", "skeletal age", "chronological age"],
+  "title": "34 Indicators of Skeletal Age From 13 Boys of 6 Months to 18 Years of Chronological Age.",
+  "description": "34 indicators of skeletal age (SA) for 13 boys aged 6 months to 18 years. Each indicator is\n          categorised with respect to its degree of maturity. 19 are binary \n          (0 immature, 1 mature), 8 are ternary, 1 has 4 grades and 6 have 5\n          grades of maturity. For binary items, there is a single threshold\n          for the Chronological Age where 50% of individuals are mature for that parameter. Ternary\n          items have 2 threshold parameters: first corresponding to the\n          CA where 50% of individuals are partially or fully mature, second where 50% are fully mature., ",
+  "urls": "https://github.com/stan-dev/example-models/tree/master/bugs_examples/vol1/bones",
+  "references": "mrc1winbugs",
+  "added_date": "2021-07-06",
+  "added_by": "Kane Lindsay",
+  "data_file": "data/data/bones_data.json"
+}
diff --git a/posterior_database/data/info/dogs.info.json b/posterior_database/data/info/dogs.info.json
index a27e5604..64618756 100644
--- a/posterior_database/data/info/dogs.info.json
+++ b/posterior_database/data/info/dogs.info.json
@@ -3,9 +3,9 @@
   "keywords": ["ARM", "Ch. 24", "stan_examples"],
   "title": "Dog Shock Behavioural study",
   "description": "- n_dogs: number of dogs\n- n_trials: number of trials\n- y: avoided shock or not",
-  "urls": "https://github.com/stan-dev/example-models/tree/master/ARM/Ch.24",
+  "urls": "http://www.stat.columbia.edu/~gelman/arm/examples/dogs/dogs.dat",
   "data_file": "data/data/dogs.json",
   "references": "gelman2006data",
-  "added_date": "2020-04-05",
-  "added_by": "Oliver Järnefelt"
+  "added_date": "2022-08-15",
+  "added_by": "Mans Magnusson"
 }
diff --git a/posterior_database/data/info/dugongs_data.info.json b/posterior_database/data/info/dugongs_data.info.json
new file mode 100644
index 00000000..39689e00
--- /dev/null
+++ b/posterior_database/data/info/dugongs_data.info.json
@@ -0,0 +1,11 @@
+{
+  "name": "dugongs_data",
+  "keywords": ["dugong", "dugongs", "age", "length"],
+  "title": "Dugong Ages and Lengths",
+  "description": "The ages and lengths of 27 captured dugongs (sea cows)",
+  "urls": "https://github.com/stan-dev/example-models/tree/master/bugs_examples/vol2",
+  "references": "mrc2winbugs",
+  "added_date": "2021-07-15",
+  "added_by": "Kane Lindsay",
+  "data_file": "data/data/dugongs_data.json"
+}
diff --git a/posterior_database/data/info/lsat_data.info.json b/posterior_database/data/info/lsat_data.info.json
new file mode 100644
index 00000000..0bb583c3
--- /dev/null
+++ b/posterior_database/data/info/lsat_data.info.json
@@ -0,0 +1,11 @@
+{
+  "name": "lsat_data",
+  "keywords": ["law", "school", "aptitude", "test", "multiple choice test", "binary"],
+  "title": "32 Possible LSAT Response Patterns & Their Cumulative Frequencies",
+  "urls": "https://github.com/stan-dev/example-models/tree/master/bugs_examples/vol1/lsat",
+  "description": "The Law School Aptitude Test (LSAT) is a 5-item multiple choice test.\n          Students score 1 on correct answers and 0 on incorrect. The data contains the possible\n          combinations of answers and their cumulative frequencies.",
+  "references": "mrc1winbugs",
+  "added_date": "2021-07-13",
+  "added_by": "Kane Lindsay",
+  "data_file": "data/data/lsat_data.json"
+}
diff --git a/posterior_database/data/info/nes_logit_data.info.json b/posterior_database/data/info/nes_logit_data.info.json
new file mode 100644
index 00000000..9a888672
--- /dev/null
+++ b/posterior_database/data/info/nes_logit_data.info.json
@@ -0,0 +1,11 @@
+{
+  "name": "nes_logit_data",
+  "keywords": ["National", "Election", "Study", "Presidential Election"],
+  "title": "National Election Study 1992",
+  "description": "Results from the 1992 USA National Election Study where\n          1 indicates a preference for George Bush and 0 indicates a preference\n          for Bill Clinton, excluding other candidates to create a binary outcome.\n          The incomes of the corresponding families are split on a five point scale.",
+  "urls": "https://github.com/stan-dev/example-models/tree/master/ARM/Ch.5",
+  "references": "gelman2006data",
+  "added_date": "2021-07-01",
+  "added_by": "Kane Lindsay",
+  "data_file": "data/data/nes_logit_data.json"
+}
diff --git a/posterior_database/data/info/prideprejudice_chapter.info.json b/posterior_database/data/info/prideprejudice_chapter.info.json
index 1cfe2c60..f9abf9b8 100644
--- a/posterior_database/data/info/prideprejudice_chapter.info.json
+++ b/posterior_database/data/info/prideprejudice_chapter.info.json
@@ -2,9 +2,9 @@
   "name": "prideprejudice_chapter",
   "keywords": "text",
   "description": "The book has been tokenized, stop words and rare words (<=5) has been removed. Variable 'doc' is chapter id.",
-  "urls": [],
+  "urls": null,
   "title": "The book 'Pride and Prejustice' by Jane Austen.",
-  "references": [],
+  "references": null,
   "data_file": "data/data/prideprejudice_chapter.json",
   "added_by": "Mans Magnusson",
   "added_date": "2019-08-12"
diff --git a/posterior_database/data/info/prideprejudice_paragraph.info.json b/posterior_database/data/info/prideprejudice_paragraph.info.json
index 0c48b6dd..55372c92 100644
--- a/posterior_database/data/info/prideprejudice_paragraph.info.json
+++ b/posterior_database/data/info/prideprejudice_paragraph.info.json
@@ -2,9 +2,9 @@
   "name": "prideprejudice_paragraph",
   "keywords": "text",
   "description": "The book has been tokenized, stop words and rare words (<=5) has been removed. Variable 'doc' is paragraph id.",
-  "urls": [],
+  "urls": null,
   "title": "The book 'Pride and Prejustice' by Jane Austen.",
-  "references": [],
+  "references": null,
   "data_file": "data/data/prideprejudice_paragraph.json",
   "added_by": "Mans Magnusson",
   "added_date": "2019-08-12"
diff --git a/posterior_database/data/info/rats_data.info.json b/posterior_database/data/info/rats_data.info.json
new file mode 100644
index 00000000..111a2d15
--- /dev/null
+++ b/posterior_database/data/info/rats_data.info.json
@@ -0,0 +1,10 @@
+{
+  "name": "rats_data",
+  "keywords": ["rat", "rats", "weight"],
+  "title": "Weights of 30 Rats Measured Weekly for 5 Weeks",
+  "urls": "https://github.com/stan-dev/example-models/tree/master/bugs_examples/vol1/rats",
+  "references": "mrc1winbugs",
+  "added_date": "2022-08-16",
+  "added_by": "Mans Magnusson",
+  "data_file": "data/data/rats_data.json"
+}
diff --git a/posterior_database/data/info/sblrc.info.json b/posterior_database/data/info/sblrc.info.json
index 4df3b52b..a11c2c97 100644
--- a/posterior_database/data/info/sblrc.info.json
+++ b/posterior_database/data/info/sblrc.info.json
@@ -5,7 +5,7 @@
   ],
   "title": "Data for Bayesian Linear Regession with correlated betas.",
   "description": "Simulated data with 100 observations and 5 coefficients using an uninformative prior. The true values for beta and sigma is 1 and the betas have a correlation of 0.8 in the posterior and var(beta) = 0.01. See data/data-raw/sblr.R for exact code.",
-  "urls": [],
+  "urls": null,
   "data_file": "data/data/sblrc.json",
   "references": null,
   "added_date": "2019-11-29",
diff --git a/posterior_database/data/info/sblri.info.json b/posterior_database/data/info/sblri.info.json
index 9a3b3ee4..b5b7930a 100644
--- a/posterior_database/data/info/sblri.info.json
+++ b/posterior_database/data/info/sblri.info.json
@@ -5,7 +5,7 @@
   ],
   "title": "Data for Bayesian Linear Regession with independent betas.",
   "description": "Simulated data with 100 observations and 5 coefficients using an uninformative prior. The true values for beta and sigma is 1 and the betas are independent in the posterior with var(beta) = 0.01. See data/data-raw/sblr.R for exact code.",
-  "urls": [],
+  "urls": null,
   "data_file": "data/data/sblri.json",
   "references": null,
   "added_date": "2019-11-29",
diff --git a/posterior_database/data/info/seeds_data.info.json b/posterior_database/data/info/seeds_data.info.json
new file mode 100644
index 00000000..f1c7d576
--- /dev/null
+++ b/posterior_database/data/info/seeds_data.info.json
@@ -0,0 +1,11 @@
+{
+  "name": "seeds_data",
+  "keywords": "winbugs vol 1",
+  "title": "Seeds data of Crowder (1978)",
+  "description": "The data is taken from Table 3 of Crowder (1978). It consists of a data on the proportion of seeds that germinated by seed and type of root extract.",
+  "urls": "http://www.mrc-bsu.cam.ac.uk/wp-content/uploads/WinBUGS_Vol1.pdf",
+  "references": "crowder1978beta",
+  "added_date": "2022-08-09",
+  "added_by": "Mans Magnusson",
+  "data_file": "data/data/seeds_data.json"
+}
diff --git a/posterior_database/data/info/surgical_data.info.json b/posterior_database/data/info/surgical_data.info.json
new file mode 100644
index 00000000..afcb0d1c
--- /dev/null
+++ b/posterior_database/data/info/surgical_data.info.json
@@ -0,0 +1,11 @@
+{
+  "name": "surgical_data",
+  "keywords": ["cardiac", "surgery", "infant", "mortality", "deaths", "hospitals"],
+  "title": "Number of Cardiac Surgeries on Infants and Failures",
+  "urls": "https://github.com/stan-dev/example-models/tree/master/bugs_examples/vol1/surgical",
+  "description": "The mortality rates in 12 hospitals performing cardiac surgery on babies.",
+  "references": "mrc1winbugs",
+  "added_date": "2021-07-08",
+  "added_by": "Kane Lindsay",
+  "data_file": "data/data/surgical_data.json"
+}
diff --git a/posterior_database/models/info/blr.info.json b/posterior_database/models/info/blr.info.json
index 7b07a5d5..41fee574 100644
--- a/posterior_database/models/info/blr.info.json
+++ b/posterior_database/models/info/blr.info.json
@@ -2,11 +2,11 @@
   "name": "blr",
   "title": "A Bayesian linear regression model with vague priors",
   "description": "A Bayesian linear regression model with vague priors.",
-  "keywords": [],
+  "keywords": null,
   "references": null,
-  "urls": [],
+  "urls": null,
   "prior": {
-    "keywords": []
+    "keywords": null
   },
   "model_implementations": {
     "stan": {
diff --git a/posterior_database/models/info/bones_model.info.json b/posterior_database/models/info/bones_model.info.json
new file mode 100644
index 00000000..47a3d371
--- /dev/null
+++ b/posterior_database/models/info/bones_model.info.json
@@ -0,0 +1,15 @@
+{
+  "name": "bones_model",
+  "keywords": ["Latent Trait Model", "Latent Trait", "Categorical", "Skeletal"],
+  "title": "Latent Trait Model for Multiple Ordered Categorical Responses ",
+  "description": "Model to predict skeletal age by calibrating 34 indicators of skeletal maturity.",
+  "urls": ["https://github.com/stan-dev/example-models/tree/master/bugs_examples/vol1/bones", "http://www.mrc-bsu.cam.ac.uk/wp-content/uploads/WinBUGS_Vol1.pdf"],
+  "references": "roche1975rwt",
+  "added_by": "Kane Lindsay",
+  "added_date": "2021-07-06",
+  "model_implementations": {
+    "stan": {
+      "model_code": "models/stan/bones_model.stan"
+    }
+  }
+}
diff --git a/posterior_database/models/info/dogs_hierarchical.info.json b/posterior_database/models/info/dogs_hierarchical.info.json
new file mode 100644
index 00000000..780109c5
--- /dev/null
+++ b/posterior_database/models/info/dogs_hierarchical.info.json
@@ -0,0 +1,18 @@
+{
+  "name": "dogs_hierarchical",
+  "keywords": ["ARM", "Ch. 24"],
+  "title": "Hierarchical Logistic Mixed Effects Model",
+  "prior": {
+    "keywords": "stan_recommended_35dbfe6"
+  },
+  "description": "Hierarchical Logistic Mixed Effects Model.",
+  "urls": "https://github.com/stan-dev/example-models/tree/master/ARM/Ch.24",
+  "references": null,
+  "added_by": "Mans Magnusson",
+  "added_date": "2022-08-12",
+  "model_implementations": {
+    "stan": {
+      "model_code": "models/stan/dogs_hierarchical.stan"
+    }
+  }
+}
diff --git a/posterior_database/models/info/dogs_nonhierarchical.info.json b/posterior_database/models/info/dogs_nonhierarchical.info.json
new file mode 100644
index 00000000..ba27522b
--- /dev/null
+++ b/posterior_database/models/info/dogs_nonhierarchical.info.json
@@ -0,0 +1,18 @@
+{
+  "name": "dogs_nonhierarchical",
+  "keywords": ["ARM", "Ch. 24"],
+  "title": "Non-Hierarchical Logistic Mixed Effects Model",
+  "prior": {
+    "keywords": "stan_recommended_35dbfe6"
+  },
+  "description": "Logistic Mixed Effects Model.",
+  "urls": null,
+  "references": null,
+  "added_by": "Mans Magnusson",
+  "added_date": "2022-08-12",
+  "model_implementations": {
+    "stan": {
+      "model_code": "models/stan/dogs_nonhierarchical.stan"
+    }
+  }
+}
diff --git a/posterior_database/models/info/dugongs_model.info.json b/posterior_database/models/info/dugongs_model.info.json
new file mode 100644
index 00000000..37f3f8f7
--- /dev/null
+++ b/posterior_database/models/info/dugongs_model.info.json
@@ -0,0 +1,15 @@
+{
+  "name": "dugongs_model",
+  "keywords": ["nonlinear", "non-linear", "growth curve"],
+  "title": "Dugong Age and Length",
+  "description": "Model of age and length data of dugongs using a nonlinear growth curve with no inflection point.",
+  "urls": "https://github.com/stan-dev/example-models/tree/master/bugs_examples/vol2",
+  "references": "mrc2winbugs",
+  "added_by": "Kane Lindsay",
+  "added_date": "2021-07-15",
+  "model_implementations": {
+    "stan": {
+      "model_code": "models/stan/dugongs_model.stan"
+    }
+  }
+}
diff --git a/posterior_database/models/info/eight_schools_centered.info.json b/posterior_database/models/info/eight_schools_centered.info.json
index 225f99a5..09560ccf 100644
--- a/posterior_database/models/info/eight_schools_centered.info.json
+++ b/posterior_database/models/info/eight_schools_centered.info.json
@@ -19,9 +19,6 @@
   "model_implementations": {
     "stan": {
       "model_code": "models/stan/eight_schools_centered.stan"
-    },
-    "pymc3": {
-      "model_code": "models/pymc3/eight_schools_centered.py"
     }
   },
   "added_by": "Mans Magnusson",
diff --git a/posterior_database/models/info/eight_schools_noncentered.info.json b/posterior_database/models/info/eight_schools_noncentered.info.json
index 1bf67840..2dc9096d 100644
--- a/posterior_database/models/info/eight_schools_noncentered.info.json
+++ b/posterior_database/models/info/eight_schools_noncentered.info.json
@@ -18,6 +18,9 @@
   "model_implementations": {
     "stan": {
       "model_code": "models/stan/eight_schools_noncentered.stan"
+    },
+    "pymc3": {
+      "model_code": "models/pymc3/eight_schools_noncentered.py"
     }
   },
   "added_by": "Mans Magnusson",
diff --git a/posterior_database/models/info/lsat_model.info.json b/posterior_database/models/info/lsat_model.info.json
new file mode 100644
index 00000000..c6c0e99f
--- /dev/null
+++ b/posterior_database/models/info/lsat_model.info.json
@@ -0,0 +1,15 @@
+{
+  "name": "lsat_model",
+  "keywords": ["Random Effects", "Random", "LSAT"],
+  "title": "Random Effects (Rasch) Model for True Difficulty of LSAT Questions",
+  "description": "One-parameter 'Rasch Model' where the probability that a student\n          responds correctly to a question is assumed to follow a logistic\n          function parameterized by 'item difficulty' and a latent variable\n          representing the students underlying ability.",
+  "urls": "https://github.com/stan-dev/example-models/tree/master/bugs_examples/vol1/lsat",
+  "references": "mrc1winbugs",
+  "added_by": "Kane Lindsay",
+  "added_date": "2021-07-13",
+  "model_implementations": {
+    "stan": {
+      "model_code": "models/stan/lsat_model.stan"
+    }
+  }
+}
diff --git a/posterior_database/models/info/nes_logit_model.info.json b/posterior_database/models/info/nes_logit_model.info.json
new file mode 100644
index 00000000..46fd69a3
--- /dev/null
+++ b/posterior_database/models/info/nes_logit_model.info.json
@@ -0,0 +1,15 @@
+{
+  "name": "nes_logit_model",
+  "keywords": ["National", "Election", "Study", "Logistic Regression", "Single Predictor", "Preference", "Presidential Election"],
+  "title": "Logistic Regression Model for Voting Preference based on Income",
+  "description": "Logistic regression to estimate the probability of supporting a candidate inferring on income.",
+  "urls": ["https://github.com/stan-dev/example-models/tree/master/ARM/Ch.5", "http://www.stat.columbia.edu/~gelman/arm/"],
+  "references": "gelman2006data",
+  "added_by": "Kane Lindsay",
+  "added_date": "2021-07-01",
+  "model_implementations": {
+    "stan": {
+      "model_code": "models/stan/nes_logit_model.stan"
+    }
+  }
+}
diff --git a/posterior_database/models/info/rats_model.info.json b/posterior_database/models/info/rats_model.info.json
new file mode 100644
index 00000000..eb84d6f1
--- /dev/null
+++ b/posterior_database/models/info/rats_model.info.json
@@ -0,0 +1,15 @@
+{
+  "name": "rats_model",
+  "keywords": ["Heirarchical", "Normal", "Rats", "Random Effects", "Linear Growth", "Linear"],
+  "title": "Normal Heirarchical Model to Model Rats' Weight Over Time",
+  "description": "The model is essentially a random effects linear growth curve.",
+  "urls": "https://github.com/stan-dev/example-models/tree/master/bugs_examples/vol1/rats",
+  "references": "gelfand1990illustration",
+  "added_by": "Kane Lindsay",
+  "added_date": "2021-07-06",
+  "model_implementations": {
+    "stan": {
+      "model_code": "models/stan/rats_model.stan"
+    }
+  }
+}
diff --git a/posterior_database/models/info/seeds_centered_model.info.json b/posterior_database/models/info/seeds_centered_model.info.json
new file mode 100644
index 00000000..4d11c6ee
--- /dev/null
+++ b/posterior_database/models/info/seeds_centered_model.info.json
@@ -0,0 +1,15 @@
+{
+  "name": "seeds_centered_model",
+  "keywords": ["Random", "Effect", "Logistic", "Regression", "Stanified", "Centered"],
+  "title": "Normal Heirarchical Model to Model Rats' Weight Over Time",
+  "description": "The model is essentially a random effects logistic,\n          allowing for over-dispersion. Models the proportion of germination\n          of different seeds in different root extracts. 'Stanified' & centered:\n          tau replaced by sigma, direct estimation using \n          narrower semi-informative priors, coefficients are centered",
+  "urls": "http://www.mrc-bsu.cam.ac.uk/wp-content/uploads/WinBUGS_Vol1.pdf",
+  "references": "crowder1978beta",
+  "added_by": "Kane Lindsay",
+  "added_date": "2021-07-07",
+  "model_implementations": {
+    "stan": {
+      "model_code": "models/stan/seeds_centered_model.stan"
+    }
+  }
+}
diff --git a/posterior_database/models/info/seeds_model.info.json b/posterior_database/models/info/seeds_model.info.json
new file mode 100644
index 00000000..9e6e87b3
--- /dev/null
+++ b/posterior_database/models/info/seeds_model.info.json
@@ -0,0 +1,15 @@
+{
+  "name": "seeds_model",
+  "keywords": ["Random", "Effect", "Logistic", "Regression"],
+  "title": "Random Effect Logistic Regression for Seed Germination Proportion",
+  "description": "The model is essentially a random effects logistic,\n          allowing for over-dispersion. Models the proportion of germination\n          of different seeds in different root extracts.",
+  "urls": "http://www.mrc-bsu.cam.ac.uk/wp-content/uploads/WinBUGS_Vol1.pdf",
+  "references": "crowder1978beta",
+  "added_by": "Kane Lindsay",
+  "added_date": "2021-07-07",
+  "model_implementations": {
+    "stan": {
+      "model_code": "models/stan/seeds_model.stan"
+    }
+  }
+}
diff --git a/posterior_database/models/info/seeds_stanified_model.info.json b/posterior_database/models/info/seeds_stanified_model.info.json
new file mode 100644
index 00000000..4e4469a6
--- /dev/null
+++ b/posterior_database/models/info/seeds_stanified_model.info.json
@@ -0,0 +1,15 @@
+{
+  "name": "seeds_stanified_model",
+  "keywords": ["Random", "Effect", "Logistic", "Regression", "Stanified"],
+  "title": "Normal Heirarchical Model to Model Rats' Weight Over Time",
+  "description": "The model is essentially a random effects logistic,\n          allowing for over-dispersion. Models the proportion of germination\n          of different seeds in different root extracts. 'Stanified':\n          tau replaced by sigma, direct estimation using \n          narrower semi-informative priors",
+  "urls": "http://www.mrc-bsu.cam.ac.uk/wp-content/uploads/WinBUGS_Vol1.pdf",
+  "references": "crowder1978beta",
+  "added_by": "Kane Lindsay",
+  "added_date": "2021-07-07",
+  "model_implementations": {
+    "stan": {
+      "model_code": "models/stan/seeds_stanified_model.stan"
+    }
+  }
+}
diff --git a/posterior_database/models/info/surgical_model.info.json b/posterior_database/models/info/surgical_model.info.json
new file mode 100644
index 00000000..7b56d384
--- /dev/null
+++ b/posterior_database/models/info/surgical_model.info.json
@@ -0,0 +1,15 @@
+{
+  "name": "surgical_model",
+  "keywords": ["Random Effects", "Random"],
+  "title": "Random Effects Model to Rank Hospitals on True Failure Probability",
+  "description": "Random effects model assuming the probabilities of failure over hospitals are similar in some way.",
+  "urls": "https://github.com/stan-dev/example-models/tree/master/bugs_examples/vol1/surgical",
+  "references": "mrc1winbugs",
+  "added_by": "Kane Lindsay",
+  "added_date": "2021-07-08",
+  "model_implementations": {
+    "stan": {
+      "model_code": "models/stan/surgical_model.stan"
+    }
+  }
+}
diff --git a/posterior_database/models/info/wells_daae_c_model.info.json b/posterior_database/models/info/wells_daae_c_model.info.json
new file mode 100644
index 00000000..d32bcb1f
--- /dev/null
+++ b/posterior_database/models/info/wells_daae_c_model.info.json
@@ -0,0 +1,15 @@
+{
+  "name": "wells_daae_c_model",
+  "keywords": ["wells", "ARM", "Ch.5", "logistic", "regression", "scaled", "four predictors", "arsenic", "distance", "education", "community organization", "centered", "social predictor"],
+  "title": "4-Predictor logistic regression model with centered inputs for decision to switch wells",
+  "description": "Performs logistic regression using four centered predictors:\n          distance from nearest safe well, arsenic levels, years in\n          education, and if the individual is associated with an active community project.\n          The association predictor is not actually predictive of switching.\n          ",
+  "urls": "https://github.com/stan-dev/example-models/tree/master/ARM/Ch.5",
+  "references": "gelman2006data",
+  "added_by": "Kane Lindsay",
+  "added_date": "2021-07-07",
+  "model_implementations": {
+    "stan": {
+      "model_code": "models/stan/wells_daae_c_model.stan"
+    }
+  }
+}
diff --git a/posterior_database/models/info/wells_dae_c_model.info.json b/posterior_database/models/info/wells_dae_c_model.info.json
new file mode 100644
index 00000000..52d53c34
--- /dev/null
+++ b/posterior_database/models/info/wells_dae_c_model.info.json
@@ -0,0 +1,15 @@
+{
+  "name": "wells_dae_c_model",
+  "keywords": ["wells", "ARM", "Ch.5", "logistic", "regression", "scaled", "three predictors", "arsenic", "distance", "education", "centered", "social predictor"],
+  "title": "3-Predictor logistic regression model with centered inputs for decision to switch wells",
+  "description": "Performs logistic regression using three centered predictors \n          (distance from nearest safe well, arsenic levels, and years in\n          education).",
+  "urls": "https://github.com/stan-dev/example-models/tree/master/ARM/Ch.5",
+  "references": "gelman2006data",
+  "added_by": "Kane Lindsay",
+  "added_date": "2021-07-07",
+  "model_implementations": {
+    "stan": {
+      "model_code": "models/stan/wells_dae_c_model.stan"
+    }
+  }
+}
diff --git a/posterior_database/models/info/wells_dae_inter_model.info.json b/posterior_database/models/info/wells_dae_inter_model.info.json
new file mode 100644
index 00000000..86f4aefd
--- /dev/null
+++ b/posterior_database/models/info/wells_dae_inter_model.info.json
@@ -0,0 +1,15 @@
+{
+  "name": "wells_dae_inter_model",
+  "keywords": ["wells", "ARM", "Ch.5", "logistic", "regression", "scaled", "three predictors", "arsenic", "distance", "interaction", "centered", "education", "social predictor"],
+  "title": "3-Input logistic regression model with interactions and centered inputs for decision to switch wells",
+  "description": "Performs logistic regression using three centered inputs \n          (distance from nearest safe well, log-scaled arsenic levels, and years in\n          education) and the interactions between each pair of inputs.",
+  "urls": "https://github.com/stan-dev/example-models/tree/master/ARM/Ch.5",
+  "references": "gelman2006data",
+  "added_by": "Kane Lindsay",
+  "added_date": "2021-07-07",
+  "model_implementations": {
+    "stan": {
+      "model_code": "models/stan/wells_dae_inter_model.stan"
+    }
+  }
+}
diff --git a/posterior_database/models/info/wells_dae_model.info.json b/posterior_database/models/info/wells_dae_model.info.json
new file mode 100644
index 00000000..0c9e93cc
--- /dev/null
+++ b/posterior_database/models/info/wells_dae_model.info.json
@@ -0,0 +1,15 @@
+{
+  "name": "wells_dae_model",
+  "keywords": ["wells", "ARM", "Ch.5", "logistic", "regression", "scaled", "three predictors", "arsenic", "distance", "interaction", "education", "social predictor"],
+  "title": "3-Predictor logistic regression model for decision to switch wells.",
+  "description": "Performs logistic regression using three predictors \n          (distance from nearest safe well, arsenic levels, and years in\n          education).",
+  "urls": "https://github.com/stan-dev/example-models/tree/master/ARM/Ch.5",
+  "references": "gelman2006data",
+  "added_by": "Kane Lindsay",
+  "added_date": "2021-07-07",
+  "model_implementations": {
+    "stan": {
+      "model_code": "models/stan/wells_dae_model.stan"
+    }
+  }
+}
diff --git a/posterior_database/models/info/wells_dist100_model.info.json b/posterior_database/models/info/wells_dist100_model.info.json
new file mode 100644
index 00000000..b08df9e4
--- /dev/null
+++ b/posterior_database/models/info/wells_dist100_model.info.json
@@ -0,0 +1,15 @@
+{
+  "name": "wells_dist100_model",
+  "keywords": ["wells", "ARM", "Ch.5", "logistic", "regression", "scaled"],
+  "title": "Logistic regression model for decision to switch wells",
+  "description": "Performs logistic regression using one predictor (distance from nearest safe well).\n          Rescales distance to 100-meter units.",
+  "urls": "https://github.com/stan-dev/example-models/tree/master/ARM/Ch.5",
+  "references": "gelman2006data",
+  "added_by": "Kane Lindsay",
+  "added_date": "2021-07-07",
+  "model_implementations": {
+    "stan": {
+      "model_code": "models/stan/wells_dist100_model.stan"
+    }
+  }
+}
diff --git a/posterior_database/models/info/wells_dist100ars_model.info.json b/posterior_database/models/info/wells_dist100ars_model.info.json
new file mode 100644
index 00000000..72537004
--- /dev/null
+++ b/posterior_database/models/info/wells_dist100ars_model.info.json
@@ -0,0 +1,15 @@
+{
+  "name": "wells_dist100ars_model",
+  "keywords": ["wells", "ARM", "Ch.5", "logistic", "regression", "scaled", "two predictors", "arsenic", "distance"],
+  "title": "2-Predictor Logistic regression model for decision to switch wells",
+  "description": "Performs logistic regression using two predictors (distance from nearest safe well and arsenic levels).\n          Rescales distance to 100-meter units.",
+  "urls": "https://github.com/stan-dev/example-models/tree/master/ARM/Ch.5",
+  "references": "gelman2006data",
+  "added_by": "Kane Lindsay",
+  "added_date": "2021-07-07",
+  "model_implementations": {
+    "stan": {
+      "model_code": "models/stan/wells_dist100ars_model.stan"
+    }
+  }
+}
diff --git a/posterior_database/models/info/wells_interaction_c_model.info.json b/posterior_database/models/info/wells_interaction_c_model.info.json
new file mode 100644
index 00000000..489cf028
--- /dev/null
+++ b/posterior_database/models/info/wells_interaction_c_model.info.json
@@ -0,0 +1,15 @@
+{
+  "name": "wells_interaction_c_model",
+  "keywords": ["wells", "ARM", "Ch.5", "logistic", "regression", "scaled", "two predictors", "arsenic", "distance", "interaction"],
+  "title": "2-Predictor logistic regression model with interactions and centered inputs for decision to switch wells",
+  "description": "Performs logistic regression using two predictors\n          (distance from nearest safe well and arsenic levels) and their\n          interaction with centered input variables.",
+  "urls": "https://github.com/stan-dev/example-models/tree/master/ARM/Ch.5",
+  "references": "gelman2006data",
+  "added_by": "Kane Lindsay",
+  "added_date": "2021-07-05",
+  "model_implementations": {
+    "stan": {
+      "model_code": "models/stan/wells_interaction_c_model.stan"
+    }
+  }
+}
diff --git a/posterior_database/models/info/wells_interaction_model.info.json b/posterior_database/models/info/wells_interaction_model.info.json
new file mode 100644
index 00000000..86631958
--- /dev/null
+++ b/posterior_database/models/info/wells_interaction_model.info.json
@@ -0,0 +1,15 @@
+{
+  "name": "wells_interaction_model",
+  "keywords": ["wells", "ARM", "Ch.5", "logistic", "regression", "scaled", "two predictors", "arsenic", "distance", "interaction"],
+  "title": "2-Predictor Logistic regression model with interactions for decision to switch wells",
+  "description": "Performs logistic regression using two predictors (distance from nearest safe well and arsenic levels) and their interaction.",
+  "urls": "https://github.com/stan-dev/example-models/tree/master/ARM/Ch.5",
+  "references": "gelman2006data",
+  "added_by": "Kane Lindsay",
+  "added_date": "2021-07-05",
+  "model_implementations": {
+    "stan": {
+      "model_code": "models/stan/wells_interaction_model.stan"
+    }
+  }
+}
diff --git a/posterior_database/models/stan/bones_model.stan b/posterior_database/models/stan/bones_model.stan
new file mode 100644
index 00000000..f25d70de
--- /dev/null
+++ b/posterior_database/models/stan/bones_model.stan
@@ -0,0 +1,50 @@
+/*
+ * Note:
+ * 1. Since it is just the response that is
+ *    modelled as categorical distribution,
+ *    we should be able to run the model now except handling
+ *    the missing. However, the data structure is a bit
+ *    difficult to deal with (Allowing some redundancy
+ *    in the transformed parameters (Q here), the model
+ *    is fine in Stan.
+ * 2. The missing data is recoded as `-1`, which is
+ *    not modeled for `gamma` as in the OpenBUGS example
+ *    and not modeled for `grade`.
+ */
+
+data {
+  int<lower=0> nChild;
+  int<lower=0> nInd;
+  real gamma[nInd, 4];      // -1 if missing
+  real delta[nInd];
+  int<lower=0> ncat[nInd];
+  int grade[nChild, nInd];  // -1 if missing
+}
+parameters {
+  real theta[nChild];
+}
+model {
+  real p[nChild, nInd, 5];
+  real Q[nChild, nInd, 4];
+  theta ~ normal(0.0, 36);
+  for (i in 1:nChild) {
+    // Probability of observing grade k given theta
+    for (j in 1:nInd) {
+      // Cumulative probability of > grade k given theta
+      for (k in 1:(ncat[j] - 1))
+        Q[i, j, k] = inv_logit(delta[j] * (theta[i] - gamma[j, k]));
+      p[i, j, 1] = 1 - Q[i, j, 1];
+      for (k in 2:(ncat[j] - 1))
+        p[i, j, k] = Q[i, j, k - 1] - Q[i, j, k];
+      p[i, j, ncat[j]] = Q[i, j, ncat[j] - 1];
+
+      // incement log probability directly because grade[i, j]
+      // has categorical distribution with varying dimension.
+      // for missing grade[i, j] = -1, there is no log prob
+      // contribution
+      if (grade[i, j] != -1)
+        target += log(p[i, j, grade[i, j]]);
+    }
+  }
+}
+
diff --git a/posterior_database/models/stan/dogs_hierarchical.stan b/posterior_database/models/stan/dogs_hierarchical.stan
new file mode 100644
index 00000000..aaaff4a7
--- /dev/null
+++ b/posterior_database/models/stan/dogs_hierarchical.stan
@@ -0,0 +1,53 @@
+
+data {
+  int<lower=0> n_dogs;
+  int<lower=0> n_trials;
+  int<lower=0,upper=1> y[n_dogs,n_trials];
+}
+transformed data {
+  int<lower=0> J = n_dogs;
+  int<lower=0> T = n_trials;
+  matrix<lower=0>[J, T] prev_shock;
+  matrix<lower=0>[J, T] prev_avoid;
+
+  for (j in 1:J){
+    prev_shock[j,1] = 0;
+    prev_avoid[j,1] = 0;
+    for (t in 2:T){
+      prev_shock[j,t] = prev_shock[j,t-1] + y[j,t-1];
+      prev_avoid[j,t] = prev_avoid[j,t-1] + 1 - y[j,t-1];
+    }
+  }
+}
+parameters {
+  real<lower=0, upper=1> a;
+  real<lower=0, upper=1> b;
+}
+model {
+  for (j in 1:J){
+    for (t in 1:T){
+      real p = a^prev_shock[j,t] * b^prev_avoid[j,t];
+      y[j,t] ~ bernoulli(p);
+    }
+  }
+}
+generated quantities {
+  int<lower=0,upper=1> y_rep[n_dogs,n_trials];
+  {
+    real prev_shock_rep;
+    real prev_avoid_rep;
+    real p_rep;
+    for (j in 1:J){
+      prev_shock_rep = 0;
+      prev_avoid_rep = 0;
+      y_rep[j,1] = 1;
+      for (t in 2:T){
+        prev_shock_rep = prev_shock_rep + y_rep[j,t-1];
+        prev_avoid_rep = prev_avoid_rep + 1 - y_rep[j,t-1];
+        p_rep = a^prev_shock_rep * b^prev_avoid_rep;
+        y_rep[j,t] = bernoulli_rng(p_rep);
+      }
+    }
+  }
+}
+
diff --git a/posterior_database/models/stan/dogs_nonhierarchical.stan b/posterior_database/models/stan/dogs_nonhierarchical.stan
new file mode 100644
index 00000000..d88dcba2
--- /dev/null
+++ b/posterior_database/models/stan/dogs_nonhierarchical.stan
@@ -0,0 +1,66 @@
+
+data {
+  int<lower=0> n_dogs;
+  int<lower=0> n_trials;
+  int<lower=0,upper=1> y[n_dogs,n_trials];
+}
+transformed data {
+  int<lower=0> J = n_dogs;
+  int<lower=0> T = n_trials;
+  matrix<lower=0>[J, T] prev_shock;
+  matrix<lower=0>[J, T] prev_avoid;
+  for (j in 1:J){
+    prev_shock[j,1] = 0;
+    prev_avoid[j,1] = 0;
+    for (t in 2:T){
+      prev_shock[j,t] = prev_shock[j,t-1] + y[j,t-1];
+      prev_avoid[j,t] = prev_avoid[j,t-1] + 1 - y[j,t-1];
+    }
+  }
+}
+parameters {
+  vector[2] mu_logit_ab;
+  vector<lower=0>[2] sigma_logit_ab;
+  cholesky_factor_corr[2] L_logit_ab;
+  matrix[J,2] z;
+}
+transformed parameters {
+  matrix[J,2] logit_ab = rep_vector(1, J) * mu_logit_ab' +
+    z * diag_pre_multiply(sigma_logit_ab, L_logit_ab);
+  corr_matrix[2] Omega_logit_ab = L_logit_ab * L_logit_ab';
+  cov_matrix[2] Sigma_logit_ab = quad_form_diag(Omega_logit_ab, sigma_logit_ab);
+  vector[J] a = inv_logit(logit_ab[,1]);
+  vector[J] b = inv_logit(logit_ab[,2]);
+}
+model {
+  for (j in 1:J){
+    for (t in 1:T){
+      real p = a[j]^prev_shock[j,t] * b[j]^prev_avoid[j,t];
+      y[j,t] ~ bernoulli(p);
+    }
+  }
+  mu_logit_ab ~ logistic(0, 1);
+  sigma_logit_ab ~ normal(0, 1);
+  L_logit_ab ~ lkj_corr_cholesky(2);
+  to_vector(z) ~ normal(0, 1);
+}
+generated quantities {
+  int<lower=0,upper=1> y_rep[J,T];
+  {
+    real prev_shock_rep;
+    real prev_avoid_rep;
+    real p_rep;
+    for (j in 1:J){
+      prev_shock_rep = 0;
+      prev_avoid_rep = 0;
+      y_rep[j,1] = 1;
+      for (t in 2:T){
+        prev_shock_rep = prev_shock_rep + y_rep[j,t-1];
+        prev_avoid_rep = prev_avoid_rep + 1 - y_rep[j,t-1];
+        p_rep = a[j]^prev_shock_rep * b[j]^prev_avoid_rep;
+        y_rep[j,t] = bernoulli_rng(p_rep);
+      }
+    }
+  }
+}
+
diff --git a/posterior_database/models/stan/dugongs_model.stan b/posterior_database/models/stan/dugongs_model.stan
new file mode 100644
index 00000000..361b1141
--- /dev/null
+++ b/posterior_database/models/stan/dugongs_model.stan
@@ -0,0 +1,30 @@
+data {
+  int<lower=0> N; 
+  real x[N]; 
+  real Y[N]; 
+} 
+parameters {
+  real alpha; 
+  real beta;  
+  real<lower=.5,upper= 1> lambda; // orginal gamma in the JAGS example  
+  real<lower=0> tau; 
+   
+} 
+transformed parameters {
+  real sigma; 
+  real U3; 
+  sigma = 1 / sqrt(tau); 
+  U3 = logit(lambda);
+} 
+model {
+  real m[N];
+  for (i in 1:N) 
+    m[i] = alpha - beta * pow(lambda, x[i]);
+  Y ~ normal(m, sigma); 
+    
+  alpha ~ normal(0.0, 1000); 
+  beta ~ normal(0.0, 1000); 
+  lambda ~ uniform(.5, 1); 
+  tau ~ gamma(.0001, .0001); 
+}
+
diff --git a/posterior_database/models/stan/lsat_model.stan b/posterior_database/models/stan/lsat_model.stan
new file mode 100644
index 00000000..4ea155fb
--- /dev/null
+++ b/posterior_database/models/stan/lsat_model.stan
@@ -0,0 +1,48 @@
+
+data {
+  int<lower=0> N; // 1000, number of students
+  int<lower=0> R; // 32, number of patterns of results: 2^T
+  int<lower=0> T; // 5, number of questions
+  int<lower=0> culm[R];
+  int<lower=0> response[R,T];
+}
+
+transformed data {
+  int r[T,N];
+  vector[N] ones;
+  
+  for (j in 1:culm[1]) {
+    for (k in 1:T) {
+      r[k,j] = response[1,k];
+   } 
+  }
+  for (i in 2:R) {
+    for (j in (culm[i-1] + 1):culm[i]) {
+      for (k in 1:T) {
+        r[k,j] = response[i,k];
+      }
+    }
+  }
+  for (i in 1:N)
+    ones[i] = 1.0; 
+}
+parameters {
+  real alpha[T];
+  vector[N] theta;
+  real<lower=0> beta;
+}
+model {
+  alpha ~ normal(0, 100.); 
+  theta ~ normal(0, 1); 
+  beta ~ normal(0.0, 100.); 
+  for(k in 1:T)
+    r[k] ~ bernoulli_logit(beta * theta - alpha[k] * ones);
+}
+
+generated quantities {
+  real mean_alpha; 
+  real a[T]; 
+  mean_alpha = mean(alpha);
+  for(t in 1:T) a[t] = alpha[t] - mean_alpha;
+} 
+
diff --git a/posterior_database/models/stan/nes_logit_model.stan b/posterior_database/models/stan/nes_logit_model.stan
new file mode 100644
index 00000000..ca9bf2de
--- /dev/null
+++ b/posterior_database/models/stan/nes_logit_model.stan
@@ -0,0 +1,16 @@
+data {
+  int<lower=0> N;
+  vector[N] income;
+  int<lower=0,upper=1> vote[N];
+}
+transformed data {
+  matrix[N,1] x = [income']';
+}
+parameters {
+  real alpha;
+  vector[1] beta;
+}
+model {
+  vote ~ bernoulli_logit_glm(x, alpha, beta);
+}
+
diff --git a/posterior_database/models/stan/rats_model.stan b/posterior_database/models/stan/rats_model.stan
new file mode 100644
index 00000000..1bcc2d90
--- /dev/null
+++ b/posterior_database/models/stan/rats_model.stan
@@ -0,0 +1,39 @@
+// Model simplified
+data {
+  int<lower=0> N; // Number of rats
+  int<lower=0> Npts; // Number of data points
+  int<lower=0> rat[Npts]; // Lookup index -> rat
+  real x[Npts];
+  real y[Npts];
+  real xbar;
+}
+
+parameters {
+  real alpha[N];
+  real beta[N];
+
+  real mu_alpha;
+  real mu_beta;          // beta.c in original bugs model
+  real<lower=0> sigma_y;       // sigma in original bugs model
+  real<lower=0> sigma_alpha;
+  real<lower=0> sigma_beta;
+}
+
+
+model {
+  mu_alpha ~ normal(0, 100);
+  mu_beta ~ normal(0, 100);
+  // sigma_y, sigma_alpha, sigma_beta : flat
+  alpha ~ normal(mu_alpha, sigma_alpha); // vectorized
+  beta ~ normal(mu_beta, sigma_beta);  // vectorized
+  for (n in 1:Npts){
+    int irat;
+    irat = rat[n];
+    y[n] ~ normal(alpha[irat] + beta[irat] * (x[n] - xbar), sigma_y);
+  }
+}
+generated quantities {
+  real alpha0;
+  alpha0 = mu_alpha - xbar * mu_beta;
+}
+
diff --git a/posterior_database/models/stan/seeds_centered_model.stan b/posterior_database/models/stan/seeds_centered_model.stan
new file mode 100644
index 00000000..f8a43990
--- /dev/null
+++ b/posterior_database/models/stan/seeds_centered_model.stan
@@ -0,0 +1,38 @@
+
+data {
+    int<lower=0> I;
+    int<lower=0> n[I];
+    int<lower=0> N[I];
+    vector[I] x1; // seed type
+    vector[I] x2; // root extract
+}
+
+transformed data {
+    vector[I] x1x2;
+    x1x2 = x1 .* x2;
+}
+parameters {
+    real alpha0;
+    real alpha1;
+    real alpha12;
+    real alpha2;
+    vector[I] c;
+    real<lower=0> sigma;
+}
+
+transformed parameters{
+  vector[I] b;
+  b = c - mean(c);
+}
+
+model {
+   alpha0 ~  normal(0.0, 1.0); // Narrower priors
+   alpha1 ~  normal(0.0, 1.0);
+   alpha2 ~  normal(0.0, 1.0);
+   alpha12 ~ normal(0.0, 1.0);
+   sigma ~   cauchy(0,1);
+
+   c ~ normal(0.0, sigma);
+   n ~ binomial_logit(N, alpha0 + alpha1 * x1 + alpha2 * x2 + alpha12 * x1x2 + b);
+}
+
diff --git a/posterior_database/models/stan/seeds_model.stan b/posterior_database/models/stan/seeds_model.stan
new file mode 100644
index 00000000..04075929
--- /dev/null
+++ b/posterior_database/models/stan/seeds_model.stan
@@ -0,0 +1,35 @@
+data {
+    int<lower=0> I;
+    int<lower=0> n[I];
+    int<lower=0> N[I];
+    vector[I] x1; 
+    vector[I] x2; 
+}
+
+transformed data {
+    vector[I] x1x2;
+    x1x2 = x1 .* x2;
+} 
+parameters {
+    real alpha0;
+    real alpha1;
+    real alpha12;
+    real alpha2;
+    real<lower=0> tau;
+    vector[I] b;
+}
+transformed parameters {
+    real<lower=0> sigma;
+    sigma = 1.0 / sqrt(tau);
+}
+model {
+   alpha0 ~ normal(0.0,1.0E3);
+   alpha1 ~ normal(0.0,1.0E3);
+   alpha2 ~ normal(0.0,1.0E3);
+   alpha12 ~ normal(0.0,1.0E3);
+   tau ~ gamma(1.0E-3,1.0E-3);
+
+   b ~ normal(0.0, sigma);
+   n ~ binomial_logit(N, alpha0 + alpha1 * x1 + alpha2 * x2 + alpha12 * x1x2 + b);
+}
+
diff --git a/posterior_database/models/stan/seeds_stanified_model.stan b/posterior_database/models/stan/seeds_stanified_model.stan
new file mode 100644
index 00000000..84410244
--- /dev/null
+++ b/posterior_database/models/stan/seeds_stanified_model.stan
@@ -0,0 +1,33 @@
+
+data {
+    int<lower=0> I;
+    int<lower=0> n[I];
+    int<lower=0> N[I];
+    vector[I] x1; // seed type
+    vector[I] x2; // root extract
+}
+
+transformed data {
+    vector[I] x1x2;
+    x1x2 = x1 .* x2;
+}
+parameters {
+    real alpha0;
+    real alpha1;
+    real alpha12;
+    real alpha2;
+    vector[I] b;
+    real<lower=0> sigma;
+}
+
+model {
+   alpha0 ~ normal(0.0, 1.0); // Narrower priors
+   alpha1 ~ normal(0.0, 1.0);
+   alpha2 ~ normal(0.0, 1.0);
+   alpha12 ~ normal(0.0, 1.0);
+   sigma ~ cauchy(0,1);
+
+   b ~ normal(0.0, sigma);
+   n ~ binomial_logit(N, alpha0 + alpha1 * x1 + alpha2 * x2 + alpha12 * x1x2 + b);
+}
+
diff --git a/posterior_database/models/stan/surgical_model.stan b/posterior_database/models/stan/surgical_model.stan
new file mode 100644
index 00000000..165d8e00
--- /dev/null
+++ b/posterior_database/models/stan/surgical_model.stan
@@ -0,0 +1,28 @@
+data {
+  int<lower=0> N;
+  int r[N];
+  int n[N];
+}
+parameters {
+   real mu;
+   real<lower=0> sigmasq;
+   real b[N];
+}
+transformed parameters {
+  real<lower=0> sigma;
+  real<lower=0,upper=1> p[N];
+  sigma = sqrt(sigmasq); 
+  for (i in 1:N)
+    p[i] = inv_logit(b[i]);
+}
+model {
+  mu ~ normal(0.0, 1000.0); 
+  sigmasq ~ inv_gamma(0.001, 0.001);
+  b ~ normal(mu, sigma);
+  r ~ binomial_logit(n, b);
+}
+generated quantities {
+  real pop_mean;
+  pop_mean = inv_logit(mu); 
+} 
+
diff --git a/posterior_database/models/stan/wells_daae_c_model.stan b/posterior_database/models/stan/wells_daae_c_model.stan
new file mode 100644
index 00000000..3c7fcc54
--- /dev/null
+++ b/posterior_database/models/stan/wells_daae_c_model.stan
@@ -0,0 +1,24 @@
+data {
+  int<lower=0> N;
+  int<lower=0,upper=1> switched[N];
+  vector[N] dist;
+  vector[N] arsenic;
+  vector[N] assoc;
+  vector[N] educ;
+}
+transformed data {
+  vector[N] c_dist100 = (dist - mean(dist)) / 100.0;
+  vector[N] c_arsenic = arsenic - mean(arsenic);
+  vector[N] da_inter = c_dist100 .* c_arsenic;
+  vector[N] educ4 = educ / 4.0;
+  matrix[N,5] x = [c_dist100', c_arsenic', da_inter',
+                   assoc', educ4']';
+}
+parameters {
+  real alpha;
+  vector[5] beta;
+}
+model {
+  switched ~ bernoulli_logit_glm(x, alpha, beta);
+}
+
diff --git a/posterior_database/models/stan/wells_dae_c_model.stan b/posterior_database/models/stan/wells_dae_c_model.stan
new file mode 100644
index 00000000..ea0265e7
--- /dev/null
+++ b/posterior_database/models/stan/wells_dae_c_model.stan
@@ -0,0 +1,22 @@
+data {
+  int<lower=0> N;
+  int<lower=0,upper=1> switched[N];
+  vector[N] dist;
+  vector[N] arsenic;
+  vector[N] educ;
+}
+transformed data {
+  vector[N] c_dist100 = (dist - mean(dist)) / 100.0;
+  vector[N] c_arsenic = arsenic - mean(arsenic);
+  vector[N] da_inter = c_dist100 .* c_arsenic;
+  vector[N] educ4 = educ / 4.0;
+  matrix[N,4] x = [c_dist100', c_arsenic', da_inter', educ4']';
+}
+parameters {
+  real alpha;
+  vector[4] beta;
+}
+model {
+  switched ~ bernoulli_logit_glm(x, alpha, beta);
+}
+
diff --git a/posterior_database/models/stan/wells_dae_inter_model.stan b/posterior_database/models/stan/wells_dae_inter_model.stan
new file mode 100644
index 00000000..b058c1fa
--- /dev/null
+++ b/posterior_database/models/stan/wells_dae_inter_model.stan
@@ -0,0 +1,27 @@
+data {
+  int<lower=0> N;
+  int<lower=0,upper=1> switched[N];
+  vector[N] dist;
+  vector[N] arsenic;
+  vector[N] educ;
+}
+transformed data {
+  // centering
+  vector[N] c_dist100 = (dist - mean(dist)) / 100.0;
+  vector[N] c_arsenic = arsenic - mean(arsenic);
+  vector[N] c_educ4 = (educ - mean(educ)) / 4.0;
+  // interactions
+  vector[N] da_inter = c_dist100 .* c_arsenic;
+  vector[N] de_inter = c_dist100 .* c_educ4;
+  vector[N] ae_inter = c_arsenic .* c_educ4;
+  matrix[N,6] x = [c_dist100', c_arsenic', c_educ4',
+                   da_inter', de_inter', ae_inter']';
+}
+parameters {
+  real alpha;
+  vector[6] beta;
+}
+model {
+  switched ~ bernoulli_logit_glm(x, alpha, beta);
+}
+
diff --git a/posterior_database/models/stan/wells_dae_model.stan b/posterior_database/models/stan/wells_dae_model.stan
new file mode 100644
index 00000000..1d7af366
--- /dev/null
+++ b/posterior_database/models/stan/wells_dae_model.stan
@@ -0,0 +1,21 @@
+data {
+  int<lower=0> N;
+  int<lower=0,upper=1> switched[N];
+  vector[N] dist;
+  vector[N] arsenic;
+  vector[N] educ;
+}
+transformed data {
+  // rescaling
+  vector[N] dist100 = dist / 100.0;
+  vector[N] educ4 = educ / 4.0;
+  matrix[N,3] x = [dist100', arsenic', educ4']';
+}
+parameters {
+  real alpha;
+  vector[3] beta;
+}
+model {
+  switched ~ bernoulli_logit_glm(x, alpha, beta);
+}
+
diff --git a/posterior_database/models/stan/wells_dist100_model.stan b/posterior_database/models/stan/wells_dist100_model.stan
new file mode 100644
index 00000000..7b625500
--- /dev/null
+++ b/posterior_database/models/stan/wells_dist100_model.stan
@@ -0,0 +1,17 @@
+data {
+  int<lower=0> N;
+  int<lower=0,upper=1> switched[N];
+  vector[N] dist;
+}
+transformed data {
+  // rescaling
+  vector[N] dist100 = dist / 100.0;   
+  matrix[N,1] x = [dist100']';
+}
+parameters {
+  real alpha;
+  vector[1] beta;
+}
+model {
+  switched ~ bernoulli_logit_glm(x, alpha, beta);
+}
diff --git a/posterior_database/models/stan/wells_dist100ars_model.stan b/posterior_database/models/stan/wells_dist100ars_model.stan
new file mode 100644
index 00000000..5bde9b7e
--- /dev/null
+++ b/posterior_database/models/stan/wells_dist100ars_model.stan
@@ -0,0 +1,18 @@
+data {
+  int<lower=0> N;
+  int<lower=0,upper=1> switched[N];
+  vector[N] dist;
+  vector[N] arsenic;
+}
+transformed data {
+  // rescaling
+  vector[N] dist100 = dist / 100.0;
+  matrix[N,2] x = [dist100', arsenic']';
+}
+parameters {
+  real alpha;
+  vector[2] beta;
+}
+model {
+  switched ~ bernoulli_logit_glm(x, alpha, beta);
+}
diff --git a/posterior_database/models/stan/wells_interaction_c_model.stan b/posterior_database/models/stan/wells_interaction_c_model.stan
new file mode 100644
index 00000000..4bbd71d4
--- /dev/null
+++ b/posterior_database/models/stan/wells_interaction_c_model.stan
@@ -0,0 +1,22 @@
+data {
+  int<lower=0> N;
+  int<lower=0,upper=1> switched[N];
+  vector[N] dist;
+  vector[N] arsenic;
+}
+transformed data {
+  // centering
+  vector[N] c_dist100 = (dist - mean(dist)) / 100.0;
+  vector[N] c_arsenic = arsenic - mean(arsenic);
+  // interaction
+  vector[N] inter = c_dist100 .* c_arsenic;
+  matrix[N,3] x = [c_dist100', c_arsenic', inter']';
+}
+parameters {
+  real alpha;
+  vector[3] beta;
+}
+model {
+  switched ~ bernoulli_logit_glm(x, alpha, beta);
+}
+
diff --git a/posterior_database/models/stan/wells_interaction_model.stan b/posterior_database/models/stan/wells_interaction_model.stan
new file mode 100644
index 00000000..c8a17f07
--- /dev/null
+++ b/posterior_database/models/stan/wells_interaction_model.stan
@@ -0,0 +1,21 @@
+data {
+  int<lower=0> N;
+  int<lower=0,upper=1> switched[N];
+  vector[N] dist;
+  vector[N] arsenic;
+}
+transformed data {
+  // rescaling
+  vector[N] dist100 = dist / 100.0;
+  // interaction
+  vector[N] inter = dist100 .* arsenic;
+  matrix[N,3] x = [dist100', arsenic', inter']';
+}
+parameters {
+  real alpha;
+  vector[3] beta;
+}
+model {
+  switched ~ bernoulli_logit_glm(x, alpha, beta);
+}
+
diff --git a/posterior_database/posteriors/bones_data-bones_model.json b/posterior_database/posteriors/bones_data-bones_model.json
new file mode 100644
index 00000000..57a016c1
--- /dev/null
+++ b/posterior_database/posteriors/bones_data-bones_model.json
@@ -0,0 +1,14 @@
+{
+  "keywords": ["bones", "latent trait"],
+  "urls": ["https://github.com/stan-dev/example-models/tree/master/bugs_examples/vol1/bones", "http://www.mrc-bsu.cam.ac.uk/wp-content/uploads/WinBUGS_Vol1.pdf"],
+  "references": "mrc1winbugs",
+  "dimensions": {
+    "theta": 13
+  },
+  "reference_posterior_name": null,
+  "added_date": "2021-07-06",
+  "added_by": "Kane Lindsay",
+  "name": "bones_data-bones_model",
+  "model_name": "bones_model",
+  "data_name": "bones_data"
+}
diff --git a/posterior_database/posteriors/dogs-dogs.json b/posterior_database/posteriors/dogs-dogs.json
index 21a39c80..0f89838d 100644
--- a/posterior_database/posteriors/dogs-dogs.json
+++ b/posterior_database/posteriors/dogs-dogs.json
@@ -4,7 +4,7 @@
   "urls": "https://github.com/stan-dev/example-models/tree/master/ARM/Ch.24",
   "model_name": "dogs",
   "data_name": "dogs",
-  "reference_posterior_name": "dogs-dogs",
+  "reference_posterior_name": null,
   "references": "gelman2006data",
   "dimensions": {
     "beta": 3
diff --git a/posterior_database/posteriors/dogs-dogs_hierarchical.json b/posterior_database/posteriors/dogs-dogs_hierarchical.json
new file mode 100644
index 00000000..b4b78928
--- /dev/null
+++ b/posterior_database/posteriors/dogs-dogs_hierarchical.json
@@ -0,0 +1,12 @@
+{
+  "name": "dogs-dogs_hierarchical",
+  "model_name": "dogs_hierarchical",
+  "data_name": "dogs",
+  "reference_posterior_name": null,
+  "dimensions": {
+    "a": 1,
+    "b": 1
+  },
+  "added_by": "Mans Magnusson",
+  "added_date": "2022-08-12"
+}
diff --git a/posterior_database/posteriors/dogs-dogs_log.json b/posterior_database/posteriors/dogs-dogs_log.json
index cce40625..a7a4e710 100644
--- a/posterior_database/posteriors/dogs-dogs_log.json
+++ b/posterior_database/posteriors/dogs-dogs_log.json
@@ -4,7 +4,7 @@
   "urls": "https://github.com/stan-dev/example-models/tree/master/ARM/Ch.24",
   "model_name": "dogs_log",
   "data_name": "dogs",
-  "reference_posterior_name": "dogs-dogs_log",
+  "reference_posterior_name": null,
   "references": "gelman2006data",
   "dimensions": {
     "beta": 2
diff --git a/posterior_database/posteriors/dogs-dogs_nonhierarchical.json b/posterior_database/posteriors/dogs-dogs_nonhierarchical.json
new file mode 100644
index 00000000..21472671
--- /dev/null
+++ b/posterior_database/posteriors/dogs-dogs_nonhierarchical.json
@@ -0,0 +1,14 @@
+{
+  "name": "dogs-dogs_nonhierarchical",
+  "model_name": "dogs_nonhierarchical",
+  "data_name": "dogs",
+  "reference_posterior_name": null,
+  "dimensions": {
+    "mu_logit_ab": 2,
+    "sigma_logit_ab": 2,
+    "L_logit_ab": 1,
+    "z": 62
+  },
+  "added_by": "Mans Magnusson",
+  "added_date": "2022-08-12"
+}
diff --git a/posterior_database/posteriors/dugongs_data-dugongs_model.json b/posterior_database/posteriors/dugongs_data-dugongs_model.json
new file mode 100644
index 00000000..fe52a4cf
--- /dev/null
+++ b/posterior_database/posteriors/dugongs_data-dugongs_model.json
@@ -0,0 +1,19 @@
+{
+  "keywords": ["Non-Linear", "Growth Curve", "Dugongs"],
+  "urls": "https://github.com/stan-dev/example-models/tree/master/bugs_examples/vol2",
+  "references": "mrc2winbugs",
+  "dimensions": {
+    "alpha": 1,
+    "beta": 1,
+    "lambda": 1,
+    "tau": 1,
+    "sigma": 1,
+    "U3": 1
+  },
+  "reference_posterior_name": null,
+  "added_date": "2021-07-15",
+  "added_by": "Kane Lindsay",
+  "name": "dugongs_data-dugongs_model",
+  "model_name": "dugongs_model",
+  "data_name": "dugongs_data"
+}
diff --git a/posterior_database/posteriors/lsat_data-lsat_model.json b/posterior_database/posteriors/lsat_data-lsat_model.json
new file mode 100644
index 00000000..1b11927d
--- /dev/null
+++ b/posterior_database/posteriors/lsat_data-lsat_model.json
@@ -0,0 +1,18 @@
+{
+  "keywords": ["LSAT", "Random Effects", "Rasch"],
+  "urls": "https://github.com/stan-dev/example-models/tree/master/bugs_examples/vol1/lsat",
+  "references": "mrc1winbugs",
+  "dimensions": {
+    "alpha": 5,
+    "theta": 1000,
+    "beta": 1,
+    "mean_alpha": 1,
+    "a": 5
+  },
+  "reference_posterior_name": null,
+  "added_date": "2021-07-13",
+  "added_by": "Kane Lindsay",
+  "name": "lsat_data-lsat_model",
+  "model_name": "lsat_model",
+  "data_name": "lsat_data"
+}
diff --git a/posterior_database/posteriors/nes_logit_data-nes_logit_model.json b/posterior_database/posteriors/nes_logit_data-nes_logit_model.json
new file mode 100644
index 00000000..517706d8
--- /dev/null
+++ b/posterior_database/posteriors/nes_logit_data-nes_logit_model.json
@@ -0,0 +1,15 @@
+{
+  "keywords": ["Election", "Population", "Presidential", "1992"],
+  "urls": "https://github.com/stan-dev/example-models/tree/master/ARM/Ch.5",
+  "references": "gelman2006data",
+  "dimensions": {
+    "alpha": 1,
+    "beta": 1
+  },
+  "reference_posterior_name": null,
+  "added_date": "2021-07-01",
+  "added_by": "Kane Lindsay",
+  "name": "nes_logit_data-nes_logit_model",
+  "model_name": "nes_logit_model",
+  "data_name": "nes_logit_data"
+}
diff --git a/posterior_database/posteriors/rats_data-rats_model.json b/posterior_database/posteriors/rats_data-rats_model.json
new file mode 100644
index 00000000..881d474c
--- /dev/null
+++ b/posterior_database/posteriors/rats_data-rats_model.json
@@ -0,0 +1,24 @@
+{
+  "keywords": ["rats", "linear growth curve"],
+  "urls": "https://github.com/stan-dev/example-models/tree/master/bugs_examples/vol1/rats",
+  "references": "mrc1winbugs",
+  "dimensions": {
+    "alpha": 30,
+    "beta": 30,
+    "mu_alpha": 1,
+    "mu_beta": 1,
+    "sigmasq_y": 1,
+    "sigmasq_alpha": 1,
+    "sigmasq_beta": 1,
+    "sigma_y": 1,
+    "sigma_alpha": 1,
+    "sigma_beta": 1,
+    "alpha0": 1
+  },
+  "reference_posterior_name": null,
+  "added_date": "2021-07-06",
+  "added_by": "Kane Lindsay",
+  "name": "rats_data-rats_model",
+  "model_name": "rats_model",
+  "data_name": "rats_data"
+}
diff --git a/posterior_database/posteriors/seeds_data-seeds_centered_model.json b/posterior_database/posteriors/seeds_data-seeds_centered_model.json
new file mode 100644
index 00000000..88628e16
--- /dev/null
+++ b/posterior_database/posteriors/seeds_data-seeds_centered_model.json
@@ -0,0 +1,20 @@
+{
+  "keywords": ["seeds", "germination", "random effect", "logistic regression", "stanified", "centered"],
+  "urls": "http://www.mrc-bsu.cam.ac.uk/wp-content/uploads/WinBUGS_Vol1.pdf",
+  "references": "crowder1978beta",
+  "dimensions": {
+    "alpha0": 1,
+    "alpha1": 1,
+    "alpha12": 1,
+    "alpha2": 1,
+    "c": 21,
+    "sigma": 1,
+    "b": 21
+  },
+  "reference_posterior_name": null,
+  "added_date": "2021-07-07",
+  "added_by": "Kane Lindsay",
+  "name": "seeds_data-seeds_centered_model",
+  "model_name": "seeds_centered_model",
+  "data_name": "seeds_data"
+}
diff --git a/posterior_database/posteriors/seeds_data-seeds_model.json b/posterior_database/posteriors/seeds_data-seeds_model.json
new file mode 100644
index 00000000..742ad9b3
--- /dev/null
+++ b/posterior_database/posteriors/seeds_data-seeds_model.json
@@ -0,0 +1,20 @@
+{
+  "keywords": ["seeds", "germination", "random effect", "logistic regression"],
+  "urls": "http://www.mrc-bsu.cam.ac.uk/wp-content/uploads/WinBUGS_Vol1.pdf",
+  "references": "crowder1978beta",
+  "dimensions": {
+    "alpha0": 1,
+    "alpha1": 1,
+    "alpha12": 1,
+    "alpha2": 1,
+    "tau": 1,
+    "b": 21,
+    "sigma": 1
+  },
+  "reference_posterior_name": null,
+  "added_date": "2021-07-07",
+  "added_by": "Kane Lindsay",
+  "name": "seeds_data-seeds_model",
+  "model_name": "seeds_model",
+  "data_name": "seeds_data"
+}
diff --git a/posterior_database/posteriors/seeds_data-seeds_stanified_model.json b/posterior_database/posteriors/seeds_data-seeds_stanified_model.json
new file mode 100644
index 00000000..9a01adbf
--- /dev/null
+++ b/posterior_database/posteriors/seeds_data-seeds_stanified_model.json
@@ -0,0 +1,19 @@
+{
+  "keywords": ["seeds", "germination", "random effect", "logistic regression", "stanified"],
+  "urls": "http://www.mrc-bsu.cam.ac.uk/wp-content/uploads/WinBUGS_Vol1.pdf",
+  "references": "crowder1978beta",
+  "dimensions": {
+    "alpha0": 1,
+    "alpha1": 1,
+    "alpha12": 1,
+    "alpha2": 1,
+    "b": 21,
+    "sigma": 1
+  },
+  "reference_posterior_name": null,
+  "added_date": "2021-07-07",
+  "added_by": "Kane Lindsay",
+  "name": "seeds_data-seeds_stanified_model",
+  "model_name": "seeds_stanified_model",
+  "data_name": "seeds_data"
+}
diff --git a/posterior_database/posteriors/surgical_data-surgical_model.json b/posterior_database/posteriors/surgical_data-surgical_model.json
new file mode 100644
index 00000000..a0c55239
--- /dev/null
+++ b/posterior_database/posteriors/surgical_data-surgical_model.json
@@ -0,0 +1,19 @@
+{
+  "keywords": ["hospital", "ranking", "surgical"],
+  "urls": "https://github.com/stan-dev/example-models/tree/master/bugs_examples/vol1/rats",
+  "references": "mrc1winbugs",
+  "dimensions": {
+    "mu": 1,
+    "sigmasq": 1,
+    "b": 12,
+    "sigma": 1,
+    "p": 12,
+    "pop_mean": 1
+  },
+  "reference_posterior_name": null,
+  "added_date": "2021-07-08",
+  "added_by": "Kane Lindsay",
+  "name": "surgical_data-surgical_model",
+  "model_name": "surgical_model",
+  "data_name": "surgical_data"
+}
diff --git a/posterior_database/posteriors/wells_data-wells_daae_c_model.json b/posterior_database/posteriors/wells_data-wells_daae_c_model.json
new file mode 100644
index 00000000..6cab09cd
--- /dev/null
+++ b/posterior_database/posteriors/wells_data-wells_daae_c_model.json
@@ -0,0 +1,15 @@
+{
+  "keywords": ["wells", "logistic", "regression", "scaled", "wells_daae_c", "social predictor", "centered"],
+  "urls": "https://github.com/stan-dev/example-models/tree/master/ARM/Ch.5",
+  "references": "gelman2006data",
+  "dimensions": {
+    "alpha": 1,
+    "beta": 5
+  },
+  "reference_posterior_name": null,
+  "added_date": "2021-07-07",
+  "added_by": "Kane Lindsay",
+  "name": "wells_data-wells_daae_c_model",
+  "model_name": "wells_daae_c_model",
+  "data_name": "wells_data"
+}
diff --git a/posterior_database/posteriors/wells_data-wells_dae_c_model.json b/posterior_database/posteriors/wells_data-wells_dae_c_model.json
new file mode 100644
index 00000000..2d126d40
--- /dev/null
+++ b/posterior_database/posteriors/wells_data-wells_dae_c_model.json
@@ -0,0 +1,15 @@
+{
+  "keywords": ["wells", "logistic", "regression", "scaled", "wells_dae_c", "social predictor", "centered"],
+  "urls": "https://github.com/stan-dev/example-models/tree/master/ARM/Ch.5",
+  "references": "gelman2006data",
+  "dimensions": {
+    "alpha": 1,
+    "beta": 4
+  },
+  "reference_posterior_name": null,
+  "added_date": "2021-07-07",
+  "added_by": "Kane Lindsay",
+  "name": "wells_data-wells_dae_c_model",
+  "model_name": "wells_dae_c_model",
+  "data_name": "wells_data"
+}
diff --git a/posterior_database/posteriors/wells_data-wells_dae_inter_model.json b/posterior_database/posteriors/wells_data-wells_dae_inter_model.json
new file mode 100644
index 00000000..efc3c835
--- /dev/null
+++ b/posterior_database/posteriors/wells_data-wells_dae_inter_model.json
@@ -0,0 +1,15 @@
+{
+  "keywords": ["wells", "logistic", "regression", "scaled", "wells_dae_inter", "social predictor", "interaction", "centered"],
+  "urls": "https://github.com/stan-dev/example-models/tree/master/ARM/Ch.5",
+  "references": "gelman2006data",
+  "dimensions": {
+    "alpha": 1,
+    "beta": 6
+  },
+  "reference_posterior_name": null,
+  "added_date": "2021-07-07",
+  "added_by": "Kane Lindsay",
+  "name": "wells_data-wells_dae_inter_model",
+  "model_name": "wells_dae_inter_model",
+  "data_name": "wells_data"
+}
diff --git a/posterior_database/posteriors/wells_data-wells_dae_model.json b/posterior_database/posteriors/wells_data-wells_dae_model.json
new file mode 100644
index 00000000..be89a112
--- /dev/null
+++ b/posterior_database/posteriors/wells_data-wells_dae_model.json
@@ -0,0 +1,15 @@
+{
+  "keywords": ["wells", "logistic", "regression", "scaled", "wells_dae", "social predictor"],
+  "urls": "https://github.com/stan-dev/example-models/tree/master/ARM/Ch.5",
+  "references": "gelman2006data",
+  "dimensions": {
+    "alpha": 1,
+    "beta": 3
+  },
+  "reference_posterior_name": null,
+  "added_date": "2021-07-07",
+  "added_by": "Kane Lindsay",
+  "name": "wells_data-wells_dae_model",
+  "model_name": "wells_dae_model",
+  "data_name": "wells_data"
+}
diff --git a/posterior_database/posteriors/wells_data-wells_dist100_model.json b/posterior_database/posteriors/wells_data-wells_dist100_model.json
new file mode 100644
index 00000000..12be30df
--- /dev/null
+++ b/posterior_database/posteriors/wells_data-wells_dist100_model.json
@@ -0,0 +1,15 @@
+{
+  "keywords": ["wells", "logistic", "regression", "scaled", "wells_dist100"],
+  "urls": "https://github.com/stan-dev/example-models/tree/master/ARM/Ch.5",
+  "references": "gelman2006data",
+  "dimensions": {
+    "alpha": 1,
+    "beta": 1
+  },
+  "reference_posterior_name": null,
+  "added_date": "2021-07-07",
+  "added_by": "Kane Lindsay",
+  "name": "wells_data-wells_dist100_model",
+  "model_name": "wells_dist100_model",
+  "data_name": "wells_data"
+}
diff --git a/posterior_database/posteriors/wells_data-wells_dist100ars_model.json b/posterior_database/posteriors/wells_data-wells_dist100ars_model.json
new file mode 100644
index 00000000..94caa7ca
--- /dev/null
+++ b/posterior_database/posteriors/wells_data-wells_dist100ars_model.json
@@ -0,0 +1,15 @@
+{
+  "keywords": ["wells", "logistic", "regression", "scaled", "wells_d100ars"],
+  "urls": "https://github.com/stan-dev/example-models/tree/master/ARM/Ch.5",
+  "references": "gelman2006data",
+  "dimensions": {
+    "alpha": 1,
+    "beta": 2
+  },
+  "reference_posterior_name": null,
+  "added_date": "2021-07-07",
+  "added_by": "Kane Lindsay",
+  "name": "wells_data-wells_dist100ars_model",
+  "model_name": "wells_dist100ars_model",
+  "data_name": "wells_data"
+}
diff --git a/posterior_database/posteriors/wells_data-wells_interaction_c_model.json b/posterior_database/posteriors/wells_data-wells_interaction_c_model.json
new file mode 100644
index 00000000..74c2b7a8
--- /dev/null
+++ b/posterior_database/posteriors/wells_data-wells_interaction_c_model.json
@@ -0,0 +1,15 @@
+{
+  "keywords": ["wells", "ARM", "Ch.5", "logistic", "regression", "scaled", "two predictors", "arsenic", "distance", "interaction"],
+  "urls": "https://github.com/stan-dev/example-models/tree/master/ARM/Ch.5",
+  "references": "gelman2006data",
+  "dimensions": {
+    "alpha": 1,
+    "beta": 2
+  },
+  "reference_posterior_name": null,
+  "added_date": "2021-07-07",
+  "added_by": "Kane Lindsay",
+  "name": "wells_data-wells_interaction_c_model",
+  "model_name": "wells_interaction_c_model",
+  "data_name": "wells_data"
+}
diff --git a/posterior_database/posteriors/wells_data-wells_interaction_model.json b/posterior_database/posteriors/wells_data-wells_interaction_model.json
new file mode 100644
index 00000000..87992f79
--- /dev/null
+++ b/posterior_database/posteriors/wells_data-wells_interaction_model.json
@@ -0,0 +1,15 @@
+{
+  "keywords": ["wells", "ARM", "Ch.5", "logistic", "regression", "scaled", "two predictors", "arsenic", "distance", "interaction"],
+  "urls": "https://github.com/stan-dev/example-models/tree/master/ARM/Ch.5",
+  "references": "gelman2006data",
+  "dimensions": {
+    "alpha": 1,
+    "beta": 3
+  },
+  "reference_posterior_name": null,
+  "added_date": "2021-07-07",
+  "added_by": "Kane Lindsay",
+  "name": "wells_data-wells_interaction_model",
+  "model_name": "wells_interaction_model",
+  "data_name": "wells_data"
+}
diff --git a/posterior_database/reference_posteriors/draws/draws/dogs-dogs.json.zip b/posterior_database/reference_posteriors/draws/draws/dogs-dogs.json.zip
deleted file mode 100644
index c8a600fe..00000000
Binary files a/posterior_database/reference_posteriors/draws/draws/dogs-dogs.json.zip and /dev/null differ
diff --git a/posterior_database/reference_posteriors/draws/draws/dogs-dogs_log.json.zip b/posterior_database/reference_posteriors/draws/draws/dogs-dogs_log.json.zip
deleted file mode 100644
index bb5a8ea0..00000000
Binary files a/posterior_database/reference_posteriors/draws/draws/dogs-dogs_log.json.zip and /dev/null differ
diff --git a/posterior_database/reference_posteriors/draws/info/dogs-dogs.info.json b/posterior_database/reference_posteriors/draws/info/dogs-dogs.info.json
deleted file mode 100644
index b34d35df..00000000
--- a/posterior_database/reference_posteriors/draws/info/dogs-dogs.info.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
-  "name": "dogs-dogs",
-  "inference": {
-    "method": "stan_sampling",
-    "method_arguments": {
-      "chains": 10,
-      "iter": 20000,
-      "warmup": 10000,
-      "thin": 10,
-      "seed": 4711,
-      "control": {
-        "adapt_delta": 0.8
-      }
-    }
-  },
-  "diagnostics": {
-    "diagnostic_information": {
-      "names": ["beta[1]", "beta[2]", "beta[3]"]
-    },
-    "ndraws": 10000,
-    "nchains": 10,
-    "effective_sample_size_bulk": [10070.7693961204, 9942.62362102553, 9867.72892264319],
-    "effective_sample_size_tail": [9915.2088903192, 9687.76754229738, 9885.62315849254],
-    "r_hat": [1.00028644457341, 0.999948587921691, 1.00056875179426],
-    "divergent_transitions": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
-    "expected_fraction_of_missing_information": [2.01383198363118, 2.02471200002384, 1.95309080372357, 1.98277311683521, 2.01702381088003, 2.05041828190279, 1.95590385692459, 2.05181216442824, 2.09473302704777, 2.00215489030191]
-  },
-  "checks_made": {
-    "ndraws_is_10k": true,
-    "nchains_is_gte_4": true,
-    "ess_within_bounds": true,
-    "r_hat_below_1_01": true,
-    "efmi_above_0_2": true
-  },
-  "comments": null,
-  "added_by": "Oliver Järnefelt",
-  "added_date": "2020-04-21",
-  "versions": {
-    "rstan_version": "rstan 2.19.2",
-    "r_Makevars": "\nCXX14FLAGS=-O3 -march=native -mtune=native -fPIC\nCXX14=g++",
-    "r_version": "R version 3.6.1 (2019-07-05)",
-    "r_session": "R version 3.6.1 (2019-07-05)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 16.04.6 LTS\n\nMatrix products: default\nBLAS:   /usr/lib/libblas/libblas.so.3.6.0\nLAPACK: /usr/lib/lapack/liblapack.so.3.6.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=fi_FI.UTF-8       \n [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=fi_FI.UTF-8    LC_MESSAGES=en_US.UTF-8   \n [7] LC_PAPER=fi_FI.UTF-8       LC_NAME=C                  LC_ADDRESS=C              \n[10] LC_TELEPHONE=C             LC_MEASUREMENT=fi_FI.UTF-8 LC_IDENTIFICATION=C       \n\nattached base packages:\n[1] stats     graphics  grDevices utils     datasets  methods   base     \n\nother attached packages:\n[1] posterior_0.0.1    posteriordb_0.1    rstan_2.19.2       ggplot2_3.2.1      StanHeaders_2.19.0\n\nloaded via a namespace (and not attached):\n [1] Rcpp_1.0.2         git2r_0.26.1       pillar_1.4.2       compiler_3.6.1     prettyunits_1.0.2 \n [6] tools_3.6.1        pkgbuild_1.0.6     jsonlite_1.6.1     checkmate_2.0.0    tibble_2.1.3      \n[11] gtable_0.3.0       pkgconfig_2.0.3    rlang_0.4.4        cli_1.1.0          rstudioapi_0.10   \n[16] yaml_2.2.0         parallel_3.6.1     loo_2.1.0          gridExtra_2.3      withr_2.1.2       \n[21] dplyr_0.8.3        stats4_3.6.1       grid_3.6.1         tidyselect_0.2.5   inline_0.3.15     \n[26] glue_1.3.1         R6_2.4.0           processx_3.4.1     callr_3.3.2        purrr_0.3.3       \n[31] magrittr_1.5       backports_1.1.6    scales_1.0.0       ps_1.3.0           matrixStats_0.55.0\n[36] abind_1.4-5        assertthat_0.2.1   colorspace_1.4-1   lazyeval_0.2.2     munsell_0.5.0     \n[41] crayon_1.3.4      "
-  }
-}
diff --git a/posterior_database/reference_posteriors/draws/info/dogs-dogs_log.info.json b/posterior_database/reference_posteriors/draws/info/dogs-dogs_log.info.json
deleted file mode 100644
index b7438ea5..00000000
--- a/posterior_database/reference_posteriors/draws/info/dogs-dogs_log.info.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
-  "name": "dogs-dogs_log",
-  "inference": {
-    "method": "stan_sampling",
-    "method_arguments": {
-      "chains": 10,
-      "iter": 20000,
-      "warmup": 10000,
-      "thin": 10,
-      "seed": 4711,
-      "control": {
-        "adapt_delta": 0.99,
-        "max_treedepth": 20
-      }
-    }
-  },
-  "diagnostics": {
-    "diagnostic_information": {
-      "names": ["beta[1]", "beta[2]"]
-    },
-    "ndraws": 10000,
-    "nchains": 10,
-    "effective_sample_size_bulk": [10095.6976282408, 10238.2808440588],
-    "effective_sample_size_tail": [9934.56765602259, 9781.58599763196],
-    "r_hat": [1.00046938440966, 1.00017525800829],
-    "divergent_transitions": [25, 24, 31, 29, 27, 21, 29, 29, 26, 30],
-    "expected_fraction_of_missing_information": [2.09938941453134, 1.94989211529129, 2.02667140371668, 1.96964313040911, 1.89817619042129, 1.96444028676018, 1.95200355892366, 1.86271794149058, 1.94981506237241, 2.00367507257104]
-  },
-  "checks_made": {
-    "ndraws_is_10k": true,
-    "nchains_is_gte_4": true,
-    "ess_within_bounds": true,
-    "r_hat_below_1_01": true,
-    "efmi_above_0_2": true
-  },
-  "comments": null,
-  "added_by": "Oliver J<c3><a4>rnefelt",
-  "added_date": "2020-05-29",
-  "versions": {
-    "rstan_version": "rstan 2.19.3",
-    "r_Makevars": "",
-    "r_version": "R version 3.6.1 (2019-07-05)",
-    "r_session": "R version 3.6.1 (2019-07-05)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: CentOS Linux 7 (Core)\n\nMatrix products: default\nBLAS/LAPACK: /share/apps/spack/envs/fgci-centos7-generic/software/openblas/0.3.7/fqs4o7j/lib/libopenblasp-r0.3.7.so\n\nlocale:\n[1] C\n\nattached base packages:\n[1] stats     graphics  grDevices utils     datasets  methods   base     \n\nother attached packages:\n[1] posterior_0.0.2    posteriordb_0.1    rstan_2.19.3       ggplot2_3.3.0     \n[5] StanHeaders_2.19.2\n\nloaded via a namespace (and not attached):\n [1] Rcpp_1.0.4.6       pillar_1.4.3       compiler_3.6.1     prettyunits_1.1.1 \n [5] tools_3.6.1        pkgbuild_1.0.7     lifecycle_0.2.0    tibble_3.0.1      \n [9] gtable_0.3.0       checkmate_2.0.0    pkgconfig_2.0.3    rlang_0.4.6       \n[13] cli_2.0.2          parallel_3.6.1     loo_2.2.0          gridExtra_2.3     \n[17] withr_2.2.0        dplyr_0.8.5        vctrs_0.2.4        stats4_3.6.1      \n[21] grid_3.6.1         tidyselect_1.0.0   glue_1.4.0         inline_0.3.15     \n[25] R6_2.4.1           processx_3.4.2     fansi_0.4.1        callr_3.4.3       \n[29] purrr_0.3.4        magrittr_1.5       backports_1.1.6    scales_1.1.0      \n[33] ps_1.3.2           ellipsis_0.3.0     matrixStats_0.56.0 abind_1.4-5       \n[37] assertthat_0.2.1   colorspace_1.4-1   munsell_0.5.0      crayon_1.3.4      "
-  }
-}
diff --git a/posterior_database/reference_posteriors/summary_statistics/mean/info/dogs-dogs.info.json b/posterior_database/reference_posteriors/summary_statistics/mean/info/dogs-dogs.info.json
deleted file mode 100644
index 66cb20a3..00000000
--- a/posterior_database/reference_posteriors/summary_statistics/mean/info/dogs-dogs.info.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
-  "name": "dogs-dogs",
-  "inference": {
-    "method": "stan_sampling",
-    "method_arguments": {
-      "chains": 10,
-      "iter": 20000,
-      "warmup": 10000,
-      "thin": 10,
-      "seed": 4711,
-      "control": {
-        "adapt_delta": 0.8
-      }
-    }
-  },
-  "diagnostics": {
-    "diagnostic_information": {
-      "names": ["beta[1]", "beta[2]", "beta[3]"]
-    },
-    "ndraws": 10000,
-    "nchains": 10,
-    "effective_sample_size_bulk": [10070.7693961204, 9942.62362102553, 9867.72892264319],
-    "effective_sample_size_tail": [9915.2088903192, 9687.76754229738, 9885.62315849254],
-    "r_hat": [1.00028644457341, 0.999948587921691, 1.00056875179426],
-    "divergent_transitions": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
-    "expected_fraction_of_missing_information": [2.01383198363118, 2.02471200002384, 1.95309080372357, 1.98277311683521, 2.01702381088003, 2.05041828190279, 1.95590385692459, 2.05181216442824, 2.09473302704777, 2.00215489030191]
-  },
-  "checks_made": {
-    "ndraws_is_gte_10k": true,
-    "nchains_is_gte_4": true,
-    "ess_within_bounds": true,
-    "r_hat_below_1_01": true,
-    "efmi_above_0_2": true
-  },
-  "comments": null,
-  "added_by": "Oliver Järnefelt",
-  "added_date": "2020-04-21",
-  "versions": {
-    "rstan_version": "rstan 2.19.2",
-    "r_Makevars": "\nCXX14FLAGS=-O3 -march=native -mtune=native -fPIC\nCXX14=g++",
-    "r_version": "R version 3.6.1 (2019-07-05)",
-    "r_session": "R version 3.6.1 (2019-07-05)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 16.04.6 LTS\n\nMatrix products: default\nBLAS:   /usr/lib/libblas/libblas.so.3.6.0\nLAPACK: /usr/lib/lapack/liblapack.so.3.6.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=fi_FI.UTF-8       \n [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=fi_FI.UTF-8    LC_MESSAGES=en_US.UTF-8   \n [7] LC_PAPER=fi_FI.UTF-8       LC_NAME=C                  LC_ADDRESS=C              \n[10] LC_TELEPHONE=C             LC_MEASUREMENT=fi_FI.UTF-8 LC_IDENTIFICATION=C       \n\nattached base packages:\n[1] stats     graphics  grDevices utils     datasets  methods   base     \n\nother attached packages:\n[1] posterior_0.0.1    posteriordb_0.1    rstan_2.19.2       ggplot2_3.2.1      StanHeaders_2.19.0\n\nloaded via a namespace (and not attached):\n [1] Rcpp_1.0.2         git2r_0.26.1       pillar_1.4.2       compiler_3.6.1     prettyunits_1.0.2 \n [6] tools_3.6.1        pkgbuild_1.0.6     jsonlite_1.6.1     checkmate_2.0.0    tibble_2.1.3      \n[11] gtable_0.3.0       pkgconfig_2.0.3    rlang_0.4.4        cli_1.1.0          rstudioapi_0.10   \n[16] yaml_2.2.0         parallel_3.6.1     loo_2.1.0          gridExtra_2.3      withr_2.1.2       \n[21] dplyr_0.8.3        stats4_3.6.1       grid_3.6.1         tidyselect_0.2.5   inline_0.3.15     \n[26] glue_1.3.1         R6_2.4.0           processx_3.4.1     callr_3.3.2        purrr_0.3.3       \n[31] magrittr_1.5       backports_1.1.6    scales_1.0.0       ps_1.3.0           matrixStats_0.55.0\n[36] abind_1.4-5        assertthat_0.2.1   colorspace_1.4-1   lazyeval_0.2.2     munsell_0.5.0     \n[41] crayon_1.3.4      ",
-    "r_summary_statistic": "posterior R package, version 0.1.2"
-  }
-}
diff --git a/posterior_database/reference_posteriors/summary_statistics/mean/info/dogs-dogs_log.info.json b/posterior_database/reference_posteriors/summary_statistics/mean/info/dogs-dogs_log.info.json
deleted file mode 100644
index f105d160..00000000
--- a/posterior_database/reference_posteriors/summary_statistics/mean/info/dogs-dogs_log.info.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
-  "name": "dogs-dogs_log",
-  "inference": {
-    "method": "stan_sampling",
-    "method_arguments": {
-      "chains": 10,
-      "iter": 20000,
-      "warmup": 10000,
-      "thin": 10,
-      "seed": 4711,
-      "control": {
-        "adapt_delta": 0.99,
-        "max_treedepth": 20
-      }
-    }
-  },
-  "diagnostics": {
-    "diagnostic_information": {
-      "names": ["beta[1]", "beta[2]"]
-    },
-    "ndraws": 10000,
-    "nchains": 10,
-    "effective_sample_size_bulk": [10095.6976282408, 10238.2808440588],
-    "effective_sample_size_tail": [9934.56765602259, 9781.58599763196],
-    "r_hat": [1.00046938440966, 1.00017525800829],
-    "divergent_transitions": [25, 24, 31, 29, 27, 21, 29, 29, 26, 30],
-    "expected_fraction_of_missing_information": [2.09938941453134, 1.94989211529129, 2.02667140371668, 1.96964313040911, 1.89817619042129, 1.96444028676018, 1.95200355892366, 1.86271794149058, 1.94981506237241, 2.00367507257104]
-  },
-  "checks_made": {
-    "ndraws_is_gte_10k": true,
-    "nchains_is_gte_4": true,
-    "ess_within_bounds": true,
-    "r_hat_below_1_01": true,
-    "efmi_above_0_2": true
-  },
-  "comments": null,
-  "added_by": "Oliver J<c3><a4>rnefelt",
-  "added_date": "2020-05-29",
-  "versions": {
-    "rstan_version": "rstan 2.19.3",
-    "r_Makevars": "",
-    "r_version": "R version 3.6.1 (2019-07-05)",
-    "r_session": "R version 3.6.1 (2019-07-05)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: CentOS Linux 7 (Core)\n\nMatrix products: default\nBLAS/LAPACK: /share/apps/spack/envs/fgci-centos7-generic/software/openblas/0.3.7/fqs4o7j/lib/libopenblasp-r0.3.7.so\n\nlocale:\n[1] C\n\nattached base packages:\n[1] stats     graphics  grDevices utils     datasets  methods   base     \n\nother attached packages:\n[1] posterior_0.0.2    posteriordb_0.1    rstan_2.19.3       ggplot2_3.3.0     \n[5] StanHeaders_2.19.2\n\nloaded via a namespace (and not attached):\n [1] Rcpp_1.0.4.6       pillar_1.4.3       compiler_3.6.1     prettyunits_1.1.1 \n [5] tools_3.6.1        pkgbuild_1.0.7     lifecycle_0.2.0    tibble_3.0.1      \n [9] gtable_0.3.0       checkmate_2.0.0    pkgconfig_2.0.3    rlang_0.4.6       \n[13] cli_2.0.2          parallel_3.6.1     loo_2.2.0          gridExtra_2.3     \n[17] withr_2.2.0        dplyr_0.8.5        vctrs_0.2.4        stats4_3.6.1      \n[21] grid_3.6.1         tidyselect_1.0.0   glue_1.4.0         inline_0.3.15     \n[25] R6_2.4.1           processx_3.4.2     fansi_0.4.1        callr_3.4.3       \n[29] purrr_0.3.4        magrittr_1.5       backports_1.1.6    scales_1.1.0      \n[33] ps_1.3.2           ellipsis_0.3.0     matrixStats_0.56.0 abind_1.4-5       \n[37] assertthat_0.2.1   colorspace_1.4-1   munsell_0.5.0      crayon_1.3.4      ",
-    "r_summary_statistic": "posterior R package, version 0.1.2"
-  }
-}
diff --git a/posterior_database/reference_posteriors/summary_statistics/mean/mean/dogs-dogs.json b/posterior_database/reference_posteriors/summary_statistics/mean/mean/dogs-dogs.json
deleted file mode 100644
index 61809c53..00000000
--- a/posterior_database/reference_posteriors/summary_statistics/mean/mean/dogs-dogs.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
-  "names": ["beta[1]", "beta[2]", "beta[3]"],
-  "mean": [1.5606653078379, -0.383071621431575, -0.16105655288768],
-  "mcse_mean": [0.00207971568161874, 0.000376715869212808, 0.000385605503759991]
-}
diff --git a/posterior_database/reference_posteriors/summary_statistics/mean/mean/dogs-dogs_log.json b/posterior_database/reference_posteriors/summary_statistics/mean/mean/dogs-dogs_log.json
deleted file mode 100644
index fc84da09..00000000
--- a/posterior_database/reference_posteriors/summary_statistics/mean/mean/dogs-dogs_log.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
-  "names": ["beta[1]", "beta[2]"],
-  "mean": [-0.362006205437702, 0.0611926040882098],
-  "mcse_mean": [0.000369959609107164, 0.000237230442496833]
-}


Test patch:
diff --git a/tests/check_posteriordb_content.R b/tests/check_posteriordb_content.R
index 63fc7d36..73012e1b 100644
--- a/tests/check_posteriordb_content.R
+++ b/tests/check_posteriordb_content.R
@@ -7,9 +7,22 @@ status_code <- check_pdb(pdbl, run_stan_code_checks = FALSE)
 # Run Stan code for changed or added models
 added_modified_paths <- strsplit(readLines(con = "added_modified.txt"), " ")[[1]]
 posteriors_to_check <- get_posteriors_from_paths(paths = added_modified_paths, pdbl)
+
+# Posteriors to skip on CI (they work locally)
+posteriors_to_skip_check <- c("dogs-dogs_nonhierarchical", "wells_data-wells_dae_c_model", "seeds_data-seeds_stanified_model")
+
+
 if(length(posteriors_to_check) > 0){
-  status_code2 <- check_pdb(pdbl, posterior_names_to_check = posteriors_to_check, run_stan_code_checks = TRUE)
-  status_code <- max(status_code, status_code2)
+  cat("Checking changed posteriors:\n")
+  cat(paste(posteriors_to_check, collapse = "\n"),"\n\n")
+  library(rstan)
+  for(i in seq_along(posteriors_to_check)){
+    if(posteriors_to_check[i] %in% posteriors_to_skip_check) next
+    post <- pdb_posterior(posteriors_to_check[i], pdbl)
+    status_code2 <- posteriordb:::check_pdb_posterior(post, run_stan_code_checks = TRUE)
+    posteriordb:::pdb_clear_cache(pdbl)
+    status_code <- max(status_code, as.integer(!status_code2))
+  }
 }
 
 q(status = status_code)