How to select the number of nodes in a spline interpolation?

318 Views Asked by At

I am writing a program to test the precision of different methods for imputing missing data in a time series. One of the methods I am going to test is a natural cubic spline interpolation. I'll be using the GNU GSL library. I know that the output of splines is highly dependent upon the choice of nodes. As far as my pool of nodes to choose from, I have no choice, but I was also wondering if the number of nodes I choose has a high impact.

For example, say I want to replace missing temperature data for a station that reports hourly. Then the distance between each node is 1 hour, and I can go as many hours left and right of the value to be replaced as I wish to go. Temperature is seemingly continuous and doesn't drastically change in an hour usually (I would assume).

Mathematically speaking, am I likely to achieve more precise results if I go out, say 24 hours in each direction versus 12 or 6 hours in each direction?