frts_3yrs: Apply fertility rates methodology for last four years to...

Description Usage Arguments Value Examples

View source: R/frts_3yrs.R

Description

Applies a given fertility rates methodology rates case-by-case to a data set and returns another data set with the estimates by observation.

Usage

1
2
frts_3yrs(m.intvw, y.intvw, y.first, y.second, y.third, m.wmn, y.wmn,
  age.wmn, m.child, y.child, wmn.dummy, id.wmn, ids, strata, weights, data)

Arguments

m.intvw

A numeric or a vector which indicates the month in which the woman were interviewed.

y.intvw

A numeric which indicate the year in which the woman were interviewed.

y.first

A numeric which indicate the first year retrospectively of three-year periods.

y.second

A numeric which indicate the second year retrospectively of three-year periods.

y.third

A numeric which indicate third year retrospectively of three-year periods.

m.wmn

A vector specifying the woman’s month of birth (mother or not mother).

y.wmn

A vector specifying the woman’s year of birth (mother or not mother).

age.wmn

A vector specifying the woman's age at the time of the interview (mother or not mother).

m.child

A vector specifying the child’s month of birth (if the woman doesn't have child, NA).

y.child

A vector specifying the child’s year of birth (if the woman doesn't have children, NA).

wmn.dummy

A vector which indicate TRUE if the woman isn't duplicate or FALSE if the woman is duplicate.

id.wmn

A vector wich indicate the woman's identification.

ids

A vector specifying cluster ids from largest level to smallest level, ~0 or ~1 is a formula for no clusters.

strata

A vector specifying strata.

weights

A vetor pecifying sampling weights as an alternative to prob (1/weights).

data

A data frame containing the above variables.

Value

An object of class frts_3yrs containing a data.frame, a list and a vector.

Examples

1
2
3
4
5
6
7
## Information from ENADID 2014, INEGI

mg3 <- frts_3yrs(m.intvw=ENTREV_M , y.intvw=2014, y.first=2013, y.second=2012, y.third=2011,
 m.wmn=FEC_MUJ_M, y.wmn=FEC_MUJ_A, age.wmn=EDAD_M, m.child=FEC_HIJ_M, y.child=FEC_HIJ_A,
 wmn.dummy=MUJER, id.wmn=ID_1, ids=UPM, strata=ESTRATO, weights = FACTOR, data = enadid_2014)

summary(mg3, level = 0.9)

YazGonzalez/fertilityRates documentation built on March 29, 2020, 9 a.m.