Applies Guerrero's (1993) method to select the lambda which minimises the coefficient of variation for subseries of x.

guerrero(x, lower = -0.9, upper = 2, .period = 2L)



A numeric vector. The data used to identify the transformation parameter lambda.


The lower bound for lambda.


The upper bound for lambda.


The length of each subseries (usually the length of seasonal period). Subseries length must be at least 2.


A Box Cox transformation parameter (lambda) chosen by Guerrero's method.


Note that this function will give slightly different results to forecast::BoxCox.lambda(y) if your data does not start at the start of the seasonal period. This function will make use of all of your data, whereas the forecast package will not use data that doesn't complete a seasonal period.


Box, G. E. P. and Cox, D. R. (1964) An analysis of transformations. JRSS B 26 211–246.

Guerrero, V.M. (1993) Time-series analysis supported by power transformations. Journal of Forecasting, 12, 37–48.