If the input TFR is given as an ASCII file (in inputs$tfr.file
), it can be either a csv (comma-separated) file in long format, with columns “LocID”, “Year”, “Trajectory” and “TF”. Or, it can be a tab-separated (wide format) file with column “country_code” and each year or time period as a separate column (see tfr
). In the latter case, an additional inputs
entry tfr.file.type = "w"
must be provided to specify the file is in the wide format, which is a case whe there is only one trajectory. Note that the TFR input should cover all projection time period as well as observed TFR as the function assesses the start of Phase III, which could be in the past.
If observed PASFR is given (in inputs$pasfr
), it is a tab-separated file in wide format as in percentASFR
. Fertility age patterns can be controlled by country via the inputs$patterns
entry, which is a dataset in the same format and meaning as vwBaseYear
.
In addition, if the present year differs by country, the inputs
list accepts the entry last.observed
, which is a tab-separated file with columns “country_code” and “last.observed”. It can contain the year of the last observed time period for each country.
In the project.pasfr
function, if the TFR input (given either as a long file or as a simulation directory), contains more than one trajectory, the median is derived over the trajectories for each time period. Then, PASFR corresponding to this median is projected using the method from Sevcikova et al (2015).
For project.pasfr.traj
, the PASFR is projected for single trajectories of TFR.