Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
657 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 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...