Learn R Programming

⚠️There's a newer version (1.3.0) of this package.Take me there.

UNIX

One can specify the path to where the Eigen header files are located and also whether to link common C++ files into every DSO/DLL we create or whether to treat the files as an extra library with:

R CMD INSTALL --configure-args='--with-eigen=/home/duncan/local --enable-lib' nimble

or, within R

install.packages("nimble", configure.args = c("--with-eigen=/home/duncan/local", "--enable-lib=true"), repos = NULL)

Windows

Typically, you need the R developer tools (i.e., compiler, make, etc.) to use nimble. Accordingly, it is quite straightforward to install the package from source as you will have the necessary tools already installed. These are available from the Rtools page on CRAN.

To install the package from source, from within R,

install.packages("nimble", type = "source", INSTALL_opts = "--merge-multiarch")

or from a local copy of the source package,

install.packages("nimble_0.6-2.tar.gz", repos = NULL, INSTALL_opts = "--merge-multiarch")

Alternatively, use the shell command (in the DOS Command prompt)

R CMD INSTALL --merge-multiarch nimble_0.6-9.tar.gz

Of course, you can also compile directly from a clone of the git repository:

R CMD INSTALL --merge-multiarch nimble

The --merge-multiarch is necessary when using a version of R that supports both 32 and 64 bit. This option to installation will ensure that create both 32 and 64 bit installations.

Creating a Windows Binary

R CMD build nimble
R CMD INSTALL --build --merge-multiarch nimble_0.6-9.tar.gz

We need to create the .tar.gz file first, hence the first command.

Copy Link

Version

Install

install.packages('nimble')

Monthly Downloads

3,227

Version

0.9.1

License

BSD_3_clause + file LICENSE | GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Christopher Paciorek

Last Published

May 22nd, 2020

Functions in nimble (0.9.1)

CAR_calcNumIslands

Calculate number of islands based on a CAR adjacency matrix.
CmodelBaseClass-class

Class CmodelBaseClass
CnimbleFunctionBase-class

Class CnimbleFunctionBase
CAR-Normal

The CAR-Normal Distribution
ChineseRestaurantProcess

The Chinese Restaurant Process Distribution
Categorical

The Categorical Distribution
ADNimbleList

CAR-Proper

The CAR-Proper Distribution
Constraint

Constraint calculations in NIMBLE
BUGSdeclClass-class

BUGSdeclClass contains the information extracted from one BUGS declaration
MCMCconf-class

Class MCMCconf
Multinomial

The Multinomial Distribution
ModifiedRmmParseKeywords2

[[' = 'outputCppArrayIndex2',
StickBreakingFunction

The Stick Breaking Function
Dirichlet

The Dirichlet Distribution
Inverse-Wishart

The Inverse Wishart Distribution
as.carAdjacency

Convert CAR structural parameters to adjacency, weights, num format
any_na

Determine if any values in a vector are NA or NaN
Inverse-Gamma

The Inverse Gamma Distribution
as.carCM

Convert weights vector to parameters of dcar_proper distributio
asRow

Turn a numeric vector into a single-row or single-column matrix
Wishart

The Wishart Distribution
Rmatrix2mvOneVar

Set values of one variable of a modelValues object from an R matrix
MCMCsuite

Placeholder for MCMCsuite
Exponential

The Exponential Distribution
RmodelBaseClass-class

Class RmodelBaseClass
autoBlock

Automated parameter blocking procedure for efficient MCMC sampling
buildBootstrapFilter

Create a bootstrap particle filter algorithm to estimate log-likelihood.
buildEnsembleKF

Create an Ensemble Kalman filter algorithm to sample from latent states.
Interval

Interval calculations
configureRJ

Configure Reversible Jump for Variable Selection
buildMCMC

Create an MCMC function from a NIMBLE model, or an MCMC configuration object
buildMCEM

Builds an MCEM algorithm from a given NIMBLE model
compileNimble

compile NIMBLE models and nimbleFunctions
Double-Exponential

The Double Exponential (Laplace) Distribution
carMinBound

Calculate the lower bound for the autocorrelation parameter of the dcar_proper distribution
buildIteratedFilter2

Create an IF2 algorithm.
checkInterrupt

Check for interrupt (e.g. Ctrl-C) during nimbleFunction execution. Part of the NIMBLE language.
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.
buildAuxiliaryFilter

Create an auxiliary particle filter algorithm to estimate log-likelihood.
Multivariate-t

The Multivariate t Distribution
MultivariateNormal

The Multivariate Normal Distribution
decide

Makes the Metropolis-Hastings acceptance decision, based upon the input (log) Metropolis-Hastings ratio
declare

Explicitly declare a variable in run-time code of a nimbleFunction
getDefinition

Get nimbleFunction definition
identityMatrix

Create an Identity matrix (Deprecated)
configureMCMC

Build the MCMCconf object for construction of an MCMC object
carBounds

Calculate bounds for the autocorrelation parameter of the dcar_proper distribution
buildLiuWestFilter

Create a Liu and West particle filter algorithm.
getNimbleOption

Get NIMBLE Option
getParam

Get value of a parameter of a stochastic node in a model
getBUGSexampleDir

Get the directory path to one of the classic BUGS examples installed with NIMBLE package
nimNumeric

Creates numeric, integer or logical vectors for use in nimbleFunctions
nimCopy

Copying function for NIMBLE
nimCat

cat function for use in nimbleFunctions
getBound

Get value of bound of a stochastic node in a model
initializeModel

Performs initialization of nimble model node values and log probabilities
nfMethod

access (call) a member function of a nimbleFunction
nfVar

Access or set a member variable of a nimbleFunction
nimbleFunction

create a nimbleFunction
nimbleFunctionBase-class

Class nimbleFunctionBase
nimOptim

eigenNimbleList

eigenNimbleList definition
getSamplesDPmeasure

Get posterior samples for a Dirichlet process measure
flat

The Improper Uniform Distribution
getLoadingNamespace

return the namespace in which a nimbleFunction is being loaded
codeBlockClass-class

Class codeBlockClass
carMaxBound

Calculate the upper bound for the autocorrelation parameter of the dcar_proper distribution
compareMCMCs

Placeholder for compareMCMCs
distributionInfo

Get information about a distribution
deregisterDistributions

Remove user-supplied distributions from use in NIMBLE BUGS models
nimble

nimble
nimDim

return sizes of an object whether it is a vector, matrix or array
nimble-R-functions

NIMBLE language functions for R-like vector construction
nimble-internal

Functions and Classes Internal to NIMBLE
getsize

Returns number of rows of modelValues
nimDerivs

Nimble Derivatives
nimble-math

Mathematical functions for BUGS and nimbleFunction programming
nimOptimDefaultControl

makeBoundInfo

Make an object of information about a model-bound pairing for getBound. Used internally
modelBaseClass-class

Class modelBaseClass
modelDefClass-class

Class for NIMBLE model definition
optimDefaultControl

registerDistributions

Add user-supplied distributions for use in NIMBLE BUGS models
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
optimResultNimbleList

makeParamInfo

Make an object of information about a model-parameter pairing for getParam. Used internally
readBUGSmodel

Create a NIMBLE BUGS model from a variety of input formats, including BUGS model files
modelValuesConf

Create the confs for a custom NIMBLE modelValues object
printErrors

Print error messages after failed compilation
setSize

set the size of a numeric variable in NIMBLE
setupOutputs

Explicitly declare objects created in setup code to be preserved and compiled as member data
rankSample

Generates a weighted sample (with replacement) of ranks
runMCMC

Run one or more chains of an MCMC algorithm and return samples, summary and/or WAIC
testBUGSmodel

Tests BUGS examples in the NIMBLE system
t

The t Distribution
runCrossValidate

Perform k-fold cross-validation on a NIMBLE model fit by MCMC
is.nl

check if a nimbleList
modelValues

Create a NIMBLE modelValues Object
is.nf

check if a nimbleFunction
resize

Resizes a modelValues object
modelValuesBaseClass-class

Class modelValuesBaseClass
run.time

Time execution of NIMBLE code
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).
nimbleModel

Create a NIMBLE model from BUGS code
nimbleOptions

NIMBLE Options Settings
nimEigen

Spectral Decomposition of a Matrix
nimPrint

print function for use in nimbleFunctions
nimbleList

create a nimbleList
nimSvd

Singular Value Decomposition of a Matrix
nimStop

Halt execution of a nimbleFunction function method. Part of the NIMBLE language
samplerAssignmentRules-class

Class samplerAssignmentRules
simNodes

Basic nimbleFunctions for calculate, simulate, and getLogProb with a set of nodes
nimbleMCMC

Executes one or more chains of NIMBLE's default MCMC algorithm, for a model specified using BUGS code
nimbleRcall

Make an R function callable from compiled nimbleFunctions (including nimbleModels).
nimbleType-class

create a nimbleType object
nimbleFunctionList-class

Create a list of nimbleFunctions
nodeFunctions

calculate, calculateDiff, simulate, or get the current log probabilities (densities) a set of nodes in a NIMBLE model
nimMatrix

Creates matrix or array objects for use in nimbleFunctions
nimbleFunctionVirtual

create a virtual nimbleFunction, a base class for other nimbleFunctions
sampler_BASE

MCMC Sampling Algorithms
optimControlNimbleList

simNodesMV

Basic nimbleFunctions for using a NIMBLE model with sets of stored values
singleVarAccessClass-class

Class singleVarAccessClass
valueInCompiledNimbleFunction

get or set value of member data from a compiled nimbleFunction using a multi-interface
svdNimbleList

svdNimbleList definition
values

Access or set values for a set of nodes in a model
withNimbleOptions

Temporarily set some NIMBLE options.
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.
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.