Extract the MCMC samples from an object of type bayesGAMfit
bayesGAMfit
Returns an array of the posterior simulation from Stan
. Optionally, may return a subsample from the full MCMC simulation.
getSamples(object, ...) ## S4 method for signature 'bayesGAMfit' getSamples(object, nsamp = NULL, seednum = NULL, ...) ## S4 method for signature 'stanfit' getSamples(object, nsamp = 1000, seednum = NULL, results = NULL, ...) ## S4 method for signature 'glmModel' getSamples(object, nsamp = NULL, seednum = NULL, results = NULL, ...)
object
: model object of class bayesGAMfit
...
: Additional parameters passed to corrplot.mixed
nsamp
: Optional number of samples to returnseednum
: Optional integer for seed number when selecting a random sampleresults
: Matrix of HMC posterior samplesarray of the posterior simulation, or subsample of the array
NA
require(stats); require(graphics) f <- bayesGAM(weight ~ np(height), data = women, family = gaussian, iter = 500, chains = 1) allres <- getSamples(f)
Useful links