Hi
I have a time series for which the variable has missing values. I would like to replace the missing values by a linear model derived from the closest available values in time.
What would be the best way?
And if the script could do that to all the columns of my table (except the time), that would be even better
Thanks
Example
What I have
What I want:
| t | Output |
|---|
| 0 | 10 |
| 1 | 15 |
| 2 | 20 |
| 4 | 30 |
| 10 | 22.5 |
| 20 | 10 |