Home | GLMs | Multilevel | Survival | Demography | Stata | R

Fertility and Nuptiality in Stata

The nuptfer package installs several Stata commands that can be useful in the analysis of fertility and nuptiality, including the following egen extension commands:

Nuptiality

There are two commands that evaluate probabilities and quantiles for the Coale-McNeil model, pnupt and qnupt:

egen newvarname = pnupt(expression), mean(real) stdev(real) pem(real 1)

computes the (cumulative) probabilities of marrying by the exact ages given by expression. The parameters are the (conditional) mean and standard deviation of age at marriage for those who marry, and the proportion who eventually marry, which has default one.

For example egen p = pnupt(age), mean(20) stdev(5) pem(.9) computes the schedule with mean 20 and standard deviation 5 where 90% marry, and evaluates it at exact ages given by the variable age.

To compute a discrete density you can difference the cumulative probabilities.

egen newvarname = qnupt(expression), mean(real) stdev(real) pem(real 1)

computes quantiles of age at marriage, defined as the ages by which the proportions (of all women) given by expression have married. To obtain the median age at marriage for those who eventually marry you need to use 0.5 pem as the argument.

The equivalent commands for the Hernes model are phernes and qhernes

egen newvarname = phernes(expression), a(real) r(real) pem(real)

computes the probabilities of marrying by exact ages given by expression in a Hernes model, where a is the `attractiveness' parameter at age 15 (usually denoted A), r is the decay rate (so Hernes's b = e-r) and pem is the probability of ever marrying. Note that there is no default value for this probability and that is has to be less than one in a Hernes model. This function is just a convenient wrapper for invlogit(logit(pem) - A * exp(-r*(age-15))/r).

egen newvarname = qhernes(expression), a(real) r(real) pem(real)

computes quantiles of age at marriage in a Hernes model with parameters a, r and pem as defined above for phernes.

Fertility

We have functions for Henry's natural fertility schedule, Coale's schedule of control by age, Coale's marital fertility model with parameters M and m, and the Coale-Trussell model of general fertility by age. These are all functions of exact age, computed by linear interpolation from the single year schedules, except for the marriage part of the Coale-Trussell model which is computed using the nuptiality function.

egen newvarname = natfer(expression)

computes Henry natural fertility schedule at exact ages given by expression. Call it with values 11.5, 12.5, ... , 49.5 to reproduce the published schedule by single years of age. This is useful for fitting the Coale or Page models of fertility using OLS or Poisson regression.

egen newvarname = confer(expression)

computes the Coale schedule of fertility control by age at exact ages given by expression. This is useful for fitting the Coale model using OLS or Poisson regression.

egen newvarname = marfer(expression), level(real) control(real)

computes Coale's marital fertility schedule evaluated at exact ages given by expression. The parameters represent the level of natural fertility (big M) and the degree of parity-related control (little m). (Stata doesn't let us use M and m for different options, and Ansley would have vetoed littlem and bigm, hence the names level and control.)

egen newvarname = genfer(expression), level(real) control(real) mean(real) stdev(real)

computes the Coale-Trussell model of general fertility. There are four parameters, level combines the level of natural fertility and the probability of ever marrying and is equivalent to M times pem. control represents parity-related control of fertility and is equivalent to m, and mean and stdev are the mean and standard deviation of age at first union among those who eventually enter a union.

Mata Library

The package also installs a Mata library called lnuptfer which is used internally by some of these functions.