# 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.

I am following this page to understand these concepts.

UPDATE

1. My Ist doubt got cleared while reading this page, where Dr. Rob mentions that frequency is the number of observations per season. Thus, the answer to my first doubt is 1440 as season is represented by each day in my data.
• 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
• Although asked in terms of an R function, these questions seem clearly statistical to me. IMO, this should be considered on topic here. – gung Mar 1 '16 at 12:27
• @gung, Yes, this is a statistical question. If this is not the correct place to ask this question, then can you please refer me to the correct place. – Haroon Rashid Mar 2 '16 at 5:54