I have a 10 year daily time series of air temperatures:
x <- c(rep((seq(-3,5,by=0.85)),365),NA)
I converted it to a time series object like this:
x <- ts(x, frequency=10, start=1)
and ran stlm
stlm(x, s.window=365, robust=TRUE, allow.multiplicative.trend=TRUE, level=0.95)
which produced the error
error in na.fail.default(as.ts(x)) : missing values in object
This is very strange, because meteorological time series are highly seasonal. What could I do to fix that? Is there a problem with the zeros?
Any help appreciated. UPDATE: There was one missing value in my time series, which produced the error. The partial code
robust=TRUE, allow.multiplicative.trend=TRUE, level=0.95
produced another error and the arguments obviously cannot be used.
How can I decompose my time series adequately into season and trend in order to identify the trend which eventually changed during the 10 years?