Reading daily data in R

I am trying to forecast electricity consumption on a daily basis based on historical data for each day from January 1, 2010 to December 31, 2011, i.e. a total of 365 * 2 = 730 past data. I use tsto read data. I define it as follows:

ts(consumption, start=1, frequency=365)

It is right? I mostly doubt the "frequency": should it be 365? Or should I use

ts(consumption, start=1,frequency=1)

For another approach, if I want to consolidate the data weekly (summing up every 7 observations) and then want to run the forecast model, how can I read the data using ts? What should be the meaning frequency?

+4
source share
1

frequency=365. , frequency=7. 7 , frequency=52.

, , , ts, , . , msts forecast. , ,

daily <- msts(consumption, seasonal.periods=c(7,365.25))

weekly <- msts(wconsumption, seasonal=365.25/7)

wconsumption 7 .

tbats:

fit <- tbats(daily)
fc <- forecast(tbats)
+5

Source: https://habr.com/ru/post/1528234/


All Articles