I'm struggling with creating a forecast using the forecast.gts function. I'm getting an error message/warning that I do not understand and do need some guidance in where to look so I can find out how to setup the right forecast. The code that i'm running is:
SFA4 <- ts(SFA4, frequency=12, start=c(2012,1), end=c(2017,9))
library(forecast)
library(hts)
# Creating the gts model to be used for forecast
SFA5 <- gts(SFA4, characters=c(2, c(1, 2)))
f <- forecast.gts(SFA5, h=2, method="comb", fmethod="ets", algorithms = "lu", weights = "wls", lambda=0)
The error message that i'm getting is:
Warning message:
In value[[3L]](cond) :
An error in LU decomposition occurred, the message was the following:
cs_lu(A) failed: near-singular A (or out of memory)
Trying QR decomposition instead...
The data can be described in this way: I do have two customers bying the same products and have tried to excluded negative sales (replaced with zero) and month with no sales (adding 1 to all month where sales = zero).
I'm relatively new to R and forecasting and not trying to get my work done, but simply trying to find out where to look to find out which parameters to use for the algorithms, weights, method etc. The easiest way is naturally to run through all combinations and choose the forecast with the lowest variance. I do not get a warning when using method="bu", but I would like to understand how to find out which parameters to set when.
Here is the data (SFA4): https://www.dropbox.com/s/2shh5pjojq4qzfu/Data1850.xlsx?dl=0