getSamples function

Extract the MCMC samples from an object of type bayesGAMfit

Extract the MCMC samples from an object of type 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, ...)

Arguments

  • object: model object of class bayesGAMfit
  • ...: Additional parameters passed to corrplot.mixed
  • nsamp: Optional number of samples to return
  • seednum: Optional integer for seed number when selecting a random sample
  • results: Matrix of HMC posterior samples

Returns

array of the posterior simulation, or subsample of the array

NA

Examples

require(stats); require(graphics) f <- bayesGAM(weight ~ np(height), data = women, family = gaussian, iter = 500, chains = 1) allres <- getSamples(f)
  • Maintainer: Samuel Thomas
  • License: GPL-3
  • Last published: 2022-03-17

Useful links