prtyAverage: Average Parity Computation Function

View source: R/parity_assess.R

prtyAverageR Documentation

Average Parity Computation Function

Description

Average Parity Computation Function

Usage

prtyAverage(
  ages,
  parity,
  women,
  na_code = NA,
  prtyElBadry.set = FALSE,
  prtyImp.set = FALSE,
  prtyElBadry.graph = FALSE,
  prtyAssess.graph = FALSE,
  age_group = "q"
)

Arguments

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

Value

A data.frame with 2 variables: ages and P for average parities by age group

Source

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.

Examples


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 )



josehcms/fertestr documentation built on Oct. 9, 2024, 9:03 p.m.