Learn R Programming

bayesTFR (version 4.0-3)

get.cov.gammas: Covariance Matrices of Gamma Parameters

Description

From a given MCMC, obtain a covariance matrix of the $\gamma_{ci}$ ($i=1,2,3$) parameters for each country $c$.

Usage

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

Arguments

Value

A list with components:valuesAn array of size nr_countries $\times$ 3 $\times$ 3 containing values of the covariance matrix of $\gamma_{ci}$ ($i=1,2,3$) for each country $c$.country_codesA vector of size nr_countries. A covariance matrix values[i,,] corresponds to a country with the code country_codes[i].

Rdversion

1.1

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.

See Also

run.tfr.mcmc

Examples

Run this code
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)

Run the code above in your browser using DataLab