This function estimates trend in life expectancy over a moving window.
Usage
est_trend(input_vec, year_vec = 1960:2020, window_val = 10)
Arguments
- input_vec
A numeric vector of life expectancies across different years.
- year_vec
A numeric vector of the years observed. Default 1960:2020,
- window_val
A numeric giving length of window. Default 10.