我有简单的每月数据集,只需尝试以下代码:
`df2.holtwinters <- subset(df, account_id==loopitem)
x.holtwinters <- ts(df2.holtwinters$amount_usd, start = c(2015,1), end = c(2019,5), frequency = 12)
arima1.holtwinters <- HoltWinters(x.holtwinters)
forecast1.holtwinters <- predict(arima1.holtwinters, n.ahead=1*1)
数据集如下所示:
` id <date> <dbl>
1 123 2015-01-01 -390
2 123 2015-02-01 944
3 999 2015-01-01 672
它给出了以下错误:
`In HoltWinters(x.holtwinters) :
optimization difficulties: ERROR: ABNORMAL_TERMINATION_IN_LNSRCH