Skip to contents

When samples from the posterior distribution are obtained using SparseNUTS, only the model parameters can be accessed directly from the object (i.e., derived quantities such as M_a cannot be accessed directly). Accessing derived quantities must be done using the this function.

Usage

get_posterior(
  object,
  posterior,
  pars = "par_B0",
  iters = 1000,
  option = 2,
  type = "df",
  seed = 42
)

Arguments

object

A list specifying the AD object created using MakeADFun.

posterior

An SparseNUTS objected created using the SparseNUTS function.

pars

The parameter(s) to be extracted.

iters

The total number of iterations to be extracted.

option

The parallel option to use.

type

Return a data.frame, an array, or a list.

seed

The random number seed to use.

Value

A data.frame, an array, or a list