How to see the calculations behind a forecast function?

Hello!

I am writing a high school maths thesis, I use the fpp2 forecasting package. The issue is simple, I gave in input, the forecast function gave me the output for n periods in the future, I know the formula, but how can I see how R calculated my data?

Thanks in advance!

The answer to your question is in the docs and the source code.

To answer your question more generally, you'll want to look up the function you applied in the docs. There, package authors usually cite their sources. With the function name (and a bit of knowledge about how R works), you can also track down the function in the repo, to see exactly how that formula is applied.


You can see the CRAN package site for fpp2 here, CRAN - Package fpp2

From that, you can see the repository for this package is located at

And the package documentation is located at

Now, specific to fpp2 and forecasting, you're fortunate enough to have a package written by Rob Hyndman. He and George Athanasopoulos wrote a free book on forecasting to accompany this package.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.