View source: R/MortalityLaw_S3.R
predict.MortalityLaw | R Documentation |
Predict function for MortalityLaw
## S3 method for class 'MortalityLaw'
predict(object, x, ...)
object |
An object of class |
x |
Vector of ages to be considered in prediction |
... |
Additional arguments affecting the predictions produced. |
A vector of predicted hazard rates
Marius D. Pascariu
MortalityLaw
# Extrapolate old-age mortality with the Kannisto model
# Fit ages 80-94 and extrapolate up to 120.
Mx <- ahmd$mx[paste(80:94), "1950"]
M1 <- MortalityLaw(x = 80:94, mx = Mx, law = 'kannisto')
fitted(M1)
predict(M1, x = 80:120)
# See more examples in MortalityLaw function help page.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.