I have a time series data set which consists of 374 days of data points (1 data point for each day). I am struggling to understand the frequency parameter in ts function, so I left it empty:
ts_0615391206 <- ts(demand_rev_0615391206$estimated_demand,
start=as.Date(min(demand_rev_0615391206$date),format = "d%/m%/Y%"),
end=as.Date(max(demand_rev_0615391206$date),format = "d%/m%/Y%"),
#frequency = 1
)
plot.ts(ts_0615391206) however, when I try to decompose using:
ts_0615391206_components <- decompose(ts_0615391206)
I am getting the error:
Error in decompose(ts_0615391206) :
time series has no or less than 2 periods
How do I decide how many period there are in my data and consequently what us the parameter "frequency" value should be?
> dput(head(ts_0615391206))
c(2.71, 2.47, 3.86, 3.61, 5.78, 5.59)
>
> str(ts_0615391206)
Time-Series [1:194] from 16125 to 16318: 2.71 2.47 3.86 3.61 5.78 5.59 3.28 3.4 3.34 3.68 ...