0

I am working in R, I need to ask that I have daily data for almost 11 months for every minute e.g

Date_Time  Usage_kW
0:00        1.7382
0.01        1.7892
0.02        1.7125
....          .
...           .
....          .
1.00          .
.             .
.       .
.

so on

and cycle repeats after every 60 minutes, so I chose the frequency 60 but I am not able to get the best prediction through arima model as the data is nonseasonal, please help me in selecting the correct value for frequency=?, start=? and end=? values

mydata<-ts(Usage[,2], start=1, end=24, frequency=60)

I want to plot data on daily basis e.g 24 hours??

Roman Luštrik
  • 69,533
  • 24
  • 154
  • 197
  • 1
    Can you post some data and properly attach the figure? – Roman Luštrik Feb 04 '20 at 07:08
  • I am new to stack overflow and not being able to paste figures yet. – Sandy123 Feb 04 '20 at 14:07
  • Please see [this post](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) on how to ask a good question. That being said, I think your question would be, provided you share some (obfuscated) data and code, better suited for crossvalidation.com. – Roman Luštrik Feb 05 '20 at 09:46

1 Answers1

1

you should merge the every minute data into either hour or daily or weekly then check accuracy of ARIMA model. You can also try other Forecasting methodes also like SMA,WMA,Holt Winter,tbats,Prophet,etc.. and select the model which is giving good accuracy(MAPE).

Update:

Once the frequency of observations is smaller than a week, then there is usually more than one way of handling the frequency. For example, data observed every minute might have an hourly seasonality (frequency=60), a daily seasonality (frequency=24x60=1440), a weekly seasonality (frequency=24x60x7=10080) and an annual seasonality (frequency=24x60x365.25=525960). If you want to use a ts object, then you need to decide which of these is the most important.

Zeeshan
  • 1,208
  • 1
  • 14
  • 26
  • I tried converting minutes into hours but confused in selecting the frequency value and start and end vales too,.....because once I created the ts function, then how can I see 24 hours data on x-axis? – Sandy123 Feb 06 '20 at 03:28
  • Sir, could you please properly tell me how to select the frequency because I converted the minutes into hours so my data is now in 24 hours and repeats the cycle after every 24 hours so what would be my frequency 24 or 1?? but with the frequency of 1, my series is not allowed to decompose in its components – Sandy123 Feb 06 '20 at 11:52
  • Hi, as i told you, you have to try various combinations of frequencies like daily, weekly, monthly,etc.. and select the frequency which is giving less error. Regarding freq as i written above hourly seasonality (frequency=60), a daily seasonality (frequency=24x60=1440), a weekly seasonality (frequency=24x60x7=10080) and an annual seasonality (frequency=24x60x365.25=525960). – Zeeshan Feb 06 '20 at 13:23