Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default value of t.window #7

Open
Neverstop7 opened this issue Jul 28, 2018 · 1 comment
Open

Default value of t.window #7

Neverstop7 opened this issue Jul 28, 2018 · 1 comment

Comments

@Neverstop7
Copy link

Hello,
first of all I would like to thank you for creating this package. I find the diagnostic plots of the stlplus package very useful. I'm writing to you because the default value of t.window seems unusual to me. I am not sure if this is done on purpose for some reasons I don't know or if it is just an oversight.

According to the original paper "STL: A Seasonal-Trend Decomposition Procedure Based on Loess" by Cleveland et al., t.window should be set to the smallest odd integer greater or equal to(1.5*period) / (1-(1.5/s.window)(see pages 16-20 and 28). This fact is written in the documentation of the stlplus() function of the stlplus package too:

t. window: If NULL, the default, nextodd(ceiling((1.5*period) / (1-(1.5/s.window)))), is taken.

However the default value of t.windows seems to be different:

fit = stlplus(co2, s.window = 35)
fit$pars$win
  s.window t.window l.window
       35       17       13

The time series is monthly so I would expect a default t.window value equal to 19 instead of 17.

> fit = stlplus(co2, s.window = 15)
> fit$pars$win
  s.window t.window l.window
      15       19       13

And here, I would expect a t.window equal to 21 instead of 19.

Am I missing something?

@Neverstop7
Copy link
Author

Any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant