View source: R/mcmcInternals.R
| modelDefinitionToNIMBLE | R Documentation | 
A function to create a full NIMBLE model definition from a
standard model specification with a syntax similar to that used in the
glm model specification
modelDefinitionToNIMBLE(
  formula,
  data,
  family = "gaussian",
  link = "identity",
  centreCovs = TRUE,
  scaleCovs = TRUE,
  suffix = "",
  sharedTermNode = NULL,
  ...
)
formula | 
 A formula that takes a similar form to that used in
  | 
data | 
 A data.frame, list, or inla.data.stack object containing the data to apply the model formula to.  | 
family | 
 The specification of the likelihood family to use. The default
is a Gaussian distribution with identity link. The argument can either be
a string containing the name of the likelihood family (case insensitive) or
a   | 
link | 
 A character scalar giving the name of the link function to be
used with the likelihood family. See   | 
centreCovs | 
 A logical scalar denoting whether the fixed effects in the
model should be centred before the analysis: each covariate element is
subtracted by its mean.   | 
scaleCovs | 
 A logical scalar denoting whether the fixed effects in the
model should be scaled before the analysis: each covariate element is divided
by its standard deviation.   | 
suffix | 
 A character scalar that will be appended to all variables used in the NIMBLE code (including constants and data)  | 
sharedTermNode | 
 A character containing the name of a node containing
the expectation that is shared across different likelihoods. Defaults to
  | 
... | 
 Other parameters that are passed to the error distribution processing functions  | 
A list object containing the following named elements:
responseValuesThe values of the response variable
responseNameThe name of the response variable
hFunctionsCalls to special 'h' functions
fFunctionsCalls to special 'f' functions
sFunctionsCalls to special 's' functions
covNamesThe names of the covariates used in the model specification and equivalent valid names to use in the NIMBLE model
covFrameA data frame of the processed covariates
modelMatrixA model matrix resulted from an expansion of the
covariates performed by model.matrix
offetFrameA data frame of offset terms used in the model
codeNIMBLE model specification code for the model
defined using the input parameters (see nimbleCode)
constantsA list of constants to be passed to NIMBLE (see
nimbleModel)
dataA list of data to be passed to NIMBLE (see
nimbleModel)
initsA list of starting values for model variables to be
passed to NIMBLE (see nimbleModel)
dimensionsNamed list of dimensions for variables to be
passed to NIMBLE (see nimbleModel)
monitorsA character vector of names of variables to record
during MCMC sampling in NIMBLE (see configureMCMC)
monitors2A character vector of names of varaibles to record
during MCMC sampling in NIMBLE with a different thinning interval (see
configureMCMC)
hierAttributesA list containing attributes that are set in each of the hierarchical component models
linkA link list structure (as returned from
customLink) that defines the link function used in the model
familyA error distribution list structure (as returned from
customError) that defines the error distribution used in the
model
Joseph D. Chipperfield, joechip90@googlemail.com
nimbleCode customLink
customError errorFamilies
glm inla.stack.data
model.matrix nimbleModel
configureMCMC
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.