cause_grid_adapt: CAUSE posterior density estimation

Description Usage Arguments Value

View source: R/cause_grid_adapt.R

Description

Uses an adaptive grid approximation to estimate the posterior distribution of q, gamma, and eta or a subset of those

Usage

1
2
3
4
5
6
7
8
9
cause_grid_adapt(
  X,
  param_ests,
  params = c("q", "gamma", "eta"),
  priors = list(function(q) {     dbeta(q, 1, 10) }, function(b) {     dnorm(b, 0, 0.6)
    }, function(b) {     dnorm(b, 0, 0.6) }),
  n_start = c(10, 20, 20),
  max_post_per_bin = 0.001
)

Arguments

X

An object of class cause_data

param_ests

param_ests Object of class cause_params

params

Vector of parameter names. Should be some subest of c("q", "gamma", "eta") given in any order.

priors

List of prior functions corresponding to parameters in params. Each element should be a funciton that takes one argument and returns a log likelihood.

n_start

Vector of length length(params) giving the number of starting bins for each dimension

max_post_per_bin

Maximum posterior probability for each grid cube. This parameter controls the fineness of the approximation.

Value

An object of class cause_post.


jean997/cause documentation built on Dec. 25, 2021, 10 p.m.