bd_extract_param: Extract the Bayesian samples for a Gaussian mixture model...

Description Usage Arguments Value

View source: R/bd_extract_param.R

Description

The input fit is the result of a call to stan by bd_do_inference, of class stanfit. Return a matrix TH with dimensions S x (3*K), where S is the number of samples (across all chains, and excluding warmup), and K is the number of mixtures. Optionally, a list of samples is returned by calling bd_convert_gauss_mix_param_vect_to_list repeatedly for each sample. The final column of as.matrix for class stanfit is the log-posterior, which must be removed.

Usage

1
bd_extract_param(fit, asList = F)

Arguments

fit

The fit from stan, of class stanfit

asList

(Default False) Whether to return the samples as a matrix or a list

Value

A matrix or list of samples


MichaelHoltonPrice/BayDem documentation built on Sept. 12, 2019, 9:26 p.m.