Skip to contents

Post-warmup samples from a salmonIPMfit object are converted into standard formats. These S3 methods are wrappers for as.*.stanfit(object$stanfit); see as.array.stanfit() for details.

Usage

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

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

# S3 method for class 'salmonIPMfit'
as.data.frame(
  x,
  pars = "all",
  include = TRUE,
  row.names = NULL,
  optional = FALSE,
  ...
)

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.

row.names

NULL or a character vector giving the row names for the data frame. Missing values are not allowed.

optional

logical. If TRUE, setting row names and converting column names (to syntactic names: see make.names()) is optional.

Value

A matrix, array or data.frame containing the post-warmup samples of the specified quantities.

See also

salmonIPM(), salmonIPMfit, as.array.stanfit()