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.
Directory containing the prediction object. It should correspond to the
Directory in which the resulting file will be stored. If
UN revision number. If
Logical. By default the function writes summary using the original BHM projections. If the projection medians are adjusted (using e.g.
The first file that the function creates is called ‘projection_summary_user_friendly.csv’, it is a comma-separated table with the following columns:
“country_name”: country name
“country_code”: country code
“variant”: name of the variant, such as “median”, “lower 80”, “upper 80”, “lower 95”, “upper 95”, “constant”
period1: e.g. “2010-2015”: life expectancy for the first time period
period2: e.g. “2015-2020”: life expectancy for the second time period
... further columns with life expectancy projections
The second file, called ‘projection_summary.csv’, also comma-separated table, contains the same information as above in a UN-specific format:
“RevID”: revision number, passed to the function as an argument;
“VarID”: variant identifier, extracted from the
UN_variants dataset in the bayesTFR package;
“LocID”: country code;
“TimeID”: time identifier, extracted from the
UN_time dataset in the bayesTFR package;
“e0”: the life expectancy for this variant, location and time period.
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.
This function is automatically called from the
e0.jmale.predict functions, therefore in standard cases it will not be needed to call it directly.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.