For time series data analyzing peaks depends on the time window by which the data is segregated. Is there a way to determine an optimum window size? For example, for the purpose of my problem I need to compute the importance of a peak in a time series. I am calculating the fraction of mentions observed on the peak day divided by the total cumulative mentions over a span of 7 days (termed as peak fraction). This idea is borrowed from a research paper. However the value of peak fraction will change significantly when one changes the window size. A time series where 90% mentions happen on a single day, will have a very high peak fraction when window size is 1 day, since essentially it will have one distinct peak for that day. However, if window size is much smaller (say 1hour), the chances of getting one distinct peak is much smaller. The peak fraction is way smaller now.
Is there any empirical way or an algorithm to determine window size while analyzing peaks in time series?
Here is an example dataset. The two series are from the same time series but aggregated over different time window
Series1_60Min = c(36, 0, 0, 0, 0, 0, 0, 0, 760, 7000, 2887, 163, 70, 44, 36, 22, 25, 8, 8, 7, 6, 4, 3, 7, 5, 4, 31, 3)
Series2_1Day = c(10, 26, 11083, 10)
Peak Fraction for Series1_60Min = max(Series1_60Min)/sum(Series1_60Min) = 0.628
Peak Fraction for Series2_1Day = max(Series2_1Day)/sum(Series2_1Day) = 0.995