This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
# prediction grid | |
pd <- data.frame(year=seq(1864, 1960, by=1)) |