sample_stanfit {bpcs}R Documentation

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

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

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/.


[Package bpcs version 1.0.0 Index]