Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

modelValues

Create a NIMBLE modelValues Object


Description

Builds modelValues object from a model values configuration object, which can include a NIMBLE model

Usage

modelValues(conf, m = 1)

Arguments

conf

An object which includes information for building modelValues. Can either be a NIMBLE model (see help(modelBaseClass)) or the object returned from modelValuesConf

m

The number of rows to create in the modelValues object. Can later be changed with resize

Details

See the User Manual or help(modelValuesBaseClass) for information about manipulating NIMBLE modelValues object returned by this function

Author(s)

NIMBLE development team

Examples

#From model object:
code <- nimbleCode({
 a ~ dnorm(0,1)
 for(i in 1:3){
	for(j in 1:3)
		b[i,j] ~ dnorm(0,1)
	}
})
Rmodel <- nimbleModel(code)
Rmodel_mv <- modelValues(Rmodel, m = 2)
#Custom modelValues object:
mvConf <- modelValuesConf(vars = c('x', 'y'),
             types = c('double', 'int'),
             sizes = list(x = 3, y = c(2,2)))
custom_mv <- modelValues(mvConf, m = 2)
custom_mv['y',]

nimble

MCMC, Particle Filtering, and Programmable Hierarchical Modeling

v0.11.0
BSD_3_clause + file LICENSE | GPL (>= 2)
Authors
Perry de Valpine [aut], Christopher Paciorek [aut, cre], Daniel Turek [aut], Nick Michaud [aut], Cliff Anderson-Bergman [aut], Fritz Obermeyer [aut], Claudia Wehrhahn Cortes [aut] (Bayesian nonparametrics system), Abel Rodrìguez [aut] (Bayesian nonparametrics system), Duncan Temple Lang [aut] (packaging configuration), Sally Paganin [aut] (reversible jump MCMC), Jagadish Babu [ctb] (code for the compilation system for an early version of NIMBLE), Lauren Ponisio [ctb] (contributions to the cross-validation code), Peter Sujan [ctb] (multivariate t distribution code)
Initial release
2021-04-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.