Skip to content

Commit

Permalink
Link to example project and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau-lilly committed Apr 20, 2021
1 parent 2dec057 commit a547222
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 6 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Description: Bayesian data analysis usually incurs long runtimes
both single-fit workflows and multi-rep simulation studies.
For the statistical methodology, please refer to 'Stan' documentation
(Stan Development Team 2020) <https://mc-stan.org/>.
Version: 0.0.0.9003
Version: 0.0.1
License: MIT + file LICENSE
URL: https://docs.ropensci.org/stantargets/, https://github.com/ropensci/stantargets
BugReports: https://github.com/ropensci/stantargets/issues
Expand Down
3 changes: 2 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# stantargets 0.0.0.9003
# stantargets 0.0.1

* Skip tests if CmdStan is not installed (@sakrejda).
* Use custom `generate_data()` function in the docs, as opposed to `tar_stan_example_data()` directly (@sakrejda).
Expand All @@ -12,6 +12,7 @@
* Use `@family` go cross-reference functions (@mattwarkentin).
* Elaborate on the roles and return values of specific targets generated by target factories (@mattwarkentin).
* Undergo rOpenSci peer review and transition to rOpenSci.
* Link to an example project.

# stantargets 0.0.0.9002

Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The `stantargets` R package is an extension to [`targets`](https://docs.ropensci

## How to get started

Read the `stantargets` tutorial vignettes [here](https://docs.ropensci.org/stantargets/articles/mcmc.html) and [here](https://docs.ropensci.org/stantargets/articles/mcmc_rep.html), then use <https://docs.ropensci.org/stantargets/> as a reference while constructing your own workflows.
Read the `stantargets` tutorial vignettes [here](https://docs.ropensci.org/stantargets/articles/mcmc.html) and [here](https://docs.ropensci.org/stantargets/articles/mcmc_rep.html), and use <https://docs.ropensci.org/stantargets/> as a reference while constructing your own workflows. Visit <https://github.com/wlandau/stantargets-example-validation> for an example project based on <https://docs.ropensci.org/stantargets/articles/mcmc_rep.html>. The example has an [RStudio Cloud workspace](https://rstudio.cloud/project/2466069) which allows you to run the project in a web browser.

## Installation

Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,14 @@ pipelines](https://docs.ropensci.org/stantargets/articles/mcmc.html).
Read the `stantargets` tutorial vignettes
[here](https://docs.ropensci.org/stantargets/articles/mcmc.html) and
[here](https://docs.ropensci.org/stantargets/articles/mcmc_rep.html),
then use <https://docs.ropensci.org/stantargets/> as a reference while
constructing your own workflows.
and use <https://docs.ropensci.org/stantargets/> as a reference while
constructing your own workflows. Visit
<https://github.com/wlandau/stantargets-example-validation> for an
example project based on
<https://docs.ropensci.org/stantargets/articles/mcmc_rep.html>. The
example has an [RStudio Cloud
workspace](https://rstudio.cloud/project/2466069) which allows you to
run the project in a web browser.

## Installation

Expand Down
1 change: 1 addition & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -352,3 +352,4 @@ SBC
stdout
stderr
HMC
mcmc
12 changes: 11 additions & 1 deletion vignettes/mcmc_rep.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,22 @@ if (identical(Sys.getenv("IN_PKGDOWN"), "true")) {
}
```

## Background

It is sometimes desirable to run one or more Bayesian models repeatedly across multiple simulated datasets. Examples:

1. Validate the implementation of a Bayesian model using simulation.
2. Simulate a randomized controlled experiment to explore frequentist properties such as power and Type I error.

This vignette focuses on (1). The goal of this particular example to simulate multiple datasets from the model below, analyze each dataset, and assess how often the estimated posterior intervals cover the true parameters from the prior predictive simulations. The quantile method by @cook2006 generalizes this concept, and simulation-based calibration [@talts2020] generalizes further. The interval-based technique featured in this vignette is not as robust as SBC, but it may be more expedient for large models because it does not require visual inspection of multiple histograms.
This vignette focuses on (1).

## Example project

Visit <https://github.com/wlandau/stantargets-example-validation> for an example project based on this vignette. The example has an [RStudio Cloud workspace](https://rstudio.cloud/project/2466069) which allows you to run the project in a web browser.

## Simulation-based validation study

The goal of this particular example to simulate multiple datasets from the model below, analyze each dataset, and assess how often the estimated posterior intervals cover the true parameters from the prior predictive simulations. The quantile method by @cook2006 generalizes this concept, and simulation-based calibration [@talts2020] generalizes further. The interval-based technique featured in this vignette is not as robust as SBC, but it may be more expedient for large models because it does not require visual inspection of multiple histograms.

```{r}
lines <- "data {
Expand Down

0 comments on commit a547222

Please sign in to comment.