write.e0.projection.summary {bayesLife}R Documentation

Writing Projection Summary Files

Description

The function creates two files containing projection summaries, such as the median, the lower and upper bound of the 80 and 90% probability intervals, respectively, and the constant variant. One file is in a user-friendly format, whereas the other is in a UN-specific format with internal coding of the time and the variants.

Usage

write.e0.projection.summary(dir = file.path(getwd(), "bayesLife.output"), 
    output.dir = NULL, revision = NULL, adjusted = FALSE)

Arguments

dir

Directory containing the prediction object. It should correspond to the output.dir argument of the e0.predict function.

output.dir

Directory in which the resulting file will be stored. If NULL the same directory is used as for the prediction.

revision

UN revision number. If NULL it is determined from the corresponding WPP year: WPP 2008 corresponds to revision 13, every subsequent WPP increases the revision number by one. Used as a constant in the second file only.

adjusted

Logical. By default the function writes summary using the original BHM projections. If the projection medians are adjusted (using e.g. e0.median.set), setting this argument to TRUE causes writing the adjusted projections.

Details

The first file that the function creates is called ‘projection_summary_user_friendly.csv’, it is a comma-separated table with the following columns:

The second file, called ‘projection_summary.csv’, also comma-separated table, contains the same information as above in a UN-specific format:

If the simulation directory contains joint male predictions, summary files for those are created as well. In such a case, if output.dir is given, separate subdirectories for female and male are created.

Note

This function is automatically called from the e0.predict and e0.jmale.predict functions, therefore in standard cases it will not be needed to call it directly.

Author(s)

Hana Sevcikova

See Also

convert.e0.trajectories, e0.predict


[Package bayesLife version 5.0-1 Index]