# Seasonality and trend window in the Forecast functions of R

I have time-series power consumption data for one month. The data is sampled at minutes frequency. Thus, for each day I have 1440 observations and for the month (30 days) I have 4320 observations. On the same data, I use stl() function to observe seasonality, trend, etc. I have following doubts:

1. What should be the frequency value while creating the ts (timeSeries) object? Is it 1440 (no. of observations per day) or it is 30 (no. of days for which observations are recorded)
2. In the stl function, I need to provide values for s.window, t.window. Should I use the value of frequency for s.window? I am clueless about trend window.

• About stl, did you already read the associated paper? – user81847 Mar 1 '16 at 5:06
• I read the associated book chapter, but still unable to understand the relation between s.window and frequency. I find the seasonality, more intuitive while setting s.window to 30 as compared to 1440 – Haroon Rashid Mar 1 '16 at 5:18