I am having a weekly data and want to forecast values based on available actuals in R using timeseries model.
I tried to convert the data to a timeseries data using (ts) but couldnt.
Weekly
Income
1/8/2018
1220
1/15/2018
2200
1/22/2018
8800
1/29/2018
7743
2/5/2018
4432
2/12/2018
56789
2/19/2018
95643
2/26/2018
2200
3/5/2018
23400
3/12/2018
3340
3/19/2018
2098
3/26/2018
12098
4/2/2018
12060
4/9/2018
10980
4/16/2018
202987
4/23/2018
40003
4/30/2018
30009
5/7/2018
3480
5/14/2018
40090
5/21/2018
6800
5/28/2018
40088
t_data<-ts(mydata1_subset2$income,frequency = 52,start = c(2018,1))
``
any idea how to convert the data set to a timeseries data based on weekly and any model to predict the value for future.
I am not sure how to include this in model, even when we put this in a time series model either Arima or Tbats
the result is totally different . Any idea
To help us help you, could you please prepare a reproducible example (reprex) illustrating your issue? Please have a look at this guide, to see how to create one:
The data below gives me weekly time series but which would be a good model to fit this weekly data and predict the value for next 12 months weekly prediction.
I was hoping that ksasi would realise he didnt share the data in the recommended way, which I previously pointed him to. It seemed a reasonable way to justify reading the guide...
Thanks nigrahamuk for your support. I tried exporting the timeseries dataset but it is not in correct format hence I just provided the data directly. Meanwhile I learned that Frequency =52 plays trick in weekly timeseries. Hence I able to understand the TS data now.. but anyone can suggest, how "Holt winters" method works to predict immediate week from actual data.
Example:
I am giving timeseries data from 2018 Jan to 2020 Aug on weekly basis and I want to predict from 2020 Sept to next 60 weeks.
Whether Holt winters is good or any other method will do
Unless your data has very small variability, for a forecast horizon of 60 weeks none of the models will be satisfactory. This is because the confidence intervals will quickly grow beyond the range of historical data and may even become negative.