spence.15: Spencer's 15 point graduation rule.

spence.15R Documentation

Spencer's 15 point graduation rule.

Description

Spencer's 15 point rule is a weighted moving average operation for a sequence of observations equally spaced in time. The average at time t depends on the observations at times t-7,...,t+7.

Except for boundary effects, the function will reproduce polynomials up to degree 3.

Usage

spence.15(y)

Arguments

y

Data vector of observations at equally spaced points.

Value

A vector with the same length as the input vector, representing the graduated (smoothed) values.

References

Spencer, J. (1904). On the graduation of rates of sickness and mortality. Journal of the Institute of Actuaries 38, 334-343.

See Also

spence.21, spencer,

Examples

data(spencer)
yy <- spence.15(spencer$mortality)
plot(spencer$age, spencer$mortality)
lines(spencer$age, yy)

locfit documentation built on June 24, 2024, 5:08 p.m.

Related to spence.15 in locfit...