sample_stanfit: Return a data frame by resampling the posterior from a...

Description Usage Arguments Value References

View source: R/bpc_helpers.R

Description

Return a data frame by resampling the posterior from a stanfit Here we select a parameter, retrieve the all the posterior from the stanfit and then we resample this posterior n times

Usage

1
sample_stanfit(stanfit, par, n = 100)

Arguments

stanfit

stanfit object

par

parameter name

n

number of samples

Value

a dataframe containing the samples of the parameter. Each column is a parameter (in order of the index), each row is a sample

References

Stan Development Team (2020). RStan: the R interface to Stan. R package version 2.21.2. http://mc-stan.org/.


bpcs documentation built on Dec. 15, 2020, 5:23 p.m.