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

How to set biweekly frequency in seasonal parameter? #18

Open
ghost opened this issue Sep 6, 2017 · 2 comments
Open

How to set biweekly frequency in seasonal parameter? #18

ghost opened this issue Sep 6, 2017 · 2 comments

Comments

@ghost
Copy link

ghost commented Sep 6, 2017

Hi.

I want to fit a time serie with biweekly frequency.

I'm wondering if there's a way to set the biweekly frequency in seasonal parameter.

I know that for daily data, frequency = 7, monthly = 12, quarterly = 4...but I can't figure out how to set biweekly data...maybe 52 / 2 = 26 ???

Thanks a lot.

@wwrechard
Copy link
Owner

Hi Alex,

This depends on the granularity of your data. Following is based on the assumption that the time series is daily.

Then bi-weekly frequency should be 14 if you assume weekdays are different (i.e, Monday is different from Tuesday). seasonality(period=14). An example for this would be

Week 1: 1, 2, 3, 4, 5, 6, 7
Week 2: 8, 7, 6, 5, 4, 3, 2
Week 3: 1, 2, 3, 4, 5, 6, 7
...

If you assume there is no difference among weekdays (i.e., Monday is the same as Tuesday), then you should consider using longSeason longSeason(period=2, stay=7, ...). An example for this would be

Week 1: 1, 1, 1, 1, 1, 1, 1
Week 2: 2, 2, 2, 2, 2, 2, 2
Week 3: 1, 1, 1, 1, 1, 1, 1
...

For monthly frequency, it depends on what you mean by "monthly". If you mean the first day of each month should be the same, then you should use seaonality(period=30) or seaonality(period=31) depending on your belief of the month length... If you mean January this year should be the same as the January of next year, then you should use longSeason(period=12, stay=30) or longSeason(period=12, stay=31)

Likewise for quarterly, depending on the actual meaning you want, you might choose either seasonality(period=90) or longSeason(period=4, stay=90).

Thanks

@ghost
Copy link
Author

ghost commented Nov 28, 2017 via email

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