I'm getting different results for the Box-Cox parameter using two different methods. Why is this happening? (I'm trying to follow the Mathematical Adjustments subsection in FPP3.)
library(fpp3)
h02 <- PBS %>%
filter(ATC2 == "H02") %>%
summarise(Cost = sum(Cost)/1e6)
h02 %>%
features(Cost, features = guerrero) %>%
pull(lambda_guerrero)
#[1] 0.03146112
guerrero(h02$Cost)
# -0.2283991
forecast::BoxCox.lambda(h02$Cost)
# -0.2283929
Referred here by Forecasting: Principles and Practice, by Rob J Hyndman and George Athanasopoulos