getSamples | R Documentation |
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 |
... |
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 |
array 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.