robjhyndman / forecast

Forecasting Functions for Time Series and Linear Models
http://pkg.robjhyndman.com/forecast
1.11k stars 341 forks source link

levels argument forecast.tbats() #174

Closed dashaub closed 8 years ago

dashaub commented 8 years ago

Other forecast functions (e.g. forecast.Arima() or forecast.ets()) have checks on the level argument to prevent prediction intervals with negative levels or levels above 100. However, forecast.tbats() does not, so NaN is produced for the levels instead of throwing an error

forecast(tbats(oil), level = 110)
forecast(tbats(oil), level = -10)

Should checking the level argument and throwing an error for level > 100 or level <= 0 be added to forecast.tbats()?

robjhyndman commented 8 years ago

Yes. That would be a useful addition to the function.