robjhyndman / forecast

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

An error message (or warning) to `forecast:::guer.cv()` function #878

Closed ShanikaLW closed 3 years ago

ShanikaLW commented 3 years ago

The original paper (Guerrero (1993)) which discusses Guerrero's method to find the Box-Cox lambda is given only for strictly positive data.

So I believe we should issue an error message (or warning) to ensure that negative data or a mixture of positive and negative data are not allowed (or use with caution). Or else we might have to modify the guer.cv() function to handle these types of data.

mitchelloharawild commented 3 years ago

Thanks!

mitchelloharawild commented 3 years ago

Also, modifying the function to better handle X<=0 would justify a new function / method. Using guerrero() (and consequently, guer.cv()) should give you the Guerrero (1993) method.