The crmReporter
package is designed to provide a simple interface between crmPack
(and other MCMC packages) and the tidyverse and to augment the reporting facilities provided by crmPack
, coda
, runjags
and other packages relating to MCMC simulation.
crmReporter
is available from GitHub. To install it, use
devtools::install_github("PuzzledFace/crmReporter")
Creating tidy data with crmReporter
is simple: use the tidy()
verb. Tidy works with mcmc
s, mcmc.list
s, runjags
s and runjags.list
s.
library(crmReporter)
#> Registered S3 method overwritten by 'crmPack':
#> method from
#> print.gtable gtable
data("oCRMPosteriorShort")
x <- oCRMPosteriorShort %>% tidy()
x %>% head()
#> # A tibble: 6 x 5
#> Chain Sample Parameter Index Value
#> <int> <chr> <chr> <int> <dbl>
#> 1 1 5001 alpha 1 7.27
#> 2 1 5001 alpha 2 3.10
#> 3 1 5001 beta NA 0.959
#> 4 1 5003 alpha 1 5.73
#> 5 1 5003 alpha 2 4.66
#> 6 1 5003 beta NA 0.886
You can use the output from tidy()
as input to other crmReporter
functions or to your own code built within the Tidyverse. Here are some sample outputs from crmReporter
functions. They all use data from the first example study in the original O'Quigley paper.
Parameter
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.