I have tried to follow the steps indicated on this page and it doesn't work as it doesn't identify the function "recipe" (which I fail to understand anyways...). I am trying to find the best Box-Cox transformation to stationaries in variance my time series.
https://recipes.tidymodels.org/reference/step_BoxCox.html
Here is my code :
rec <- recipe(~., data = as.data.frame(prod))
bc_trans <- step_BoxCox(rec, all_numeric())
bc_estimates <- prep(bc_trans, training = as.data.frame(prod))
bc_data <- bake(bc_estimates, as.data.frame(prod))
plot(density(prod[, "Production"]), main = "before")
And here is the structure of my dataset for reproducibility :
structure(list(date = c("2022-11", "2022-10", "2022-09", "2022-08",
"2022-07", "2022-06"), production_brute_nucleaire =
c(22951.429,
21465.026, 19334.531, 19319.365, 19923.664, 21275.248)), row.names = c(NA,
6L), class = "data.frame")