Slots
datamodel
(
function
)
a function representing theJAGS
data model specification.priormodel
(
function
)
a function representing theJAGS
prior specification.modelspecs
(
function
)
a function computing the list of the data model and prior model specifications that are required to be specified completely (e.g. prior parameters, reference dose, etc.), based on the data slots that are required as arguments of this function. Apart of data arguments, this function can be specified with one additional (optional) argumentfrom_prior
of typelogical
and length one. Thisfrom_prior
flag can be used to differentiate the output of themodelspecs
, as its value is taken directly from thefrom_prior
argument of themcmc
method that invokesmodelspecs
function. That is, whenfrom_prior
isTRUE
, then onlypriormodel
JAGS model is used (datamodel
is not used) by themcmc
, and hencemodelspecs
function should return all the parameters that are required by thepriormodel
only. If the value offrom_prior
isFALSE
, then both JAGS modelsdatamodel
andpriormodel
are used in the MCMC sampler, and hencemodelspecs
function should return all the parameters required by bothdatamodel
andpriormodel
.init
(
function
)
a function computing the list of starting values for parameters required to be initialized in the MCMC sampler, based on the data slots that are required as arguments of this function.datanames
(
character
)
the names of all data slots that are used bydatamodel
JAGS function. No other names should be specified here.datanames_prior
(
character
)
the names of all data slots that are used bypriormodel
JAGS function. No other names should be specified here.sample
(
character
)
names of all parameters from which you would like to save the MCMC samples.
Note
The datamodel
must obey the convention that the data input is
called exactly in the same way as in the corresponding data class.
All prior distributions for parameters should be contained in the
model function priormodel
. The background is that this can
be used to simulate from the prior distribution, before obtaining any data.
Typically, end users will not use the .DefaultGeneralModel()
function.