4

I am using tbats and bats functions and must be doing something wrong. I am using the following command for standard Holt-Winters with bats / tbats but getting an error.

tbats(y = data, use.box.cox = FALSE, use.trend = TRUE, use.damped.trend=FALSE,
      seasonal.periods = 24, use.arma.errors = FALSE)

This the error generated:

Error in 1:nrow(control.array) : argument of length 0

Same thing happens when I use bats.

But when I use the above command without use.damped.trend=FALSE I do get the answer. The problem is that the value of $\alpha=1.4$, which in my opinion is wrong.

Stephan Kolassa
  • 95,027
  • 13
  • 197
  • 357
Anthony
  • 43
  • 3
  • Welcome to the site, @Anthony. I can't tell if this question is *only* about how to get something done in R. If so, it would be off-topic for CV (see our [help page](http://stats.stackexchange.com/help)), but on-topic on [Stack Overflow](http://stackoverflow.com/). If you have a substantive statistical question (eg, about $\alpha$), please edit to clarify; if not, flag your Q & we'll migrate it for you (*please don't cross-post, though*). – gung - Reinstate Monica Jun 10 '13 at 03:10
  • Both questions are equally important for me and are related. You may transfer it to the SO if your terms of use are violated. – Anthony Jun 10 '13 at 14:23
  • It seems it may fit acceptably well on either site, so it's up to you if you prefer it here or there. On another note, if you believe that @RobHyndman's answer is helpful (eg, I did, +1), or has resolved your question, you might want to upvote it by clicking on the upwards normal distribution, or accept it, by clicking on the check mark below the vote count. – gung - Reinstate Monica Jun 10 '13 at 14:26
  • Vote up is not allowed as it requires 15 reputations. I have clicked the check mark. – Anthony Jun 11 '13 at 01:38
  • Anthony, you should have the required reputation now. – Glen_b Jun 15 '13 at 23:29

1 Answers1

3
  1. The error is a bug. I'll fix it in the next version of the forecast package. In the meantime, you can simply omit either the use.damped.trend or use.trend argument.

  2. A smoothing parameter of $\alpha=1.4$ is not incorrect. Even for a simple exponential smoothing model, the admissible parameter region for $\alpha$ is (0,2), corresponding to the invertible region of the equivalent ARIMA(0,1,1) model. However, it is common to restrict the region to (0,1) because it provides for additional interpretability of the equations in terms of weighted averages. For a TBATS model, the admissible parameter region is complicated but it also allows for smoothing parameters to be larger than 1.

Rob Hyndman
  • 51,928
  • 23
  • 126
  • 178
  • Thanks Rob for the clarification. But will the following command work for standard Holt Winters: tbats(y = data, use.box.cox = FALSE,seasonal.periods = 24, use.arma.errors = FALSE) as it will contain damped trend? – Anthony Jun 11 '13 at 01:40
  • It will only give a damped trend model if including the damping improves the AIC. – Rob Hyndman Jun 11 '13 at 03:32