You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While dealing with keyed tsibbles that contain many time series, it is useful to compare the forecast (and distributional) accuracy across model specifications relying on untransformed vs transformed time series.
Consider the example below -
library(tsibble)
library(fable)
m <- list()
m[['Untransformed']] <- tourism %>% # This works
model(
E = ETS(Trips),
A = ARIMA(Trips),
T = THETA(Trips)
)
m[['Transformed']] <- tourism %>% # Can this be made to work?
model(
E = ETS(box_cox(Trips, lambda = 'auto')),
A = ARIMA(box_cox(Trips, lambda = 'auto')),
T = THETA(box_cox(Trips, lambda = 'auto'))
)
Can m[['Transformed]] be made to work?
The text was updated successfully, but these errors were encountered:
Yes, this is now possible since length 1 variables used in the transformation of the response variable are now cached. So you can use feasts::guerrero(resp) to calculate the optimal box-cox transformation parameter.
library(tsibble)
#> #> Attaching package: 'tsibble'#> The following objects are masked from 'package:base':#> #> intersect, setdiff, union
library(fable)
#> Loading required package: fabletools
library(feasts)
UKLungDeaths<- as_tsibble(cbind(mdeaths, fdeaths))
m<-list()
m[['Untransformed']] <-UKLungDeaths %>% # This works
model(
E= ETS(value),
A= ARIMA(value),
T= THETA(value)
)
m[['Transformed']] <-UKLungDeaths %>% # Can this be made to work?
model(
E= ETS(box_cox(value, lambda= guerrero(value))),
A= ARIMA(box_cox(value, lambda= guerrero(value))),
T= THETA(box_cox(value, lambda= guerrero(value)))
)
m#> $Untransformed#> # A mable: 2 x 4#> # Key: key [2]#> key E A T#> <chr> <model> <model> <model>#> 1 fdeaths <ETS(M,N,M)> <ARIMA(0,0,0)(1,1,1)[12]> <THETA>#> 2 mdeaths <ETS(M,A,A)> <ARIMA(2,0,0)(2,1,0)[12] w/ drift> <THETA>#> #> $Transformed#> # A mable: 2 x 4#> # Key: key [2]#> key E A T#> <chr> <model> <model> <model>#> 1 fdeaths <ETS(A,N,A)> <ARIMA(0,0,1)(0,1,1)[12] w/ drift> <THETA>#> 2 mdeaths <ETS(A,N,A)> <ARIMA(0,0,1)(1,1,1)[12] w/ drift> <THETA>
While dealing with keyed tsibbles that contain many time series, it is useful to compare the forecast (and distributional) accuracy across model specifications relying on untransformed vs transformed time series.
Consider the example below -
Can
m[['Transformed]]
be made to work?The text was updated successfully, but these errors were encountered: