Skip to content

Should forecast(*, newdata) produce forecasts outside the range of newdata? #202

Closed
@hongooi73

Description

@hongooi73

Something I just came across:

library(fable)
library(fabletools)
library(tsibbledata)

aus_retail_2013_tr <- aus_retail %>%
    filter(Month <= yearmonth("2013 Dec"))
aus_retail_2013_vl <- aus_retail %>%
    filter(Month > yearmonth("2013 Dec"))

mods_2013 <- model(aus_retail_2013_tr,
    sdrift=SNAIVE(log(Turnover) ~ drift())
)

qll <- filter(mods_2013, State == "Queensland", Industry == "Liquor retailing")
qll_fcasts_2013 <- forecast(qll, new_data=aus_retail_2013_vl)
range(qll_fcasts_2013$Month)
[1] "2010 Mar" "2012 Feb"

Why is the forecast only for 2010 to 2012, when the dataset provided is from 2013 to 2018? Is this intended?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions