# MCMC, Particle Filtering, and Programmable Hierarchical Modeling

## Documentation for package ‘nimble’ version 0.11.0

- DESCRIPTION file.
- Package NEWS.

## Help Pages

A B C D E F G H I L M N O P Q R S T V W misc

nimble-package | nimble

## -- A --

addMonitors | Class 'MCMCconf'
addMonitors2 | Class 'MCMCconf'
addSampler | Class 'MCMCconf'
ADNimbleList | EXPERIMENTAL Data type for the return value of 'nimDerivs'
AF_slice | MCMC Sampling Algorithms
all | NIMBLE language functions for R-like vector construction
any | NIMBLE language functions for R-like vector construction
any_na | Determine if any values in a vector are NA or NaN
any_nan | Determine if any values in a vector are NA or NaN
array | Creates matrix or array objects for use in nimbleFunctions
as.carAdjacency | Convert CAR structural parameters to adjacency, weights, num format
as.carCM | Convert weights vector to parameters of 'dcar_proper' distributio
asCol | Turn a numeric vector into a single-row or single-column matrix
asRow | Turn a numeric vector into a single-row or single-column matrix
autoBlock | Automated parameter blocking procedure for efficient MCMC sampling

## -- B --

besselK | Mathematical functions for BUGS and nimbleFunction programming
BUGSdeclClass | BUGSdeclClass contains the information extracted from one BUGS declaration
BUGSdeclClass-class | BUGSdeclClass contains the information extracted from one BUGS declaration
buildAuxiliaryFilter | Placeholder for buildAuxiliaryFilter
buildBootstrapFilter | Placeholder for buildBootstrapFilter
buildEnsembleKF | Placeholder for buildEnsembleKF
buildIteratedFilter2 | Placeholder for buildIteratedFilter2
buildLiuWestFilter | Placeholder for buildLiuWestFilter
buildMCEM | Builds an MCEM algorithm from a given NIMBLE model
buildMCMC | Create an MCMC function from a NIMBLE model, or an MCMC configuration object

## -- C --

c | NIMBLE language functions for R-like vector construction
calcAdaptationFactor | Functions and Classes Internal to NIMBLE
calcNodes | Basic nimbleFunctions for calculate, simulate, and getLogProb with a set of nodes
calcNodesMV | Basic nimbleFunctions for using a NIMBLE model with sets of stored values
calculate | calculate, calculateDiff, simulate, or get the current log probabilities (densities) a set of nodes in a NIMBLE model
calculateDiff | calculate, calculateDiff, simulate, or get the current log probabilities (densities) a set of nodes in a NIMBLE model
calc_dcatConjugacyContributions | Functions and Classes Internal to NIMBLE
calc_dmnormAltParams | Functions and Classes Internal to NIMBLE
calc_dmnormConjugacyContributions | Functions and Classes Internal to NIMBLE
calc_dwishAltParams | Functions and Classes Internal to NIMBLE
CAR-Normal | The CAR-Normal Distribution
CAR-Proper | The CAR-Proper Distribution
carBounds | Calculate bounds for the autocorrelation parameter of the 'dcar_proper' distribution
carMaxBound | Calculate the upper bound for the autocorrelation parameter of the 'dcar_proper' distribution
carMinBound | Calculate the lower bound for the autocorrelation parameter of the 'dcar_proper' distribution
CAR_calcC | Functions and Classes Internal to NIMBLE
CAR_calcCmatrix | Functions and Classes Internal to NIMBLE
CAR_calcEVs2 | Functions and Classes Internal to NIMBLE
CAR_calcEVs3 | Functions and Classes Internal to NIMBLE
CAR_calcM | Functions and Classes Internal to NIMBLE
CAR_calcNumIslands | Calculate number of islands based on a CAR adjacency matrix.
cat | cat function for use in nimbleFunctions
Categorical | The Categorical Distribution
cc_getNodesInExpr | Functions and Classes Internal to NIMBLE
checkConjugacy | Class 'modelBaseClass'
checkInterrupt | Check for interrupt (e.g. Ctrl-C) during nimbleFunction execution. Part of the NIMBLE language.
ChineseRestaurantProcess | The Chinese Restaurant Process Distribution
cloglog | Mathematical functions for BUGS and nimbleFunction programming
CmodelBaseClass | Class 'CmodelBaseClass'
CmodelBaseClass-class | Class 'CmodelBaseClass'
CnimbleFunctionBase | Class 'CnimbleFunctionBase'
CnimbleFunctionBase-class | Class 'CnimbleFunctionBase'
codeBlockClass | Class 'codeBlockClass'
codeBlockClass-class | Class 'codeBlockClass'
compareMCMCs | Placeholder for compareMCMCs
compileNimble | compile NIMBLE models and nimbleFunctions
configureMCMC | Build the MCMCconf object for construction of an MCMC object
configureRJ | Configure Reversible Jump for Variable Selection
Constraint | Constraint calculations in NIMBLE
copy | Copying function for NIMBLE
crossLevel | MCMC Sampling Algorithms
CRP | MCMC Sampling Algorithms
CRP_concentration | MCMC Sampling Algorithms
cube | Mathematical functions for BUGS and nimbleFunction programming

## -- D --

dcar_normal | The CAR-Normal Distribution
dcar_proper | The CAR-Proper Distribution
dcat | The Categorical Distribution
dconstraint | Constraint calculations in NIMBLE
dCRP | The Chinese Restaurant Process Distribution
ddexp | The Double Exponential (Laplace) Distribution
ddirch | The Dirichlet Distribution
decide | Makes the Metropolis-Hastings acceptance decision, based upon the input (log) Metropolis-Hastings ratio
decideAndJump | Creates a nimbleFunction for executing the Metropolis-Hastings jumping decision, and updating values in the model, or in a carbon copy modelValues object, accordingly.
declare | Explicitly declare a variable in run-time code of a nimbleFunction
deregisterDistributions | Remove user-supplied distributions from use in NIMBLE BUGS models
dexp_nimble | The Exponential Distribution
dflat | The Improper Uniform Distribution
dhalfflat | The Improper Uniform Distribution
diag | NIMBLE language functions for R-like vector construction
dim | return sizes of an object whether it is a vector, matrix or array
dinterval | Interval calculations
dinvgamma | The Inverse Gamma Distribution
dinvwish_chol | The Inverse Wishart Distribution
Dirichlet | The Dirichlet Distribution
dirichlet | The Dirichlet Distribution
distributionInfo | Get information about a distribution
dmnorm_chol | The Multivariate Normal Distribution
dmulti | The Multinomial Distribution
dmvt_chol | The Multivariate t Distribution
Double-Exponential | The Double Exponential (Laplace) Distribution
DPmeasure | MCMC Sampling Algorithms
dsqrtinvgamma | Functions and Classes Internal to NIMBLE
dt_nonstandard | The t Distribution
dwish_chol | The Wishart Distribution

## -- E --

eigen | Spectral Decomposition of a Matrix
eigenNimbleList | eigenNimbleList definition
expandNodeNames | Class 'modelBaseClass'
expit | Mathematical functions for BUGS and nimbleFunction programming
Exponential | The Exponential Distribution
extractControlElement | Extract named elements from MCMC sampler control list

## -- F --

flat | The Improper Uniform Distribution

## -- G --

getBound | Get value of bound of a stochastic node in a model
getBUGSexampleDir | Get the directory path to one of the classic BUGS examples installed with NIMBLE package
getCode | Class 'modelBaseClass'
getConditionallyIndependentSets | Get a list of conditionally independent sets of nodes in a nimble model
getDefinition | Get nimbleFunction definition
getDependencies | Class 'modelBaseClass'
getDependenciesList | Class 'modelBaseClass'
getDimension | Class 'modelBaseClass'
getDistribution | Class 'modelBaseClass'
getDistributionInfo | Get information about a distribution
getDownstream | Class 'modelBaseClass'
getLogProb | calculate, calculateDiff, simulate, or get the current log probabilities (densities) a set of nodes in a NIMBLE model
getLogProbNodes | Basic nimbleFunctions for calculate, simulate, and getLogProb with a set of nodes
getLogProbNodesMV | Basic nimbleFunctions for using a NIMBLE model with sets of stored values
getMonitors | Class 'MCMCconf'
getMonitors2 | Class 'MCMCconf'
getNimbleOption | Get NIMBLE Option
getNimbleProject | Functions and Classes Internal to NIMBLE
getNodeFunctionIndexedInfo | Functions and Classes Internal to NIMBLE
getNodeNames | Class 'modelBaseClass'
getParam | Get value of a parameter of a stochastic node in a model
getParamNames | Get information about a distribution
getSamplerExecutionOrder | Class 'MCMCconf'
getSamplers | Class 'MCMCconf'
getSamplesDPmeasure | Get posterior samples for a Dirichlet process measure
getsize | Returns number of rows of modelValues
getType | Get information about a distribution
getVarNames | Class 'modelBaseClass'

## -- H --

halfflat | The Improper Uniform Distribution

## -- I --

icloglog | Mathematical functions for BUGS and nimbleFunction programming
identityMatrix | Create an Identity matrix (Deprecated)
ilogit | Mathematical functions for BUGS and nimbleFunction programming
initializeInfo | Class 'modelBaseClass'
initializeModel | Performs initialization of nimble model node values and log probabilities
inprod | Mathematical functions for BUGS and nimbleFunction programming
integer | Creates numeric, integer or logical vectors for use in nimbleFunctions
Interval | Interval calculations
inverse | Mathematical functions for BUGS and nimbleFunction programming
Inverse-Gamma | The Inverse Gamma Distribution
Inverse-Wishart | The Inverse Wishart Distribution
inverse-wishart | The Inverse Wishart Distribution
iprobit | Mathematical functions for BUGS and nimbleFunction programming
is.Cmodel | Functions and Classes Internal to NIMBLE
is.Cnf | Functions and Classes Internal to NIMBLE
is.model | Functions and Classes Internal to NIMBLE
is.na | NIMBLE language functions for R-like vector construction
is.nan | NIMBLE language functions for R-like vector construction
is.nf | check if a nimbleFunction
is.nfGenerator | Functions and Classes Internal to NIMBLE
is.nl | check if a nimbleList
is.Rmodel | Functions and Classes Internal to NIMBLE
isBinary | Class 'modelBaseClass'
isData | Class 'modelBaseClass'
isDeterm | Class 'modelBaseClass'
isDiscrete | Class 'modelBaseClass'
isEndNode | Class 'modelBaseClass'
isMultivariate | Class 'modelBaseClass'
isStoch | Class 'modelBaseClass'
isTruncated | Class 'modelBaseClass'
isUnivariate | Class 'modelBaseClass'
isUserDefined | Get information about a distribution

## -- L --

length | NIMBLE language functions for R-like vector construction
logdet | Mathematical functions for BUGS and nimbleFunction programming
logfact | Mathematical functions for BUGS and nimbleFunction programming
loggam | Mathematical functions for BUGS and nimbleFunction programming
logical | Creates numeric, integer or logical vectors for use in nimbleFunctions
logit | Mathematical functions for BUGS and nimbleFunction programming

## -- M --

makeBoundInfo | Make an object of information about a model-bound pairing for getBound. Used internally
makeParamInfo | Make an object of information about a model-parameter pairing for getParam. Used internally
matrix | Creates matrix or array objects for use in nimbleFunctions
MCMCconf | Class 'MCMCconf'
MCMCconf-class | Class 'MCMCconf'
MCMCsuite | Placeholder for MCMCsuite
modelBaseClass | Class 'modelBaseClass'
modelBaseClass-class | Class 'modelBaseClass'
modelDefClass | Class for NIMBLE model definition
modelDefClass-class | Class for NIMBLE model definition
modelInitialization | Information on initial values in a NIMBLE model
modelValues | Create a NIMBLE modelValues Object
modelValuesBaseClass | Class 'modelValuesBaseClass'
modelValuesBaseClass-class | Class 'modelValuesBaseClass'
modelValuesConf | Create the confs for a custom NIMBLE modelValues object
model_macro_builder | EXPERIMENTAL: Turn a function into a model macro builder A model macro expands one line of code in a nimbleModel into one or more new lines. This supports compact programming by defining re-usable modules. 'model_macro_builder' takes as input a function that constructs new lines of model code from the original line of code. It returns a function suitable for internal use by 'nimbleModel' that arranges arguments for input function. Macros are an experimental feature and are available only after setting 'nimbleOptions(enableModelMacros = TRUE)'.
Multinomial | The Multinomial Distribution
multinomial | The Multinomial Distribution
Multivariate-t | The Multivariate t Distribution
multivariate-t | The Multivariate t Distribution
MultivariateNormal | The Multivariate Normal Distribution
mvt | The Multivariate t Distribution

## -- N --

newModel | Class 'modelBaseClass'
nfMethod | access (call) a member function of a nimbleFunction
nfVar | Access or set a member variable of a nimbleFunction
nfVar<- | Access or set a member variable of a nimbleFunction
nf_preProcessMemberDataObject | Functions and Classes Internal to NIMBLE
nimArray | Creates matrix or array objects for use in nimbleFunctions
nimble | nimble
nimble-R-functions | NIMBLE language functions for R-like vector construction
nimbleCode | Turn BUGS model code into an object for use in 'nimbleModel' or 'readBUGSmodel'
nimbleExternalCall | Create a nimbleFunction that wraps a call to external compiled code
nimbleFunction | create a nimbleFunction
nimbleFunctionBase | Class 'nimbleFunctionBase'
nimbleFunctionBase-class | Class 'nimbleFunctionBase'
nimbleFunctionList | Create a list of nimbleFunctions
nimbleFunctionList-class | Create a list of nimbleFunctions
nimbleFunctionVirtual | create a virtual nimbleFunction, a base class for other nimbleFunctions
nimbleInternalFunctions | Functions and Classes Internal to NIMBLE
nimbleList | create a nimbleList
nimbleMCMC | Executes one or more chains of NIMBLE's default MCMC algorithm, for a model specified using BUGS code
nimbleModel | Create a NIMBLE model from BUGS code
nimbleOptions | NIMBLE Options Settings
nimbleRcall | Make an R function callable from compiled nimbleFunctions (including nimbleModels).
nimbleType | create a nimbleType object
nimbleType-class | create a nimbleType object
nimbleUserNamespace | Functions and Classes Internal to NIMBLE
nimC | NIMBLE language functions for R-like vector construction
nimCat | cat function for use in nimbleFunctions
nimCopy | Copying function for NIMBLE
nimDerivs | Nimble Derivatives
nimDim | return sizes of an object whether it is a vector, matrix or array
nimEigen | Spectral Decomposition of a Matrix
nimEquals | Mathematical functions for BUGS and nimbleFunction programming
nimInteger | Creates numeric, integer or logical vectors for use in nimbleFunctions
nimLogical | Creates numeric, integer or logical vectors for use in nimbleFunctions
nimMatrix | Creates matrix or array objects for use in nimbleFunctions
nimNumeric | Creates numeric, integer or logical vectors for use in nimbleFunctions
nimOptim | Nimble wrapper around R's builtin 'optim'.
nimOptimDefaultControl | Creates a deafult 'control' argument for 'nimOptim'.
nimPrint | print function for use in nimbleFunctions
nimRep | NIMBLE language functions for R-like vector construction
nimRound | Mathematical functions for BUGS and nimbleFunction programming
nimSeq | NIMBLE language functions for R-like vector construction
nimStep | Mathematical functions for BUGS and nimbleFunction programming
nimStop | Halt execution of a nimbleFunction function method. Part of the NIMBLE language
nimSvd | Singular Value Decomposition of a Matrix
nimSwitch | Mathematical functions for BUGS and nimbleFunction programming
nodeFunctions | calculate, calculateDiff, simulate, or get the current log probabilities (densities) a set of nodes in a NIMBLE model
numeric | Creates numeric, integer or logical vectors for use in nimbleFunctions

## -- O --

optimControlNimbleList | EXPERIMENTAL Data type for the 'control' parameter of 'nimOptim'
optimDefaultControl | Creates a deafult 'control' argument for 'optim' (just an empty list).
optimResultNimbleList | EXPERIMENTAL Data type for the return value of 'nimOptim'

## -- P --

pdexp | The Double Exponential (Laplace) Distribution
pexp_nimble | The Exponential Distribution
phi | Mathematical functions for BUGS and nimbleFunction programming
pinvgamma | The Inverse Gamma Distribution
posterior_predictive | MCMC Sampling Algorithms
posterior_predictive_branch | MCMC Sampling Algorithms
pow | Mathematical functions for BUGS and nimbleFunction programming
pqDefined | Get information about a distribution
print | print function for use in nimbleFunctions
printErrors | Print error messages after failed compilation
printMonitors | Class 'MCMCconf'
printSamplers | Class 'MCMCconf'
probit | Mathematical functions for BUGS and nimbleFunction programming
pt_nonstandard | The t Distribution

## -- Q --

qdexp | The Double Exponential (Laplace) Distribution
qexp_nimble | The Exponential Distribution
qinvgamma | The Inverse Gamma Distribution
qt_nonstandard | The t Distribution

## -- R --

rankSample | Generates a weighted sample (with replacement) of ranks
rcar_normal | The CAR-Normal Distribution
rcar_proper | The CAR-Proper Distribution
rcat | The Categorical Distribution
rconstraint | Constraint calculations in NIMBLE
rCRP | The Chinese Restaurant Process Distribution
rdexp | The Double Exponential (Laplace) Distribution
rdirch | The Dirichlet Distribution
readBUGSmodel | Create a NIMBLE BUGS model from a variety of input formats, including BUGS model files
registerDistributions | Add user-supplied distributions for use in NIMBLE BUGS models
removeSamplers | Class 'MCMCconf'
rep | NIMBLE language functions for R-like vector construction
resetData | Class 'modelBaseClass'
resetMonitors | Class 'MCMCconf'
resize | Resizes a modelValues object
rexp_nimble | The Exponential Distribution
rflat | The Improper Uniform Distribution
rhalfflat | The Improper Uniform Distribution
rinterval | Interval calculations
rinvgamma | The Inverse Gamma Distribution
rinvwish_chol | The Inverse Wishart Distribution
RJ_fixed_prior | MCMC Sampling Algorithms
RJ_indicator | MCMC Sampling Algorithms
RJ_toggled | MCMC Sampling Algorithms
Rmatrix2mvOneVar | Set values of one variable of a modelValues object from an R matrix
rmnorm_chol | The Multivariate Normal Distribution
RmodelBaseClass | Class 'RmodelBaseClass'
RmodelBaseClass-class | Class 'RmodelBaseClass'
rmulti | The Multinomial Distribution
rmvt_chol | The Multivariate t Distribution
rsqrtinvgamma | Functions and Classes Internal to NIMBLE
rt_nonstandard | The t Distribution
run.time | Time execution of NIMBLE code
runCrossValidate | Perform k-fold cross-validation on a NIMBLE model fit by MCMC
runMCMC | Run one or more chains of an MCMC algorithm and return samples, summary and/or WAIC
RW | MCMC Sampling Algorithms
rwish_chol | The Wishart Distribution
RW_block | MCMC Sampling Algorithms
RW_dirichlet | MCMC Sampling Algorithms
RW_llFunction | MCMC Sampling Algorithms
RW_llFunction_block | MCMC Sampling Algorithms
RW_multinomial | MCMC Sampling Algorithms
RW_PF | MCMC Sampling Algorithms
RW_PF_block | MCMC Sampling Algorithms
RW_wishart | MCMC Sampling Algorithms

## -- S --

sampler | MCMC Sampling Algorithms
samplers | MCMC Sampling Algorithms
sampler_AF_slice | MCMC Sampling Algorithms
sampler_BASE | MCMC Sampling Algorithms
sampler_binary | MCMC Sampling Algorithms
sampler_CAR_normal | MCMC Sampling Algorithms
sampler_CAR_proper | MCMC Sampling Algorithms
sampler_categorical | MCMC Sampling Algorithms
sampler_crossLevel | MCMC Sampling Algorithms
sampler_CRP | MCMC Sampling Algorithms
sampler_CRP_concentration | MCMC Sampling Algorithms
sampler_ess | MCMC Sampling Algorithms
sampler_posterior_predictive | MCMC Sampling Algorithms
sampler_posterior_predictive_branch | MCMC Sampling Algorithms
sampler_RJ_fixed_prior | MCMC Sampling Algorithms
sampler_RJ_indicator | MCMC Sampling Algorithms
sampler_RJ_toggled | MCMC Sampling Algorithms
sampler_RW | MCMC Sampling Algorithms
sampler_RW_block | MCMC Sampling Algorithms
sampler_RW_dirichlet | MCMC Sampling Algorithms
sampler_RW_llFunction | MCMC Sampling Algorithms
sampler_RW_llFunction_block | MCMC Sampling Algorithms
sampler_RW_multinomial | MCMC Sampling Algorithms
sampler_RW_wishart | MCMC Sampling Algorithms
sampler_slice | MCMC Sampling Algorithms
samplesSummary | Functions and Classes Internal to NIMBLE
seq | NIMBLE language functions for R-like vector construction
seq_along | NIMBLE language functions for R-like vector construction
setAndCalculate | Creates a nimbleFunction for setting the values of one or more model nodes, calculating the associated deterministic dependents and logProb values, and returning the total sum log-probability.
setAndCalculateDiff | Creates a nimbleFunction for setting the values of one or more model nodes, calculating the associated deterministic dependents and logProb values, and returning the total sum log-probability.
setAndCalculateOne | Creates a nimbleFunction for setting the value of a scalar model node, calculating the associated deterministic dependents and logProb values, and returning the total sum log-probability.
setData | Class 'modelBaseClass'
setInits | Class 'modelBaseClass'
setMonitors | Class 'MCMCconf'
setMonitors2 | Class 'MCMCconf'
setSamplerExecutionOrder | Class 'MCMCconf'
setSamplers | Class 'MCMCconf'
setSize | set the size of a numeric variable in NIMBLE
setThin | Class 'MCMCconf'
setThin2 | Class 'MCMCconf'
setupOutputs | Explicitly declare objects created in setup code to be preserved and compiled as member data
simNodes | Basic nimbleFunctions for calculate, simulate, and getLogProb with a set of nodes
simNodesMV | Basic nimbleFunctions for using a NIMBLE model with sets of stored values
simulate | calculate, calculateDiff, simulate, or get the current log probabilities (densities) a set of nodes in a NIMBLE model
singleModelValuesAccess | Functions and Classes Internal to NIMBLE
singleVarAccessClass | Class 'singleVarAccessClass'
singleVarAccessClass-class | Class 'singleVarAccessClass'
slice | MCMC Sampling Algorithms
stickbreaking | The Stick Breaking Function
StickBreakingFunction | The Stick Breaking Function
stick_breaking | The Stick Breaking Function
stop | Halt execution of a nimbleFunction function method. Part of the NIMBLE language
svd | Singular Value Decomposition of a Matrix
svdNimbleList | svdNimbleList definition

## -- T --

t | The t Distribution
testBUGSmodel | Tests BUGS examples in the NIMBLE system
topologicallySortNodes | Class 'modelBaseClass'

## -- V --

valueInCompiledNimbleFunction | get or set value of member data from a compiled nimbleFunction using a multi-interface
values | Access or set values for a set of nodes in a model
values<- | Access or set values for a set of nodes in a model

## -- W --

which | NIMBLE language functions for R-like vector construction
Wishart | The Wishart Distribution
wishart | The Wishart Distribution
withNimbleOptions | Temporarily set some NIMBLE options.

## -- misc --

-Class | Functions and Classes Internal to NIMBLE
[,CmodelValues-method,ANY,ANY | Class 'modelValuesBaseClass'
[,CmodelValues-method,character,missing | Class 'modelValuesBaseClass'
[-method | Class 'modelValuesBaseClass'
[-method | Functions and Classes Internal to NIMBLE
[<--method | Class 'modelValuesBaseClass'
[<--method | Functions and Classes Internal to NIMBLE
[[-method | Class 'modelBaseClass'
[[-method | Class 'modelValuesBaseClass'
[[-method | Functions and Classes Internal to NIMBLE
[[<--method | Class 'modelBaseClass'
[[<--method | Class 'modelValuesBaseClass'
[[<--method | Functions and Classes Internal to NIMBLE