Description Usage Arguments Details Author(s) Examples
Builds modelValues object from a model values specification object, which can include a NIMBLE model
1 | modelValues(spec, m = 1)
|
spec |
An object which includes information for
building modelValues. Can either be a NIMBLE model (see
|
m |
The number of rows to create in the modelValues
object. Can later be changed with |
See the User Manual or help(modelValuesBaseClass)
for information about manipulating NIMBLE modelValues
object returned by this function
NIMBLE development team
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #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:
mvSpec <- modelValuesSpec(vars = c('x', 'y'), types = c('double', 'int'), sizes = list(x = 3, y = c(2,2)))
custom_mv <- modelValues(mvSpec, m = 2)
custom_mv['y',]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.