View source: R/mcmcInternals.R
customError | R Documentation |
A function that allows for the definition of user-specified error distributions for use in generalized linear models
customError(
nimbleLikeli,
simulate,
nimblePrior = list(),
nimbleConstants = list(),
link = "identity",
discrete = FALSE,
elementWise = FALSE
)
nimbleLikeli |
A function that returns a string containing the text for a specification of the likelihood in NIMBLE. The function must take three arguments: the first argument is a string that contains the name of the node that contains the expectation of the linear model, the second argument is a string that contains the node containing the data, and the third argument is an optional suffix that can be added to all the names of the nodes in the linear model. |
simulate |
A function that takes the expected value as its first
argument along with named arguments equal to those defined in
|
nimblePrior |
A list with named elements corresponding to each parameter used in the error distribution and with each element being a function that returns a string containing a prior specification for that parameter in NIMBLE code. Each function element takes ones argument: an optional suffix that can be added to all the names of the nodes in the linear model. |
nimbleConstants |
A list with named elements corresponding to each
constant value used in the error distribution and with each element being a
function that returns a numeric vector containing the values for the
constants. Each function is passed the complete set of parameters that are
passed to the |
link |
Either a character vector containing the names of supported
link functions (see |
discrete |
A logical scalar denoting whether the distribution is defined for a discrete variable or not. |
elementWise |
A logical scalar denoting whether the |
A list containing the following named elements:
link
A list of link functions that are valid for this error
distribution. Each element is a list containing the output from a call to
the customLink
function
nimbleLikeli
A version of the nimbleLikeli
function
encapsulated in such a way as to be usable by the package
nimblePrior
A version of the nimblePrior
list with each
element encapsulated in such as a way as to by usable by the package
nimbleConstants
A version of the nimbleConstants
list
with each element encapsulated in such a way as to be usable by the package
elementWise
A copy of the input argument elementWise
discrete
A copy of the input argument discrete
simulate
A version of the simulate
function
encapsulated in such a way as to be usable by the package
Joseph D. Chipperfield, joechip90@googlemail.com
nimbleCode
customLink
errorFamilies
modelDefinitionToNIMBLE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.