e0.predict.extra {bayesLife}R Documentation

Generating Posterior Trajectories of the Life Expectancy for Specific Countries or Regions


Using the posterior parameter samples the function generates posterior trajectories of the life expectancy for given countries or regions. It is intended to be used after running run.e0.mcmc.extra, but it can be also used for purposes of testing specific settings on one or a few countries.


e0.predict.extra(sim.dir = file.path(getwd(), 'bayesLife.output'), 
    prediction.dir = sim.dir, countries = NULL, 
    save.as.ascii = 1000, verbose = TRUE, ...)



Directory with the MCMC simulation results.


Directory where the prediction object and the trajectories are stored.


Vector of country codes for which the prediction should be made. If it is NULL, the prediction is run for all countries that are included in the MCMC object but for which no prediction was generated.


Either a number determining how many trajectories should be converted into an ascii file, or “all” in which case all trajectories are converted. It should be set to 0, if no converions is desired. Note that the convertion is done on all countries.


Logical switching log messages on and off.


Additional arguments passed to a joint female-male prediction.


In order to use this function, a prediction object must exist, i.e. the function e0.predict must have been processed prior to using this function.

Trajectories for given countries or regions are generated and stored in binary format along with other countries (in prediction.dir). The existing prediction object is updated and stored in the same directory. If save.as.ascii is larger than zero, trajectories of ALL countries are converted to an ascii format.

If the prediction object contains joint male projections, these are also created for the given countries.


Updated object of class bayesLife.prediction.


Hana Sevcikova

See Also

e0.predict, run.e0.mcmc.extra

[Package bayesLife version 5.0-1 Index]