specific_expressions: Expression Generator

Description Usage Arguments Details Value See Also Examples

Description

Help functions to easily generate commonly used expressions.

Usage

1
mac.expression(country)

Arguments

country

Country code as defined for expressions.

Details

mac.expression generates an expression for the mean age of childbearing of the given country. Note that pop.predict has to be run with keep.vital.events=TRUE for this to work.

Value

mac.expression returns a character string corresponding to the formula (17.5*R_c(15-19) + 22.5*R_c(20=24) + ... + 47.5*R_c(45-49))/100 where R_c(x) denotes the country-specific percent age-specific fertility for the age group x.

See Also

pop.expressions

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
sim.dir <- tempfile()
# Run pop.predict with storing vital events
pred <- pop.predict(countries=c("Germany", "France"), nr.traj=3, 
           keep.vital.events=TRUE, output.dir=sim.dir)
# plot the mean age of childbearing 
pop.trajectories.plot(pred, expression=mac.expression("FR"), cex.main = 0.7)
unlink(sim.dir, recursive=TRUE)
## End(Not run)

bayesPop documentation built on July 2, 2020, 3 a.m.