Skip to contents

Extract draws from a stanfit object and convert them into lists.

The function rstan::extract() returns the draws for a given parameter as an array. This function calls rstan::extract() to extract the draws from a stanfit object and then convert the arrays into lists.

Usage

extract_draws(stan_fit)

Arguments

stan_fit

A stanfit object.

Value

A named list of length 2 containing:

  • beta: a list of length equal to the number of draws containing the draws from the posterior distribution of the regression coefficients.

  • sigma: a list of length equal to the number of draws containing the draws from the posterior distribution of the covariance matrices. Each element of the list is a list with length equal to 1 if same_cov = TRUE or equal to the number of groups if same_cov = FALSE.