Description Usage Arguments Value Author(s) See Also Examples
Functions for accessing traces of the MCMC parameters, either country-independent or country-specific. Functions get.tfr.parameter.traces and get.tfr.parameter.traces.cs access Phase II MCMCs; Functions get.tfr3.parameter.traces and get.tfr3.parameter.traces.cs access Phase III MCMCs.
1 2 3 4 5 6 7 8 9 10 11  | get.tfr.parameter.traces(mcmc.list, par.names = tfr.parameter.names(), 
    burnin = 0, thinning.index = NULL, thin = NULL)
    
get.tfr.parameter.traces.cs(mcmc.list, country.obj, 
    par.names=tfr.parameter.names.cs(), 
    burnin=0, thinning.index=NULL, thin=NULL)
    
get.tfr3.parameter.traces(mcmc.list, par.names = tfr3.parameter.names(), ...)
    
get.tfr3.parameter.traces.cs(mcmc.list, country.obj, 
    par.names=tfr3.parameter.names.cs(), ...)
 | 
mcmc.list | 
 List of   | 
country.obj | 
 Country object list (see   | 
par.names | 
 Names of country-independent parameters (in case of   | 
burnin | 
 Burnin 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   | 
... | 
 Arguments passed to underlying functions (i.e. to   | 
All 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.tfr.parameter.traces and get.tfr3.parameter.traces return country-independent parameters, get.tfr.parameter.traces.cs and get.tfr3.parameter.traces.cs return country-specific parameters.
Hana Sevcikova
coda.list.mcmc for another way of retrieving parameter traces. 
1 2 3 4 5 6 7 8 9 10 11 12 13 14  | sim.dir <- file.path(find.package("bayesTFR"), "ex-data", "bayesTFR.output")
m <- get.tfr.mcmc(sim.dir)
tfr.values <- get.tfr.parameter.traces(m$mcmc.list, burnin=10, par.names="sigma0")
## Not run: 
hist(tfr.values, main=colnames(tfr.values))
## End(Not run)
tfr.values.cs <- get.tfr.parameter.traces.cs(m$mcmc.list, 
                    get.country.object("Canada", meta=m$meta),
                    burnin=10, par.names="Triangle_c4")
## Not run: 
hist(tfr.values.cs, main=colnames(tfr.values.cs))
## End(Not run)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.