create-priorsense-data {priorsense} | R Documentation |
Create data structure for priorsense
Description
Create a data structure that contains all required data and functions for priorsense
Usage
create_priorsense_data(x, ...)
## Default S3 method:
create_priorsense_data(
x,
fit = NULL,
log_prior_fn = log_prior_draws,
log_lik_fn = log_lik_draws,
log_prior = NULL,
log_lik = NULL,
log_ratio_fn = NULL,
...
)
## S3 method for class 'stanfit'
create_priorsense_data(x, ...)
## S3 method for class 'CmdStanFit'
create_priorsense_data(x, ...)
## S3 method for class 'draws'
create_priorsense_data(x, ...)
Arguments
x |
an object for which the method is defined |
... |
arguments passed to methods |
fit |
a model fit object (only used if x is not a fit object) |
log_prior_fn |
function to derive log prior from object |
log_lik_fn |
function to derive log likelihood from object |
log_prior |
draws from log prior |
log_lik |
draws from log likelihood |
log_ratio_fn |
function for moment matching |
Value
A priorsense_data
object, which contains the data and
functions to run sensitivity analyses.
Examples
x <- example_powerscale_model()
drw <- x$draws
psd <- create_priorsense_data(drw)
[Package priorsense version 1.0.2 Index]