I am trying to forecast data with a downward trend. I understand that Holt's linear model might be the better way to do it, but am unsure how I can implement it in R.
The data is as follows:
day saleRep
1 1 1001.104
2 11 1000.944
3 21 1000.734
4 31 1000.642
5 41 1000.517
6 51 1000.468
7 61 1000.425
8 71 1000.377
9 81 1000.286
10 91 1000.306
11 101 1000.285
12 111 1000.170
I am trying to achieve a few things:
- Conduct a train test split to create a forecast model that I can evaluate on the test set
- Using the model, obtain the predicted sale values for the 250th and 500th day.
How can I implement it in R?
Use this to reproduce the code:
day <- seq(1,111, by = 10)
saleRep <- c(1001.104, 1000.944, 1000.734, 1000.642, 1000.517, 1000.468, 1000.425, 1000.377, 1000.286, 1000.306, 1000.285, 1000.170)
df <- data.frame(day, saleRep)
Thank you.

I will use the forecast package and go step-by-step. Load the forecast package and generate an example daily time-series data
The toy data
Convert data to a ts object
Split train and test
fit and forecast an hw model
Plot the forecast