get.est.model {bayesTFR}R Documentation

Accessing estimated bias and standard deviations


Functions for obtaining bias and standard deviation of the estimated models as well as the model fits.

Usage, country.code=NULL, ISO.code=NULL, sim.dir=NULL)
get.bias.model(mcmc.list=NULL, country.code=NULL, ISO.code=NULL, sim.dir=NULL)
get.std.model(mcmc.list=NULL, country.code=NULL, ISO.code=NULL, sim.dir=NULL)



Object of class bayesTFR.mcmc.set corresponding to Phase II MCMCs. If it is NULL, the object is loaded from the directory given by sim.dir.


Name or numerical code of a country. If it is NULL, ISO.code need to be provided as ISO-3 characters.


Country code in the ISO-3 character form. Only used if country.code is not given.


Directory with the MCMC simulation results. Only used if mcmc.list is not given.


Functions get.bias.model and get.std.model are used to obtain the model fit for estimated bias and standard deviation, respectively, when uncertainty about input data is taken into account. These are used in the MCMC steps stored in mcmc.list. Function combines both infos into one object.


Functions get.bias.model and get.std.model return a list with


lm object corresponding to the linear model used to estimate the bias (in case of get.bias.model) and standard deviation (in case of get.std.model).


data.frame object storing the bias/standard deviation of all possible combinations in the raw data sets for the given country.

Function consolidates these items into a single list where the elements are model_bias, model_sd and table.


Peiran Liu, Hana Sevcikova


## Not run: 
sim.dir <- tempfile()
mcmc.set <- run.tfr.mcmc(nr.chains = 1, iter = 10, 
    output.dir = sim.dir, uncertainty = TRUE), "Nigeria")
unlink(sim.dir, recursive = TRUE)
## End(Not run)

[Package bayesTFR version 7.0-4 Index]