View source: R/parity_assess.R
prtyAverage | R Documentation |
Average Parity Computation Function
prtyAverage(
ages,
parity,
women,
na_code = NA,
prtyElBadry.set = FALSE,
prtyImp.set = FALSE,
prtyElBadry.graph = FALSE,
prtyAssess.graph = FALSE,
age_group = "q"
)
ages |
A vector of ages or starting ages of age group intervals |
parity |
A vector of parities for each age group |
women |
A vector of women counts by parity and age group |
na_code |
A numeric value representing the label for missing parities (default = NA) |
prtyElBadry.set |
TRUE or FALSE for correction of zeros and missing values by El-Badry method (default = FALSE) |
prtyImp.set |
TRUE or FALSE for correction of implausible parities (default = FALSE) |
prtyElBadry.graph |
TRUE of FALSE for El-Badry diagnose plot output (default = FALSE) |
prtyAssess.graph |
TRUE or FALSE for parity assessment plot output (default = FALSE) |
age_group |
Character assuming values 'q' (default) for quinquennial age group or 's' for single age group input |
A data.frame with 2 variables: ages and P for average parities by age group
Moultrie TA, RE Dorrington, AG Hill, K Hill, IM Timæus and B Zaba (eds). 2013. Tools for Demographic Estimation. Paris: International Union for the Scientific Study of Population. demographicestimation.iussp.org
Feeney G. 1991. "Child survivorship estimation: Methods and data analysis", Asian and Pacific Population Forum 5(2-3):51-55, 76-87. http://hdl.handle.net/10125/3600.
library(DemoToolsData)
### Kenya 1989 data:
prtyAverage( ages = data.prty_KEN$ages,
parity = data.prty_KEN$parity,
women = data.prty_KEN$women
)
# With El-Badry:
prtyAverage( ages = data.prty_KEN$ages,
parity = data.prty_KEN$parity,
women = data.prty_KEN$women,
prtyElBadry.set = TRUE,
prtyElBadry.graph = TRUE )
# Correction for implausible parities
prtyAverage( ages = data.prty_KEN$ages,
parity = data.prty_KEN$parity,
women = data.prty_KEN$women,
prtyImp.set = TRUE )
###
### Cambodia 2008 data:
prtyAverage( ages = data.prty_KHM$ages,
parity = data.prty_KHM$parity,
women = data.prty_KHM$women )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.