Autoplot plots ONLY the forecast for ETS using fable for time series in R












1















I've been playing around with forecast, fable, and tibble, and was working through Rob Hyndman's examples HERE. When I get to the end of the "auscafe" example, the autoplot that comes out is ONLY for the forecast, not the original plot PLUS the forecast as shown (and expected).



What am I missing here?



library(fpp2)
library(tsibble)
library(fable)
data("auscafe")

# Make auscafe a tsibble and confirm
cafe <- as_tsibble(auscafe)
cafe


# Take a look
autoplot(cafe)

# ETS model noodling after Hyndman's 2018 presentation
# https://robjhyndman.com/seminars/isf-fable/

cafe %>% ETS(value) %>% summary

cafe %>% ETS(value) %>% forecast() %>% summary()

cafe %>% ETS(value) %>% forecast() %>% summary(level=90)

# See Hyndman slide 11: He gets the original series PLUS the forecast
# When I run this, I get a plot of ONLY the forecast,
# i.e., 2008-07 to 2010-07

cafe %>% ETS(value) %>% forecast() %>% autoplot()









share|improve this question























  • thanks for bringing this issue up. I've tried using some of these packages in the past, and I think that they are still in the developmental stages. I know it's not much of an answer for now (I couldn't even get tsibble correctly installed on my computer today), but maybe someone else will have one soon.

    – shuckle
    Dec 31 '18 at 22:49






  • 1





    Yep. I also had to try a couple of times to get tsibble installed. I found that restarting the R session helped, as does detaching all other packages. I'm also having trouble with the ARIMA function in fable throwing inexplicable errors. There seems to be some "arguing" when you have forecast and fable loaded at the same time. Harumf. Oh well, all part of the process I guess.

    – Steph
    Dec 31 '18 at 23:20


















1















I've been playing around with forecast, fable, and tibble, and was working through Rob Hyndman's examples HERE. When I get to the end of the "auscafe" example, the autoplot that comes out is ONLY for the forecast, not the original plot PLUS the forecast as shown (and expected).



What am I missing here?



library(fpp2)
library(tsibble)
library(fable)
data("auscafe")

# Make auscafe a tsibble and confirm
cafe <- as_tsibble(auscafe)
cafe


# Take a look
autoplot(cafe)

# ETS model noodling after Hyndman's 2018 presentation
# https://robjhyndman.com/seminars/isf-fable/

cafe %>% ETS(value) %>% summary

cafe %>% ETS(value) %>% forecast() %>% summary()

cafe %>% ETS(value) %>% forecast() %>% summary(level=90)

# See Hyndman slide 11: He gets the original series PLUS the forecast
# When I run this, I get a plot of ONLY the forecast,
# i.e., 2008-07 to 2010-07

cafe %>% ETS(value) %>% forecast() %>% autoplot()









share|improve this question























  • thanks for bringing this issue up. I've tried using some of these packages in the past, and I think that they are still in the developmental stages. I know it's not much of an answer for now (I couldn't even get tsibble correctly installed on my computer today), but maybe someone else will have one soon.

    – shuckle
    Dec 31 '18 at 22:49






  • 1





    Yep. I also had to try a couple of times to get tsibble installed. I found that restarting the R session helped, as does detaching all other packages. I'm also having trouble with the ARIMA function in fable throwing inexplicable errors. There seems to be some "arguing" when you have forecast and fable loaded at the same time. Harumf. Oh well, all part of the process I guess.

    – Steph
    Dec 31 '18 at 23:20
















1












1








1








I've been playing around with forecast, fable, and tibble, and was working through Rob Hyndman's examples HERE. When I get to the end of the "auscafe" example, the autoplot that comes out is ONLY for the forecast, not the original plot PLUS the forecast as shown (and expected).



What am I missing here?



library(fpp2)
library(tsibble)
library(fable)
data("auscafe")

# Make auscafe a tsibble and confirm
cafe <- as_tsibble(auscafe)
cafe


# Take a look
autoplot(cafe)

# ETS model noodling after Hyndman's 2018 presentation
# https://robjhyndman.com/seminars/isf-fable/

cafe %>% ETS(value) %>% summary

cafe %>% ETS(value) %>% forecast() %>% summary()

cafe %>% ETS(value) %>% forecast() %>% summary(level=90)

# See Hyndman slide 11: He gets the original series PLUS the forecast
# When I run this, I get a plot of ONLY the forecast,
# i.e., 2008-07 to 2010-07

cafe %>% ETS(value) %>% forecast() %>% autoplot()









share|improve this question














I've been playing around with forecast, fable, and tibble, and was working through Rob Hyndman's examples HERE. When I get to the end of the "auscafe" example, the autoplot that comes out is ONLY for the forecast, not the original plot PLUS the forecast as shown (and expected).



What am I missing here?



library(fpp2)
library(tsibble)
library(fable)
data("auscafe")

# Make auscafe a tsibble and confirm
cafe <- as_tsibble(auscafe)
cafe


# Take a look
autoplot(cafe)

# ETS model noodling after Hyndman's 2018 presentation
# https://robjhyndman.com/seminars/isf-fable/

cafe %>% ETS(value) %>% summary

cafe %>% ETS(value) %>% forecast() %>% summary()

cafe %>% ETS(value) %>% forecast() %>% summary(level=90)

# See Hyndman slide 11: He gets the original series PLUS the forecast
# When I run this, I get a plot of ONLY the forecast,
# i.e., 2008-07 to 2010-07

cafe %>% ETS(value) %>% forecast() %>% autoplot()






r timeserieschart fable






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 31 '18 at 18:39









StephSteph

415




415













  • thanks for bringing this issue up. I've tried using some of these packages in the past, and I think that they are still in the developmental stages. I know it's not much of an answer for now (I couldn't even get tsibble correctly installed on my computer today), but maybe someone else will have one soon.

    – shuckle
    Dec 31 '18 at 22:49






  • 1





    Yep. I also had to try a couple of times to get tsibble installed. I found that restarting the R session helped, as does detaching all other packages. I'm also having trouble with the ARIMA function in fable throwing inexplicable errors. There seems to be some "arguing" when you have forecast and fable loaded at the same time. Harumf. Oh well, all part of the process I guess.

    – Steph
    Dec 31 '18 at 23:20





















  • thanks for bringing this issue up. I've tried using some of these packages in the past, and I think that they are still in the developmental stages. I know it's not much of an answer for now (I couldn't even get tsibble correctly installed on my computer today), but maybe someone else will have one soon.

    – shuckle
    Dec 31 '18 at 22:49






  • 1





    Yep. I also had to try a couple of times to get tsibble installed. I found that restarting the R session helped, as does detaching all other packages. I'm also having trouble with the ARIMA function in fable throwing inexplicable errors. There seems to be some "arguing" when you have forecast and fable loaded at the same time. Harumf. Oh well, all part of the process I guess.

    – Steph
    Dec 31 '18 at 23:20



















thanks for bringing this issue up. I've tried using some of these packages in the past, and I think that they are still in the developmental stages. I know it's not much of an answer for now (I couldn't even get tsibble correctly installed on my computer today), but maybe someone else will have one soon.

– shuckle
Dec 31 '18 at 22:49





thanks for bringing this issue up. I've tried using some of these packages in the past, and I think that they are still in the developmental stages. I know it's not much of an answer for now (I couldn't even get tsibble correctly installed on my computer today), but maybe someone else will have one soon.

– shuckle
Dec 31 '18 at 22:49




1




1





Yep. I also had to try a couple of times to get tsibble installed. I found that restarting the R session helped, as does detaching all other packages. I'm also having trouble with the ARIMA function in fable throwing inexplicable errors. There seems to be some "arguing" when you have forecast and fable loaded at the same time. Harumf. Oh well, all part of the process I guess.

– Steph
Dec 31 '18 at 23:20







Yep. I also had to try a couple of times to get tsibble installed. I found that restarting the R session helped, as does detaching all other packages. I'm also having trouble with the ARIMA function in fable throwing inexplicable errors. There seems to be some "arguing" when you have forecast and fable loaded at the same time. Harumf. Oh well, all part of the process I guess.

– Steph
Dec 31 '18 at 23:20














1 Answer
1






active

oldest

votes


















1














I also posted this on the tidyverts/fable git repo and got this excellent response from Mitchell O'Hara-Wild:




Since the presentation the package has undergone several changes as we
figure out the best way to implement the features.



At the time of the presentation, the fable package was simply a
wrapper to the forecast package, and so fable::ARIMA would call
forecast::auto.arima. Since then, the ARIMA method has been
re-implemented from scratch, and as the error states, currently does
not support selection of differences. For now, the order of
integration must be specified with model specials. For example,
pdq(d=1) + PDQ(D=1) would include both a seasonal and non-seasonal
difference. This functionality will be added in the near future.



We've also changed how forecasts work. Forecasts now contain only
future predicted values, and so the data used to train the model is no
longer included. The historical data for the forecasts can be included
by providing the data as the first argument to autoplot.




prison %>% ETS(count) %>% forecast() %>% autoplot(prison)





share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53990482%2fautoplot-plots-only-the-forecast-for-ets-using-fable-for-time-series-in-r%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    I also posted this on the tidyverts/fable git repo and got this excellent response from Mitchell O'Hara-Wild:




    Since the presentation the package has undergone several changes as we
    figure out the best way to implement the features.



    At the time of the presentation, the fable package was simply a
    wrapper to the forecast package, and so fable::ARIMA would call
    forecast::auto.arima. Since then, the ARIMA method has been
    re-implemented from scratch, and as the error states, currently does
    not support selection of differences. For now, the order of
    integration must be specified with model specials. For example,
    pdq(d=1) + PDQ(D=1) would include both a seasonal and non-seasonal
    difference. This functionality will be added in the near future.



    We've also changed how forecasts work. Forecasts now contain only
    future predicted values, and so the data used to train the model is no
    longer included. The historical data for the forecasts can be included
    by providing the data as the first argument to autoplot.




    prison %>% ETS(count) %>% forecast() %>% autoplot(prison)





    share|improve this answer




























      1














      I also posted this on the tidyverts/fable git repo and got this excellent response from Mitchell O'Hara-Wild:




      Since the presentation the package has undergone several changes as we
      figure out the best way to implement the features.



      At the time of the presentation, the fable package was simply a
      wrapper to the forecast package, and so fable::ARIMA would call
      forecast::auto.arima. Since then, the ARIMA method has been
      re-implemented from scratch, and as the error states, currently does
      not support selection of differences. For now, the order of
      integration must be specified with model specials. For example,
      pdq(d=1) + PDQ(D=1) would include both a seasonal and non-seasonal
      difference. This functionality will be added in the near future.



      We've also changed how forecasts work. Forecasts now contain only
      future predicted values, and so the data used to train the model is no
      longer included. The historical data for the forecasts can be included
      by providing the data as the first argument to autoplot.




      prison %>% ETS(count) %>% forecast() %>% autoplot(prison)





      share|improve this answer


























        1












        1








        1







        I also posted this on the tidyverts/fable git repo and got this excellent response from Mitchell O'Hara-Wild:




        Since the presentation the package has undergone several changes as we
        figure out the best way to implement the features.



        At the time of the presentation, the fable package was simply a
        wrapper to the forecast package, and so fable::ARIMA would call
        forecast::auto.arima. Since then, the ARIMA method has been
        re-implemented from scratch, and as the error states, currently does
        not support selection of differences. For now, the order of
        integration must be specified with model specials. For example,
        pdq(d=1) + PDQ(D=1) would include both a seasonal and non-seasonal
        difference. This functionality will be added in the near future.



        We've also changed how forecasts work. Forecasts now contain only
        future predicted values, and so the data used to train the model is no
        longer included. The historical data for the forecasts can be included
        by providing the data as the first argument to autoplot.




        prison %>% ETS(count) %>% forecast() %>% autoplot(prison)





        share|improve this answer













        I also posted this on the tidyverts/fable git repo and got this excellent response from Mitchell O'Hara-Wild:




        Since the presentation the package has undergone several changes as we
        figure out the best way to implement the features.



        At the time of the presentation, the fable package was simply a
        wrapper to the forecast package, and so fable::ARIMA would call
        forecast::auto.arima. Since then, the ARIMA method has been
        re-implemented from scratch, and as the error states, currently does
        not support selection of differences. For now, the order of
        integration must be specified with model specials. For example,
        pdq(d=1) + PDQ(D=1) would include both a seasonal and non-seasonal
        difference. This functionality will be added in the near future.



        We've also changed how forecasts work. Forecasts now contain only
        future predicted values, and so the data used to train the model is no
        longer included. The historical data for the forecasts can be included
        by providing the data as the first argument to autoplot.




        prison %>% ETS(count) %>% forecast() %>% autoplot(prison)






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 1 at 15:31









        StephSteph

        415




        415
































            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53990482%2fautoplot-plots-only-the-forecast-for-ets-using-fable-for-time-series-in-r%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Mossoró

            Error while reading .h5 file using the rhdf5 package in R

            Pushsharp Apns notification error: 'InvalidToken'