get.tfr.estimation | R Documentation |
Get past TFR estimation, including trajectories and quantiles if required.
get.tfr.estimation(mcmc.list = NULL, country = NULL,
sim.dir = NULL, burnin = 0, thin = 1, probs = NULL, adjust = TRUE,
country.code = deprecated(), ISO.code = deprecated())
mcmc.list |
Object of class |
country |
Name or numerical code of a country. It can also be given as ISO-2 or ISO-3 characters. |
sim.dir |
Directory with the MCMC simulation results. Only used if |
burnin |
Burn-in for getting trajectories and quantiles. A positive burn-in |
thin |
Thin for getting trajectories and quantiles. Thinning level |
probs |
A vector of numbers between |
adjust |
Logical indicating whether the adjusted median and trajectories should be returned. |
country.code , ISO.code |
Deprecated arguments. Use argument |
This function is used to obtain the TFR estimation trajectories as well as corresponding quantiles if the mcmc.list
has been obtained while taking account for uncertainty about the past, i.e. uncertainty=TRUE
in run.tfr.mcmc
. Quantiles or the mean are included in the results if probs
is not NULL
.
tfr_table |
Table storing the trajectories. It is a matrix with rows equal to number of trajectories, and column equal to number of time periods. |
country.obj |
A list storing information about the country which the trajectories and quantiles correspond to. It corresponds to the output of |
tfr_quantile |
Optional. A data.table object, storing the quantiles or the mean of estimates for each time period as specified by the |
Peiran Liu, Hana Sevcikova
## Not run:
sim.dir <- tempfile()
m <- run.tfr.mcmc(nr.chains = 1, iter = 10, output.dir = sim.dir, uncertainty = TRUE)
get.tfr.estimation(m, "Nigeria", probs = c(0.1, 0.5, 0.9))
unlink(sim.dir, recursive = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.