Regular periodic cubic splines
Jean Palate
2024-07-12
Source:vignettes/regsplines.Rmd
regsplines.Rmd
Use of regular periodic cubic splines
s<-log(ABS$X0.2.09.10.M)
BSM with full periodic splines seasonal component
The results of the first two models should be identical (up to numerical precision)
model<-model()
seas<-splines_regular("s", 12, nodes=c(0:11))
add(model, llt)
add(model, seas)
add(model, n)
rslt<-estimate(model, s)
sa2<-result(rslt, "ssf.smoothing.components")
summary(sa1[,2]-sa2[,2])
#> Min. 1st Qu. Median Mean 3rd Qu. Max.
#> -3.099e-07 -4.402e-08 -4.641e-10 2.138e-10 4.262e-08 2.310e-07