Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
638 views
in Technique[技术] by (71.8m points)

time series - Analyzing Daily/Weekly data using ts in R

I have just started playing with the ts class to analyze some time series data I have.

I am getting a sense that the ts class is not well suited for analyzing daily or weekly data. Almost all the examples I see on the web or in Cowpertwait and Metcalfe's "Introductory Time Series with R" use monthly or annual data.

I would like to use ts to analyze weekly data, is it not advisable ?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The main problem is that most people who want to analyse daily or weekly data want to do something like use a frequency of 365 days per year or 52 weeks per year but the number of days or weeks in a year is not 365 or 52 or even constant. If you drop one day in leap years in the case of daily data, say, or use 7 days for each week of the year except one which has 8 or 9 days in the case of weekly data, say, then you can fudge it. An endless variety of schemes is possible.

Read through this thread for an example.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

Just Browsing Browsing

[3] html - How to create even cell spacing within a

1.4m articles

1.4m replys

5 comments

56.9k users

...