run_hurdle: An internal function to execute a JAGS hurdle model and get...

View source: R/run_hurdle.R

run_hurdleR Documentation

An internal function to execute a JAGS hurdle model and get posterior results

Description

This function fits a JAGS using the jags funciton and obtain posterior inferences.

Usage

run_hurdle(type, dist_e, dist_c, inits, se, sc, sde, sdc, ppc)

Arguments

type

Type of structural value mechanism assumed. Choices are Structural Completely At Random (SCAR), and Structural At Random (SAR).

dist_e

distribution assumed for the effects. Current available chocies are: Normal ('norm'), Beta ('beta'), Gamma ('gamma'), Exponential ('exp'), Weibull ('weibull'), Logistic ('logis'), Poisson ('pois'), Negative Binomial ('nbinom') or Bernoulli ('bern')

dist_c

distribution assumed for the costs. Current available chocies are: Normal ('norm'), Gamma ('gamma') or LogNormal ('lnorm').

inits

a list with elements equal to the number of chains selected; each element of the list is itself a list of starting values for the BUGS model, or a function creating (possibly random) initial values. If inits is NULL, JAGS will generate initial values for parameters

se

Structural value to be found in the effect data. If set to NULL, no structural value is chosen and a standard model for the effects is run.

sc

Structural value to be found in the cost data. If set to NULL, no structural value is chosen and a standard model for the costs is run.

sde

hyper-prior value for the standard deviation of the distribution of the structural effects. The default value is 1.0E-6 to approximate a point mass at the structural value provided by the user.

sdc

hyper-prior value for the standard deviation of the distribution of the structural costs. The default value is 1.0E-6 to approximate a point mass at the structural value provided by the user.

ppc

Logical. If ppc is TRUE, the estimates of the parameters that can be used to generate replications from the model are saved.

Examples

#Internal function only
#No examples
#
#

missingHE documentation built on March 31, 2023, 10:27 p.m.