as.data.frame.brmsfit: Extract Posterior Draws

Description Usage Arguments Value See Also

View source: R/posterior.R

Description

Extract posterior draws in conventional formats as data.frames, matrices, or arrays.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## S3 method for class 'brmsfit'
as.data.frame(
  x,
  row.names = NULL,
  optional = TRUE,
  pars = NA,
  variable = NULL,
  draw = NULL,
  subset = NULL,
  ...
)

## S3 method for class 'brmsfit'
as.matrix(x, pars = NA, variable = NULL, draw = NULL, subset = NULL, ...)

## S3 method for class 'brmsfit'
as.array(x, pars = NA, variable = NULL, draw = NULL, subset = NULL, ...)

Arguments

x

A brmsfit object or another R object for which the methods are defined.

row.names, optional

Unused and only added for consistency with the as.data.frame generic.

pars

Deprecated alias of variable. For reasons of backwards compatibility, pars is interpreted as a vector of regular expressions by default unless fixed = TRUE is specified.

variable

A character vector providing the variables to extract. By default, all variables are extracted.

draw

The draw indices to be select. Subsetting draw indices will lead to an automatic merging of chains.

subset

Deprecated alias of draw.

...

Further arguments to be passed to the corresponding as_draws_* methods as well as to subset_draws.

Value

A data.frame, matrix, or array containing the posterior draws.

See Also

as_draws, subset_draws


brms documentation built on Aug. 23, 2021, 5:08 p.m.