0

I have a sample data here for a daily time series and I want to how can I find out if it shows a weekly or 10 day pattern.

sampledata<- rnorm(200, mean = 10, sd = 23)

ts_df <- ts( sampledata, frequency=1, start=as.Date("2012-03-07"))
plot(ts_df )
jbest
  • 235
  • 1
  • 2
  • 11
  • If you expect the pattern to appear in the conditional mean of the series, then look at autocorrelations and partial autocorrelations at lags 7 and 10. For that you may use functions `acf` and `pacf`. – Richard Hardy Mar 11 '15 at 10:29
  • @Richard Hardy, thanks but do I have to used differences before I used acf and pact? – jbest Mar 11 '15 at 10:43
  • If your data is stationary, do not difference before running `acf` and `pacf`. If your data is integrated of order 1, difference first. – Richard Hardy Mar 11 '15 at 10:46
  • @RichardHardy is there any way I can determine the pattern without looking at the acf graph. Maybe I can create a test to know if it display a 7 or 10 day pattern. I have hundreds of data and its hard if I look at the plots one at a time. Thank you. – jbest Mar 13 '15 at 03:36
  • I think I can modify Rob Hyndman answer here http://stats.stackexchange.com/questions/57705/identify-seasonality-in-time-series-data so it can tell me whether I have a 7 day or 10 day seasonality – jbest Mar 13 '15 at 03:59

0 Answers0