Skip to contents

Posterior values are extracted from a CmdStanMCMC or sefraModel object using a call to $draws(<pars>, format = "draws_array"). Discrete chains are retained.

Usage

get_traces(object, pars, dims, dimnames, ...)

# S3 method for class 'CmdStanMCMC'
get_traces(object, pars, dims, dimnames, melt = FALSE, ...)

# S3 method for class 'sefraModel'
get_traces(object, pars, dims, dimnames = list(), melt = FALSE, ...)

Arguments

object

CmdStanMCMC or sefraModel object.

pars

character vector of parameters.

dims

integer vector of dimensions (excluding the number of posterior samples)

dimnames

list of dimension names (excluding the number of posterior samples and chains).

...

(not used)

melt

should draws be melted to a data frame (requires dimnames).

Note

All parameters specified in pars must share dims and dimnames.

See also

[get_draws()]