[R] Internal NA removal out of Time Series with na.omit.ts()

Jan Verbesselt Jan.Verbesselt at agr.kuleuven.ac.be
Mon Mar 8 15:29:35 CET 2004


Thanks for the tips and advice!

I found out how the NA's came into the time series.  By a threshold
mechanism, extreme values (outliers) are removed from the time series
(environmental data, remote sensing data) and set as NA.  A solution
could be to detect an outlier and replace it by the quadratic fit of 2
values before and 2 values after the outlier.

In R, 'lsfit’ does a least squares fit on the available data but can
this be used on time series since values are auto correlated?

Are there R-functions that "fit or interpolate" a new value based on a
set window around the outlier valid for seasonal time series? Which
function is the best to use? 

Thanks,
Jan




More information about the R-help mailing list