create-priorsense-data: Create data structure for priorsense

create-priorsense-dataR 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)

n-kall/priorsense documentation built on Nov. 4, 2024, 10:30 p.m.