Learn R Programming

jagshelper (version 0.4.0)

nbyname: Number of parameter nodes by parameter name

Description

Returns a list of the numbers of parameter nodes saved in jagsUI output, by parameter name. As a default, what is returned for each list element is a vector of the array dimensions within the JAGS model (that is, excluding the dimension associated with the number of MCMC samples for each parameter node), or alternately, just the total number of parameter nodes.

Usage

nbyname(x, justtotal = FALSE)

Value

A list with an element associated with each parameter. Each element can be interpreted as the vector length or array dimension associated with the given parameter.

Arguments

x

Output object from jagsUI::jags()

justtotal

Whether to just report the total number of parameters, as opposed to dimensions.

Author

Matt Tyers

See Also

nparam

Examples

Run this code
head(jags_df(asdf_jags_out))

nbyname(asdf_jags_out)

nparam(SS_out)
nbyname(SS_out)

Run the code above in your browser using DataLab