Forecasting by ID and Product in R [closed]

I would begin by visualizing my data to get some intuitions , detect patterns and choose the best model. R is really great for this. Here I am using ggplot2 but you can do the same thing using lattice. For example : dat$DATE <- as.Date(dat$DATE,format=”%d/%m/%Y”) library(ggplot2) ggplot(dat,aes(x=DATE,y=Rev,group=ProdCode,color=ProdCode)) + geom_line() + facet_grid(~ID) + geom_smooth(method=’lm’) Here dat … Read more