LOESS (locally weighted smoothing) helps to smooth data over age, preserving the open age group if necessary. This is a simple wrapper to stats::loess() but using standard demographic arguments. It is a popular tool to create a smooth line through a timeplot or scatter plot.

loess_smth1(Value, Age, OAG = TRUE, ...)

## Arguments

Value numeric vector of counts in single, abridged, or 5-year age groups. integer vector of ages corresponding to the lower integer bound of the counts. logical. Whether or not the top age group is open. Default TRUE. optional arguments passed to stats::loess()

## Details

The total sum of Value is preserved in the output. One can control smoothness using the spar argument of stats::loess(). See loess for more details.

loess
if (FALSE) {