View source: R/smooth_mortality_law.R
smooth_mortality_law | R Documentation |
This smoothing function allows smoothing of a variable in a vital object using
the MortalityLaw package.
The vital object is returned along with some additional columns containing
information about the smoothed variable: .smooth
containing the
smoothed values, and .smooth_se
containing the corresponding standard errors.
smooth_mortality_law(.data, .var, law = "gompertz", ...)
.data |
A vital object |
.var |
name of variable to smooth. This should contain mortality rates. |
law |
name of mortality law. For available mortality laws, users can check the |
... |
Additional arguments are passed to |
vital with added columns containing smoothed values and their standard errors
Sixian Tang and Rob J Hyndman
norway_mortality |> smooth_mortality_law(Mortality)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.