get_cov_gammas: Covariance Matrices of Gamma Parameters

Description Usage Arguments Details Value Author(s) See Also Examples

Description

From a given MCMC, obtain a covariance matrix of the gamma_ci (i=1,2,3) parameters for each country c.

Usage

1
get.cov.gammas(mcmc.set = NULL, sim.dir = NULL, burnin = 200, chain.id = 1)

Arguments

mcmc.set

Object of class bayesTFR.mcmc.set. If it is NULL, the sim.dir is used to load existing simulation results.

sim.dir

Directory with existing MCMC simulation results. It is only used if mcmc.set is NULL.

burnin

Number of burn-in iterations to be discarded from the begining of the chain.

chain.id

Identifier of the MCMC to be used. By default the first chain is used.

Details

In order to speed-up MCMC convergence, the package contains default values of gamma covariance that were obtained from a previous run (they can be loaded using data(proposal_cov_gammas_cii)). However, this function allows to obtain new values and overwrite the default values by passing the resulting object to the run.tfr.mcmc function as the proposal_cov_gammas argument.

Value

A list with components:

values

An array of size nr_countries x 3 x 3 containing values of the covariance matrix of gamma_ci (i=1,2,3) for each country c.

country_codes

A vector of size nr_countries. A covariance matrix values[i,,] corresponds to a country with the code country_codes[i].

Author(s)

Leontine Alkema, Hana Sevcikova

See Also

run.tfr.mcmc

Examples

1
2
3
4
5
6
## Not run: 
sim.dir <- file.path(find.package("bayesTFR"), "ex-data", "bayesTFR.output")
cov.gammas <- get.cov.gammas(sim.dir=sim.dir, burnin=0)
m <- run.tfr.mcmc(nr.chains=1, iter=10, proposal_cov_gammas=cov.gammas, verbose=TRUE)

## End(Not run)

jasonacollins/bayesTFR1 documentation built on May 23, 2019, 7:34 a.m.