I found the Rob H answer to this question very interesting and works pretty well. However, I also would like to apply this methodology to an unevenly spaced time series like the following:
date value
1: 2011-02-02 2408
2: 2011-03-05 2454
3: 2011-05-09 2502
4: 2011-06-04 2517
5: 2011-09-12 2570
6: 2011-10-04 2581
7: 2011-10-26 2595
8: 2011-11-09 2604
9: 2011-12-01 2629
10: 2012-01-02 3596
11: 2012-02-04 2736
12: 2012-03-07 2797
13: 2012-05-09 2880
14: 2012-05-16 2887
15: 2012-06-01 2901
16: 2012-06-29 2921
17: 2012-08-03 2945
18: 2012-08-07 1912
Which is the best approach to apply the tsoutliers
function of Rob in this case? Or do I need to look for different methods?
approx
function. Then apply Rob's function. See the results. $\endgroup$