[R] stl function
Gabor Grothendieck
ggrothendieck at gmail.com
Thu Apr 27 02:50:12 CEST 2006
stl does this internally:
x <- na.action(as.ts(x))
so
stl(x, s.window, na.action = f)
is the same as
stl(f(as.ts(x)), s.window)
e.g.
nottem[25] <- NA # nottem is a built in data set in R
stl(nottem, "per") # error
stl(nottem, "per", na.action = na.contiguous)
library(zoo)
stl(nottem, "per", na.action = na.locf)
stl(nottem, "per", na.action = na.approx)
Whether any of these makes sense is another matter.
On 4/26/06, Andrea Toreti <andrea.toreti at apat.it> wrote:
> Hi,
> I have a monthly time series with missing values and I would use stl function to identify seasonality.
> I tried all settings of na.action but the result is the same:
>
> stl(tm245,s.window=11, na.action=na.pass)
> Error in stl(tm245, s.window = 11, na.action = na.pass) :
> NA/NaN/Inf in foreign function call (arg 1)
>
> Can you help me?
>
> Thanks
>
> Andrea Toreti
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
More information about the R-help
mailing list