get.e0.parameter.traces | R Documentation |
Functions for accessing traces of the MCMC parameters, either country-independent or country-specific.
get.e0.parameter.traces(mcmc.list, par.names = NULL,
burnin = 0, thinning.index = NULL, thin = NULL)
get.e0.parameter.traces.cs(mcmc.list, country.obj,
par.names = NULL, burnin = 0, thinning.index = NULL, thin = NULL)
mcmc.list |
List of |
country.obj |
Country object list (see |
par.names |
Names of country-independent parameters (in case of |
burnin |
Burn-in indicating how many iterations should be removed from the beginning of each chain. |
thinning.index |
Index of the traces for thinning. If it is |
thin |
Alternative to |
Both functions return a matrix with columns being the parameters and rows being the MCMC values, attached to one another in case of multiple chains. get.e0.parameter.traces
returns country-independent parameters, get.e0.parameter.traces.cs
returns country-specific parameters.
Hana Sevcikova
e0.coda.list.mcmc
for another way of retrieving parameter traces.
sim.dir <- file.path(find.package("bayesLife"), "ex-data", "bayesLife.output")
m <- get.e0.mcmc(sim.dir)
e0.values <- get.e0.parameter.traces(m$mcmc.list, burnin = 10, par.names = "z")
hist(e0.values, main = colnames(e0.values))
e0.values.cs <- get.e0.parameter.traces.cs(m$mcmc.list,
get.country.object("Canada", meta = m$meta),
burnin = 10, par.names = "z.c")
hist(e0.values.cs, main = colnames(e0.values.cs))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.