Skip to contents

Convert the posterior samples in a salmonIPMfit object to a draws format supported by the posterior-package. These S3 methods are wrappers for as_draws_*(as.array(object)).

Usage

# S3 method for class 'salmonIPMfit'
as_draws(x, pars = "all", include = TRUE, ...)

# S3 method for class 'salmonIPMfit'
as_draws_matrix(x, pars = "all", include = TRUE, ...)

# S3 method for class 'salmonIPMfit'
as_draws_array(x, pars = "all", include = TRUE, ...)

# S3 method for class 'salmonIPMfit'
as_draws_df(x, pars = "all", include = TRUE, ...)

# S3 method for class 'salmonIPMfit'
as_draws_list(x, pars = "all", include = TRUE, ...)

# S3 method for class 'salmonIPMfit'
as_draws_rvars(x, pars = "all", include = TRUE, ...)

Arguments

x

An object of class salmonIPMfit.

pars

A character vector specifying (hyper)parameters, states, and/or quantities of interest ("parameters"). Parameters can be explicitly named or one or more shortcuts can be used to specify hierarchical levels of parameters; see stan_pars() for details. The default is "all" quantities that were monitored.

include

Logical scalar defaulting to TRUE indicating whether to include or exclude the parameters given by pars.

...

Currently ignored.

Value

A draws object from the posterior-package. See package documentation and vignettes for details on working with these objects.

Details

To subset variables, iterations, chains, or draws, use subset_draws() after making the draws object.

See also