gompertz | R Documentation |
This function produces a vector of mortality rates for a heterogeneous population containing n sub-populations.
gompertz(rho0, m0, beta, age_vec)
rho0 |
Numeric vector of length n of initial fractions of sub-populations within total population. |
m0 |
Numeric vector of length n of initial sub-population mortality rates. |
beta |
Numeric vector of length n of sub-population rates of mortality dynamics. |
age_vec |
Numeric vector of ages from 0 to upper age limit of population, \omega. |
Outputs a numeric vector of mortality rates for the heterogeneous population of length 0:\omega.
age_vec <- 0:110; rho0 <- c(0.5, 0.5); m0 <- c(0.05, 0.02); beta <- (0.039, 0.039) mrates <- gompertz(rho0, m0, beta, age_vec) plot(age_vec, mrates)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.