get.e0.prediction retrieves results of a prediction and creates an object of class
has.e0.prediction checks an existence of such results. Analogously, functions
has.e0.jmale.prediction retrieve and check an existence of male predictions from a given female prediction object.
get.e0.prediction(mcmc = NULL, sim.dir = NULL, joint.male = FALSE, mcmc.dir = NULL) has.e0.prediction(mcmc = NULL, sim.dir = NULL) get.e0.jmale.prediction(e0.pred) has.e0.jmale.prediction(e0.pred)
Object of class
Directory where the prediction is stored. It should correspond to the value of the
Optional argument to be used only in a special case when the mcmc object contained in the prediction object was estimated in different directory than in the one to which it points to (for example due to moving or renaming the original directory). The argument causes that the mcmc is redirected to the given directory.
Object of class
mcmc is not
NULL, the search directory is set to
mcmc$meta$output.dir. This approach assumes that the prediction was stored in the same directory as the MCMC simulation, i.e. the
output.dir argument of the
e0.predict function was set to
NULL. If it is not the case, the argument
mcmc.dir should be used.
get.e0.jmale.prediction extracts male projections from the
e0.pred objects (which should be a female prediction object), if the male prediction was generated using the
has.e0.jmale.prediction checks if such male prediction was generated.
has.e0.jmale.prediction return a logical indicating if a prediction exists.
get.e0.jmale.prediction return an
object of class
sim.dir <- file.path(find.package("bayesLife"), "ex-data", "bayesLife.output") pred <- get.e0.prediction(sim.dir = sim.dir) # female prediction summary summary(pred, country = "Canada") ## Not run: # male prediction summary # (works only if a joint male prediction exists - not the case in this toy example) summary(get.e0.jmale.prediction(pred), country = "Canada") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.