[R] stl function

2007-02-27 Thread Anja Eggert
I want to apply the stl-function to decompose a time series (daily 
measurements over 22 years) into seasonal component, trend and 
residuals. I was able to get the diagrams.
However, I could not find out what are the equations behind it. I.e. it 
is probably not an additive or multiplicative combination of season (as 
sin and cos-functions) and a linear trend?
Furthermore, what are the grey bars on the right hand side of the diagrams?
I would appreciate very much to receive some information or maybe a good 
reference.

Thank you very much,
Anja

-- 
*
Dr. Anja Eggert 
Universität Rostock
Institut für Biowissenschaften
AG Angewandte Ökologie

Albert-Einstein-Str. 3
18059 Rostock

T: ++49 381 498 6094
F: ++49 381 498 6072

e-mail: [EMAIL PROTECTED]

__
R-help@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
and provide commented, minimal, self-contained, reproducible code.


Re: [R] stl function

2007-02-27 Thread Gavin Simpson
On Tue, 2007-02-27 at 15:55 +0100, Anja Eggert wrote:
 I want to apply the stl-function to decompose a time series (daily 
 measurements over 22 years) into seasonal component, trend and 
 residuals. I was able to get the diagrams.
 However, I could not find out what are the equations behind it. I.e. it 
 is probably not an additive or multiplicative combination of season (as 
 sin and cos-functions) and a linear trend?
 Furthermore, what are the grey bars on the right hand side of the diagrams?
 I would appreciate very much to receive some information or maybe a good 
 reference.
 
 Thank you very much,
 Anja
 

?stl tells you all you need to know to answer this, including the
reference to the academic publication that describes the method.

?plot.stl tells you that the grey bars are range bars - they are used to
assess the relative magnitude of various decomposed components.

G

-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 Gavin Simpson [t] +44 (0)20 7679 0522
 ECRC, UCL Geography,  [f] +44 (0)20 7679 0565
 Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk
 Gower Street, London  [w] http://www.ucl.ac.uk/~ucfagls/
 UK. WC1E 6BT. [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%

__
R-help@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
and provide commented, minimal, self-contained, reproducible code.


[R] stl function

2006-04-26 Thread Andrea Toreti
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@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


Re: [R] stl function

2006-04-26 Thread Gabor Grothendieck
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 [EMAIL PROTECTED] 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@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


__
R-help@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