Learn R Programming

bayesPop (version 6.2-4)

project.pasfr: Projections of Percent Age-Specific Fertily Rate

Description

The projections of percent age-specific fertility rate (PASFR) is normally computed within the pop.predict function for each trajectory. This function allows to project PASFR outside of population projections for the median total fertility and export it.

Usage

project.pasfr(inputs = NULL, present.year = 2015, end.year = 2100, 
    wpp.year = 2017, digits = 2, out.file.name = "percentASFR.txt")
    
project.pasfr.traj(inputs = NULL, countries = NULL, nr.traj = NULL, 
    present.year = 2015, end.year = 2100, wpp.year = 2017, 
    digits = 2, out.file.name = "percentASFRtraj.txt")

Arguments

inputs

List of input data (file names) with the same meaning as in pop.predict. The relevant items here are: either tfr.file or tfr.sim.dir (TFR projections), pasfr (PASFR for observed time periods), srb (observed and predicted sex ratio at birth), patterns (PASFR patterns). All entries are optional. By default the data is taken from the corresponding wpp package.

present.year

Year of the last observed data point.

end.year

End year of the projection.

wpp.year

Year for which WPP data is used if one of the inputs components is left out.

digits

Number of decimal places in the results.

out.file.name

Name of the resulting file. If NULL nothing is written.

countries

Vector of numerical country codes. By default the function is applied to all countries.

nr.traj

Number of trajectories on which the function should be applied. By default all trajectories are taken. Otherwise they are thinned appropriately.

Value

Returns invisible data frame with the projected PASFR.

Details

For project.pasfr, the median total fertility rate is derived from the inputs and 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.

References

H. Sevcikova, N. Li, V. Kantorova, P. Gerland and A. E. Raftery (2015). Age-Specific Mortality and Fertility Rates for Probabilistic Population Projections. arXiv:1503.05215. http://arxiv.org/abs/1503.05215

See Also

pop.predict

Examples

Run this code
# NOT RUN {
inputs <- list(tfr.sim.dir=file.path(find.package("bayesTFR"), "ex-data", "bayesTFR.output"))
pasfr <- project.pasfr(inputs, out.file.name=NULL)
head(pasfr)

pasfr.traj <- project.pasfr.traj(inputs, out.file.name=NULL)
head(pasfr.traj)
# }

Run the code above in your browser using DataLab