getSamples {bayesGAM} | R Documentation |
Extract the MCMC samples from an object of type bayesGAMfit
Description
Returns an array of the posterior simulation from Stan
. Optionally, may return a subsample from the full MCMC simulation.
Usage
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 |
... |
Additional parameters passed to |
nsamp |
Optional number of samples to return |
seednum |
Optional integer for seed number when selecting a random sample |
results |
Matrix of HMC posterior samples |
Value
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)
[Package bayesGAM version 0.0.2 Index]