tfr.raftery.diag | R Documentation |
The functions compute the Raftery diagnostics for each parameter of MCMCs of phase II (tfr.raftery.diag
) and phase III (tfr3.raftery.diag
), taking median over all chains.
tfr.raftery.diag(mcmc = NULL,
sim.dir = file.path(getwd(), "bayesTFR.output"),
burnin = 0, country = NULL,
par.names = NA, par.names.cs = NA,
country.sampling.prop = 1, verbose=TRUE, ...)
tfr3.raftery.diag(mcmc = NULL,
sim.dir = file.path(getwd(), "bayesTFR.output"),
burnin = 0, country = NULL,
par.names = NA, par.names.cs = NA,
country.sampling.prop = 1, verbose=TRUE, ...)
mcmc |
A |
sim.dir |
Directory with the MCMC simulation results. Only used if |
burnin |
Burnin. |
country |
Name or code of a country. If it is given, country-specific parameters are reduced to parameters of that country. |
par.names |
Names of country-independent parameters for which the Raftery diagnostics should be computed. By default all parameters are used.
If it is |
par.names.cs |
Names of country-specific parameters for which the Raftery diagnostics should be computed. By default all parameters are used.
If it is |
country.sampling.prop |
Proportion of countries that are included in the diagnostics. It should be between 0 and 1. If it is smaller than 1, the countries are randomly sampled. It is only relevant if |
verbose |
Logical switching log messages on and off. |
... |
Additional arguments passed to the |
The Raftery diagnostics is computed for each parameter, using coda's raftery.diag
with r=0.0125, q=0.025 and q=0.975. Values of N
and burnin are taken as the median over chains. For each country-specific parameter, the maximum over all included countries of such medians is taken.
List with the components:
Nmedian |
2-d array of |
burnin |
2-d array of the same structure as |
not.converged.parameters |
List with two elements, each of which is a data frame containing columns “parameter.name”, “chain.id”, and “N”. These are parameters for which the computed value of Raftery diagnostics |
not.converged.inchain.parameters |
List of the same structure as |
N.country.indep |
Data frame containing columns “parameter.name”, “chain.id”, “N0.025”, and “N0.975”. Each row gives |
N.country.spec |
The same as |
Nmedian.country.spec |
2-d array of |
thin.ind |
List with elements '0.025', '0.975' and |
nr.countries |
Vector with elements |
Hana Sevcikova, Adrian Raftery
raftery.diag
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.