# Using regression splines for values outside of the calibration range

in my question on a load forecast model using temperature data as covariates I was advised to use regression splines. This really seems to be a/the solution.

Now I face the following problem: if I calibrate my model on winter data (for technical reasons calibration can not be done on a daily basis, rather every second month) and slowly spring arises I will have temperature data outside of the calibration set.

Are there good techniques to make the regression spline fit robust for values outside of the calibration range? Any experiences or references? Thanks!

-
The general answer is a resounding, emphatic no for reasons Stephan Kolassa has outlined (but perhaps not forcefully enough). Unless you have theoretical reasons to suppose that the spline ought to extrapolate properly--and that seems unlikely, given that splines are general-purpose and therefore arbitrary--then you should expect the spline to fail, perhaps dramatically, outside the calibration region. –  whuber Jan 25 '13 at 15:16
Thanks for your comment ... I understand the reasoning very well. I might be faced with a situation where I just have to do something .. . and make the smallest error ... but I have to do something. –  Richard Jan 25 '13 at 16:11
What I do is very applied. The forecasts is one of many and there is hope that errors in one forecast do not weigh too much in the aggregate number. Thanks again for your straight comment. Although the situation will not be saved totally applying some flat or linear damped extrapolation could be a very dirty solution. Just, if I have to do something ... and can't do nothing. –  Richard Jan 25 '13 at 16:23
I appreciate that at times you have to do something. What that tells us is you should be asking a different question. Rather than seeking for ways to make a spline "robust," you really want to know something more general: what extrapolation procedures can minimize your loss? Under some pretty general conditions, there are procedures that are better than splines--but they are all still horrible (unless you're lucky). To do well, you will want to incorporate as much information about the nature of the extrapolation as you can, perhaps by using a theoretical model and additional "soft" data. –  whuber Jan 25 '13 at 16:49

The first thing to do is to make sure you are using something like natural splines. These are smooth piecewise cubic curves inside your training set - but they are only linear outside the training set, so they can be used in (careful) extrapolation. In R, you can use the ns() function in the splines package for this.
Hm, I don't know. Have you looked into the reference provided in the help page for spm()? stat.tamu.edu/~carroll/semiregbook Unfortunately, the help page does not clarify whether the penalized splines it uses are restricted to be linear outside the training set (which I certainly could imagine to be the case). –  Stephan Kolassa Jan 25 '13 at 10:42