Skip to content

Instantly share code, notes, and snippets.

View eric-pedersen's full-sized avatar

Eric Pedersen eric-pedersen

View GitHub Profile
@dill
dill / extr.R
Created May 29, 2020 06:44
Forecasting with B-splines
# extrapolating into the future with B-splines
# based on code in ?smooth.construct.bs.smooth.spec
library(mgcv)
# annual diameter of women’s skirts at the hem 1866 to 1911
# Hipel and McLeod, 1994
skirts <- scan("http://robjhyndman.com/tsdldata/roberts/skirts.dat",skip=5)
skirtseries <- data.frame(year=1866:1911, diam=skirts)