Skip to content

Commit 01ec884

Browse files
Fixed refit() method for ETS() models applying transformations twice
Resolves #407
1 parent 7e9e84b commit 01ec884

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
* Fixed `VARIMA()` not working with integer data.
1111
* More robust calculations of `ARIMA()` AR and MA roots (#417).
12+
* Fixed `refit()` method for `ETS()` models applying transformations twice (#407).
1213

1314
# fable 0.4.1
1415

R/ets.R

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -447,9 +447,8 @@ refit.ETS <- function(object, new_data, specials = NULL, reestimate = FALSE, rei
447447
}
448448
}
449449

450-
y <- transmute(new_data, !!parse_expr(measured_vars(object$est)[1]))
451-
idx <- unclass(y)[[index_var(y)]]
452-
y <- unclass(y)[[measured_vars(y)]]
450+
idx <- unclass(new_data)[[index_var(new_data)]]
451+
y <- new_data[[measured_vars(new_data)]]
453452

454453
best <- if (reinitialise) {
455454
etsmodel(

0 commit comments

Comments
 (0)