Description Usage Arguments Value Note See Also Examples
A function to convert a CPP posterior sample into an MCMC object, so that package 'coda' can be used for output diagnostics.
1 | CPPpost2mcmc(sampost)
|
sampost |
posterior sample of CPP hazard rates (as generated by |
An MCMC object, complete with burn-in and thinning information.
If package 'coda' is not available, a matrix with meaningful column names is returned.
1 2 3 4 5 6 7 8 9 10 11 12 | # set RNG seed (for example reproducibility only)
set.seed(1234)
# select a CPP prior distribution
hypars<-CPPpriorElicit(r0 = 0.1, H = 1, T00 = 50, M00 = 2)
# load a data set
data(earthquakes)
# generate a posterior sample
post<-CPPpostSample(hypars, times = earthquakes$ti, obs = earthquakes$ob)
# convert the posterior sample into an MCMC object
MCMCpost<-CPPpost2mcmc(post)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.