0

I am trying to forecast 90 different Items and different purchase date, the example of the dataset is as below

ret <- data.frame(Item_Name = 
c('Red bottle','Red Bottle','Red Bottle','Red Bottle', 'Green Mouse', 'Green Mouse','Green Mouse','Yellow Spoon','Yellow Spoon','Yellow Spoon','Yellow Spoon'),
Date_purchased = c(as.Date("2016/08/27"),as.Date("2016/08/29"),as.Date("2016/07/31"),as.Date("2016/08/02"),as.Date("2016/08/15"), as.Date("2016/08/18"), as.Date("2016/08/22"),as.Date("2016/08/25"),as.Date("2016/09/10"),as.Date("2016/09/13"),as.Date("2016/09/19") ), 
purchase = c(5,5,3, 7, 9, 8,4,2,5,6,4))

How can i obtain forecast value for each of the items using Holt Winter with this kind of dataframe using R? or should i transform the structure of the dataset to obtain each of the items forecasted? One of the bottleneck i found is that the table did not provide "Zero" quantity for certain dates.

Uwe
  • 41,420
  • 11
  • 90
  • 134
user3292755
  • 383
  • 2
  • 9
  • 25
  • This is a pretty open-ended question. What have you tried, and where is it failing? – ulfelder Oct 11 '16 at 11:17
  • @ulfelder I obtain the dataset from RDBMS and it's not structured well, so I design this dataframe. Previously, i did the forecast using Excel and do it manually, however, the analysis will be provided each day, so I want to automate this using R – user3292755 Oct 11 '16 at 12:14
  • Sorry, but this still seems like a mash-up of questions about research design and coding. Why don't you try solving your problem for a single time series and then see if you can turn that solution into a function that you apply to all of your series using `lapply` or `by` or something like that? – ulfelder Oct 11 '16 at 19:00

0 Answers0