<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Rob J Hyndman</title>
    <link>https://robjhyndman.com</link>
    <link href="https://robjhyndman.com/index.xml" rel="self" type="application/rss+xml"/>
    <description>Recent content by Rob J Hyndman</description>
    <generator>quarto-1.10.18</generator>
    <lastBuildDate>Sun, 04 Oct 2026 13:00:00 GMT</lastBuildDate>
    <item>
      <title>WOMBAT 2026</title>
      <link>https://robjhyndman.com/hyndsight/wombat2026.html</link>
      <description> 



&lt;div&gt;
  &lt;div class="description"&gt;
    WOMBAT (Workshop Organised by the Monash Business Analytics Team) is on again, on 30 November – 1 December 2026 in Melbourne. Early bird pricing ends on Sunday 18 October.
  &lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;/p&gt;


&lt;p&gt;The theme this year is “TIME: Timely Insights, Models, and Exploration”. As always, the aim is to bring together analysts from academia, industry and government to learn about and discuss open-source tools for business analytics and data science.&lt;/p&gt;
&lt;section id="november-tutorials" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="november-tutorials"&gt;30 November: Tutorials&lt;/h2&gt;
&lt;p&gt;Eight half-day tutorials across four tracks, including Nick Tierney on targets, Cynthia Huang on Quarto, Mitchell O’Hara-Wild on exploratory time series analysis, and Hadley Wickham on package development with Positron and AI.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="december-workshop" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="december-workshop"&gt;1 December: Workshop&lt;/h2&gt;
&lt;p&gt;I’m giving the keynote, “Spotting the weird ones”, on finding anomalies in data using statistical methods and the &lt;a href="https://pkg.robjhyndman.com/weird/"&gt;&lt;code&gt;weird&lt;/code&gt;&lt;/a&gt; R package. That is followed by invited talks on time series, AI workflows and industry perspectives.&lt;/p&gt;
&lt;p&gt;The workshop is at 750 Collins Street, Docklands.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="registration" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="registration"&gt;Registration&lt;/h2&gt;
&lt;p&gt;Early bird pricing ends on &lt;strong&gt;Sunday 18 October&lt;/strong&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://events.humanitix.com/wombat-2026-day-1-tutorials"&gt;Register for the tutorials&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://events.humanitix.com/wombat-2026-day-2-workshop"&gt;Register for the workshop&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For the full program, see the &lt;a href="https://wombat2026.numbat.space/"&gt;WOMBAT 2026 website&lt;/a&gt;.&lt;/p&gt;


&lt;/section&gt;

 </description>
      <category>conferences</category>
      <category>data science</category>
      <category>Monash University</category>
      <category>R</category>
      <category>anomalies</category>
      <guid>https://robjhyndman.com/hyndsight/wombat2026.html</guid>
      <pubDate>Sun, 04 Oct 2026 13:00:00 GMT</pubDate>
      <content url="https://robjhyndman.com/img/wombat2026.png" medium="image" type="image/png" height="60" width="144"/>
    </item>
    <item>
      <title>Evaluating time series foundation model claims</title>
      <link>https://robjhyndman.com/hyndsight/foundation_models.html</link>
      <description> 



&lt;div&gt;
  &lt;div class="description"&gt;
    &lt;em&gt;I was emailed by a journalist writing an article about time series foundation models.&lt;/em&gt; &lt;em&gt;Here is my response.&lt;/em&gt; &lt;em&gt;While the questions were about a specific new transformer model, the comments are more widely applicable, so I’ve edited my answer to be more generic.&lt;/em&gt;
  &lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;/p&gt;


&lt;p&gt;As background, I would point you to my online forecasting textbook where we have a chapter on foundation models&amp;nbsp;&lt;span class="citation" data-cites="fpppy"&gt;(Hyndman et al., 2026)&lt;/span&gt;. Another excellent reference on this topic is Christoph Bergmeir’s paper “LLMs and Foundational Models: Not (Yet) as Good as Hoped”&amp;nbsp;&lt;span class="citation" data-cites="Bergmeir2024llms"&gt;(Bergmeir, 2024)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1.&amp;nbsp;How significant a change do time series foundation models represent for the practice of forecasting?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;They’re a real shift in how forecasts get &lt;em&gt;produced&lt;/em&gt;, but not yet a demonstrated shift in how &lt;em&gt;accurate&lt;/em&gt; forecasts are in general. The genuine change is architectural and operational: instead of building, tuning and maintaining a separate model for every series, an organisation can point a single pre-trained model at a new dataset and get a forecast with no dataset-specific training or model selection. That lowers the barrier to entry for forecasting at scale, particularly for teams without in-house statistical expertise.&lt;/p&gt;
&lt;p&gt;What it hasn’t yet done is replace the case for careful statistical modelling. The strongest independent critique of the field is &lt;span class="citation" data-cites="Bergmeir2024llms"&gt;Bergmeir (2024)&lt;/span&gt; who found that when you check the reported empirical results, the performance is often nowhere near as good as claimed. Often the statistical benchmarks are implemented poorly, or missing altogether, or highly selective. So these foundation models are an important development, but they are not close to being the panacea that many of the companies behind them are claiming.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2.&amp;nbsp;How should organisations compare foundation models with well-tuned statistical or task-specific approaches, particularly considering accuracy and cost?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;First, make sure the statistical baseline is actually well implemented. This is the single biggest problem &lt;span class="citation" data-cites="Bergmeir2024llms"&gt;Bergmeir (2024)&lt;/span&gt; identifies in the foundation-model literature: papers routinely compare against under-tuned or de-ensembled versions of classical methods, then claim victory. So I would be asking: what exactly were the statistical benchmarks, how were they tuned, and were they given the same advantages (ensembling, proper cross-validation) as in the studies that established them as strong benchmarks in the first place?&lt;/p&gt;
&lt;p&gt;Second, evaluate on your own data with proper rolling-origin backtesting, not on a vendor’s leaderboard, or even a public community leaderboard. Public benchmark scores are increasingly unreliable as measures of genuine out-of-sample skill because the data used in comparisons was also used in training. This “leakage” is a growing problem – see &lt;span class="citation" data-cites="meyer2025rethinking"&gt;Meyer et al. (2025)&lt;/span&gt; who found that of 401 datasets used across 22 published time-series foundation models, only 6% had never appeared in any model’s pre-training or fine-tuning corpus. Also, historical series that are not in the training data can be correlated with series that are in the training data due to being subject to the same environmental shocks (e.g., COVID). So even if there is not direct leakage, there can be indirect leakage induced by correlations. Therefore, these comparisons on historical data are not a great guide to what the models will do on new data.&lt;/p&gt;
&lt;p&gt;Third, weigh total cost, not just error metrics. Well-implemented statistical models (ETS, ARIMA, Theta, and simple combinations of these) are cheap, transparent, fast, and easy to explain. Foundation models bring inference cost, latency, hosting/vendor dependency, and limited interpretability. Even if the accuracy gain over a well-tuned statistical model is real, the operational cost may not be worth it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3.&amp;nbsp;What do current benchmarks fail to tell us about how these models will perform in real production settings?&lt;/strong&gt;&lt;/p&gt;
&lt;ol type="1"&gt;
&lt;li&gt;Public leaderboards report an aggregate score across many datasets and domains at once, which can hide wide variance in performance on the specific kind of series a given business actually needs to forecast.&lt;/li&gt;
&lt;li&gt;As noted above, they carry a real contamination risk which may render the benchmark unreliable.&lt;/li&gt;
&lt;li&gt;Benchmarks rarely report the things that determine whether a model is usable in production: inference latency at the volumes a business needs, hosting and total compute cost, robustness to structural breaks and regime changes, how the model handles exogenous variables and irregular/missing data, and how failures are detected and explained when they occur. A model that tops a MASE leaderboard by a small margin but takes an order of magnitude longer to run, or performs poorly on genuinely new data, may be the wrong choice operationally even if it’s the “best” model on paper.&lt;/li&gt;
&lt;/ol&gt;




&lt;div id="quarto-appendix" class="default"&gt;&lt;section class="quarto-appendix-contents" id="quarto-bibliography"&gt;&lt;h2 class="anchored quarto-appendix-heading"&gt;References&lt;/h2&gt;&lt;div id="refs" class="references csl-bib-body hanging-indent" data-entry-spacing="0"&gt;
&lt;div id="ref-Bergmeir2024llms" class="csl-entry"&gt;
Bergmeir, C. (2024). &lt;span&gt;LLMs&lt;/span&gt; and foundational models: Not (yet) as good as hoped. &lt;em&gt;Foresight: The International Journal of Applied Forecasting&lt;/em&gt;, &lt;em&gt;73&lt;/em&gt;, 33–38. &lt;a href="https://cbergmeir.com/papers/Bergmeir2024LLMs.pdf"&gt;https://cbergmeir.com/papers/Bergmeir2024LLMs.pdf&lt;/a&gt;
&lt;/div&gt;
&lt;div id="ref-fpppy" class="csl-entry"&gt;
Hyndman, R. J., Athanasopoulos, G., Garza, A., Challu, C., Mergenthaler, M., &amp;amp; Olivares, K. G. (2026). Ch 15. Foundation forecasting models. In &lt;em&gt;Forecasting: Principles and practice, the pythonic way&lt;/em&gt;. OTexts. &lt;a href="http://OTexts.com/fpppy/15-foundation-models.html"&gt;http://OTexts.com/fpppy/15-foundation-models.html&lt;/a&gt;
&lt;/div&gt;
&lt;div id="ref-meyer2025rethinking" class="csl-entry"&gt;
Meyer, M., Kaltenpoth, S., Zalipski, K., &amp;amp; Müller, O. (2025). &lt;em&gt;Rethinking evaluation in the era of time series foundation models:(un) known information leakage challenges&lt;/em&gt;. &lt;a href="https://arxiv.org/abs/2510.13654v3"&gt;https://arxiv.org/abs/2510.13654v3&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/section&gt;&lt;/div&gt; </description>
      <category>forecasting</category>
      <guid>https://robjhyndman.com/hyndsight/foundation_models.html</guid>
      <pubDate>Mon, 24 Aug 2026 14:00:00 GMT</pubDate>
      <content url="https://robjhyndman.com/files/cv1-1.png" medium="image" type="image/png" height="68" width="144"/>
    </item>
    <item>
      <title>Researcher portals</title>
      <link>https://robjhyndman.com/hyndsight/portals/</link>
      <description> 



&lt;div&gt;
  &lt;div class="description"&gt;
    I first wrote this post in 26 November 2011. Since then, some services have been discontinued, and new ones started. So I’ve updated it to reflect current offerings.
  &lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;/p&gt;


&lt;p&gt;A researcher portal is a website that attempts to list all the publications of a given researcher, and calculate citation statistics, etc. Every researcher wants their work read and cited, so these websites can be useful tools for getting your work noticed. Conversely, they can be a good way to find new work by researchers in your field.&lt;/p&gt;
&lt;section id="google-scholar-citations" class="level3"&gt;
&lt;h3 class="anchored" data-anchor-id="google-scholar-citations"&gt;Google Scholar Citations&lt;/h3&gt;
&lt;p&gt;&lt;a href="http://scholar.google.com"&gt;Google Scholar&lt;/a&gt; itself is an incredible resource covering journal articles, working papers, books, and almost everything else a scholar might cite. Google Scholar Citations uses Google Scholar data to provide information about all the outputs from a researcher. Some examples are &lt;a href="http://scholar.google.com.au/citations?user=SEOgduoAAAAJ&amp;amp;hl=en"&gt;Andrew Gelman&lt;/a&gt; and &lt;a href="https://scholar.google.com.au/citations?user=_b0uchgAAAAJ&amp;amp;hl=en"&gt;Di Cook&lt;/a&gt;. &lt;a href="http://scholar.google.com.au/citations?user=vamErfkAAAAJ&amp;amp;hl=en"&gt;My profile&lt;/a&gt; is also there. It provides a way of listing your publications, tracking citations to your publications, computing citation metrics, etc. There is very little work in setting up a profile. When I did it, Google had automatically identified all my publications, and it even listed one paper I had forgotten I had written!&lt;/p&gt;
&lt;div class="quarto-figure quarto-figure-center"&gt;
&lt;figure class="figure"&gt;
&lt;p&gt;&lt;img src="https://robjhyndman.com/hyndsight/portals/google_scholar.jpg" class="img-fluid figure-img"&gt;&lt;/p&gt;
&lt;figcaption&gt;My Google Scholar profile (September 2026).&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/div&gt;
&lt;p&gt;To see the profile of an existing researcher, just search for their name on Google Scholar. If they have made their profile public, it will appear at the top of the search results.&lt;/p&gt;
&lt;p&gt;To set up your profile, go to &lt;a href="http://scholar.google.com/citations"&gt;scholar.google.com/citations&lt;/a&gt;. You may have to do some editing of the results to merge versions of the same publication, or to correct some errors in the database. I wish Google would use the information provided by these edits to correct their Google Scholar database.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="semantic-scholar" class="level3"&gt;
&lt;h3 class="anchored" data-anchor-id="semantic-scholar"&gt;Semantic Scholar&lt;/h3&gt;
&lt;p&gt;An alternative to Google Scholar is &lt;a href="http://semanticscholar.org"&gt;Semantic Scholar&lt;/a&gt;. The coverage is not quite as broad as Google Scholar – it misses working papers unless they are on arXiv. On the other hand, there are some useful tools, including AI-generated summaries that are quite good. It is also easy to follow cited papers, and citing papers, along the citation tree. Related papers are also identified, so it is possible to explore further afield than just direct citations. You can follow individual authors, and set up alerts for new citations of specific papers. Citations are classified as “highly influential”, “background”, “methods”, “results”, etc., so you can easily filter papers that have had a big impact, those that apply new methods, etc. One interesting difference is that Semantic Scholar automatically creates personal author pages for each author, without needing each researcher to set them up. Mine is &lt;a href="https://www.semanticscholar.org/author/Rob-J-Hyndman/145211352"&gt;here&lt;/a&gt;. My h-index on Semantic Scholar is 75, compared to 92 on Google Scholar, reflecting the broader coverage of Google Scholar.&lt;/p&gt;
&lt;div class="quarto-figure quarto-figure-center"&gt;
&lt;figure class="figure"&gt;
&lt;p&gt;&lt;img src="https://robjhyndman.com/hyndsight/portals/semantic_scholar.jpg" class="img-fluid figure-img"&gt;&lt;/p&gt;
&lt;figcaption&gt;My Semantic Scholar author page (September 2026).&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/div&gt;
&lt;/section&gt;
&lt;section id="all-the-rest" class="level3"&gt;
&lt;h3 class="anchored" data-anchor-id="all-the-rest"&gt;All the rest&lt;/h3&gt;
&lt;p&gt;There are several other sites attempting to provide similar services, but none of them come close to Google Scholar or Semantic Scholar in useful features and usability. I’ve set up profiles on all of them, just to see how they work.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.webofscience.com/wos/author/record/A-2268-2008"&gt;Web of Science&lt;/a&gt; (previously called Researcher ID): lists 234 of my publications, and gives my h-index as 61. This tends to miss books, R packages, working papers and book chapters, but has most of my journal articles. Links to online versions of the papers are provided. The “Clarivate Highly Cited” Awards are based on these citations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://www.researchgate.net/profile/Rob_Hyndman/"&gt;ResearchGate&lt;/a&gt;: lists 364 of my publications (so there must be some double counting). I used to get a lot of unsolicited mail from this site, but that seems to have stopped. In any case, it does nothing that the other sites don’t do better.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://monash.academia.edu/robjhyndman"&gt;Academia.edu&lt;/a&gt;: wants me to sign up for a premium account to do anything more than the basic. I had to block all the emails I was receiving from this site. Not interested.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="recommendations" class="level3"&gt;
&lt;h3 class="anchored" data-anchor-id="recommendations"&gt;Recommendations&lt;/h3&gt;
&lt;ol type="1"&gt;
&lt;li&gt;&lt;p&gt;Ignore the emails from ResearcherID, ResearchGate, Academia.edu, etc. Just hit delete and block them.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Set up a page on &lt;a href="http://scholar.google.com/citations"&gt;Google Scholar Citations&lt;/a&gt;. It’s not much work and makes your work more visible. It also allows you to track citations which are useful if you apply for promotion.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Try &lt;a href="https://semanticscholar.org"&gt;Semantic Scholar&lt;/a&gt;. You might find it helpful.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Check that your &lt;a href="https://semanticscholar.org"&gt;Semantic Scholar&lt;/a&gt; author page is accurate. Spend 10 minutes editing your profile so it gives a little more information about you.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;/section&gt;

 </description>
      <category>computing</category>
      <category>journals</category>
      <category>organization</category>
      <category>productivity</category>
      <category>references</category>
      <guid>https://robjhyndman.com/hyndsight/portals/</guid>
      <pubDate>Sun, 02 Aug 2026 14:00:00 GMT</pubDate>
      <content url="https://robjhyndman.com/img/thumbs/scholar_profile.jpg" medium="image" type="image/jpeg"/>
    </item>
    <item>
      <title>Mathematical genealogy</title>
      <link>https://robjhyndman.com/hyndsight/mathematical-genealogy/</link>
      <description> 





&lt;p&gt;Having a PhD student is like having a child. I have had many such “children” graduate, and have another two “on the way”. (See &lt;a href="../../research-team"&gt;here&lt;/a&gt; for my offspring.)&lt;/p&gt;
&lt;p&gt;Going in the other direction, here is my family tree, compiled from the &lt;a href="https://www.mathgenealogy.org"&gt;Mathematics Genealogy Project&lt;/a&gt; (MGP). Each person advised the one below them. Hover over a portrait (or tap it) to see who they were.&lt;/p&gt;
&lt;p&gt;Many people have two or more advisors, so there are multiple “lines of ascent” (as there are with regular family trees). I am showing two of many possible ancestry lines here, which happened to reconnect in the 1600s.&lt;/p&gt;
&lt;style&gt;
.gen {
  --gen-fig: 56px;
  --gen-rail: 27px;      /* centre of the portrait, minus the 2px rail width */
  --gen-gap: 2rem;
  --gen-line: rgba(128,128,128,.45);
  --gen-line: color-mix(in srgb, currentColor 30%, transparent);
  --gen-pop-bg: var(--bs-body-bg, #fff);
  --gen-pop-fg: var(--bs-body-color, inherit);
  margin: 2rem 0 1rem;
  font-size: .95rem;
}

/* ---- rows ---------------------------------------------------------- */
.gen ol { list-style: none; margin: 0; padding: 0; }
.gen-chain { position: relative; }
.gen-chain::before {                       /* the vertical rail */
  content: ""; position: absolute; z-index: 0;
  left: var(--gen-rail); top: 0; bottom: 0; width: 2px;
  background: var(--gen-line);
}
.gen-row {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: .7rem;
  padding: 3px 0;
}
.gen-row:hover, .gen-row:focus-within { z-index: 2; }
.gen-row--spacer { height: calc(var(--gen-fig) + 6px); }
.gen-node {
  display: flex; align-items: center; gap: .7rem;
  border: 0; background: none; padding: 0; margin: 0;
  font: inherit; color: inherit; text-align: left; cursor: help;
}
.gen-node:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 4px; }

.gen-fig {
  position: relative; flex: 0 0 auto;
  width: var(--gen-fig); height: var(--gen-fig);
  border-radius: 50%; overflow: hidden;
  background: var(--gen-line);
  display: grid; place-items: center;
}
.gen-fig::after {                          /* initials, shown if the photo is missing */
  content: attr(data-initials);
  font-size: .8rem; font-weight: 600; letter-spacing: .02em; opacity: .8;
}
.gen-fig img {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
  margin: 0;
}
.gen-name { font-weight: 600; line-height: 1.2; }
.gen-meta { display: block; font-size: .78rem; font-style: italic; opacity: .75; }

/* ---- pop-ups ------------------------------------------------------- */
.gen-pop {
  position: absolute; z-index: 30; top: -4px; left: calc(var(--gen-fig) + 1rem);
  width: min(24rem, 46vw);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .12s ease, transform .12s ease;
  background: var(--gen-pop-bg); color: var(--gen-pop-fg);
  border: 1px solid var(--gen-line); border-radius: 6px;
  padding: .7rem .85rem; font-size: .82rem; line-height: 1.45;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.gen-pop p { margin: 0 0 .45rem; }
.gen-pop p:last-child { margin-bottom: 0; }
.gen-pop .gen-caveat { opacity: .8; font-size: .95em; }
.gen-pop .gen-inset {
  float: right; width: 64px; margin: 0 0 .4rem .6rem; border-radius: 3px;
}
.gen-pop-head {
  --gen-fig: 34px;
  display: flex; align-items: center; gap: .6rem;
  margin: -.7rem -.85rem .6rem; padding: .6rem .85rem;
  border-bottom: 1px solid var(--gen-line);
}
.gen-pop-head .gen-name { font-size: .95rem; }
.gen-pop-head .gen-meta { font-size: .72rem; }
.gen-branch--right .gen-pop { left: auto; right: calc(var(--gen-fig) + 1rem); }
.gen-row:hover .gen-pop,
.gen-row:focus-within .gen-pop { opacity: 1; visibility: visible; transform: none; }

/* ---- fork and merge ------------------------------------------------ */
.gen-branches { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gen-gap); }
.gen-join { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gen-gap); height: 1.4rem; }
.gen-join &gt; span { position: relative; }
.gen-join &gt; span::before {                 /* the two legs */
  content: ""; position: absolute; left: var(--gen-rail); top: 0; bottom: 0;
  width: 2px; background: var(--gen-line);
}
.gen-join--fork &gt; span:first-child::after,
.gen-join--merge &gt; span:first-child::after {   /* the crossbar */
  content: ""; position: absolute; left: var(--gen-rail);
  width: calc(100% + var(--gen-gap)); height: 2px; background: var(--gen-line);
}
.gen-join--fork  &gt; span:first-child::after { top: 0; }
.gen-join--merge &gt; span:first-child::after { bottom: 0; }
.gen-join--merge &gt; span:last-child::before { bottom: 2px; }

.gen-label {
  font-size: .75rem; text-transform: uppercase; letter-spacing: .06em;
  opacity: .6; margin: 0 0 .35rem calc(var(--gen-fig) + .7rem);
}
.gen-caption { font-size: .8rem; opacity: .75; margin: .6rem 0 0; }

/* ---- narrow screens ------------------------------------------------ */
@media (max-width: 700px) {
  .gen-branches { grid-template-columns: 1fr; gap: 0; }
  .gen-join, .gen-join--fork, .gen-join--merge { display: none; }
  .gen-branch + .gen-branch { margin-top: 1.5rem; }
  .gen-pop {
    position: static; width: auto; display: none; opacity: 1; visibility: visible;
    transform: none; margin: .4rem 0 .4rem calc(var(--gen-fig) + .7rem);
    box-shadow: none;
  }
  .gen-row { flex-wrap: wrap; }
  .gen-row:hover .gen-pop, .gen-row:focus-within .gen-pop { display: block; }
  .gen-branch--right .gen-pop { right: auto; }
  .gen-pop-head { display: none; }
  .gen-row--spacer { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .gen-pop { transition: none; }
}
&lt;/style&gt;

&lt;div class="gen"&gt;

&lt;!-- ============ shared root ============ --&gt;
&lt;ol class="gen-chain"&gt;
  &lt;li class="gen-row"&gt;
    &lt;button type="button" class="gen-node"&gt;
      &lt;span class="gen-fig" data-initials="JT"&gt;&lt;img src="https://robjhyndman.com/genealogy/thomasius.jpg" alt="Jakob Thomasius"&gt;&lt;/span&gt;
      &lt;span class="gen-name"&gt;Jakob Thomasius&lt;span class="gen-meta"&gt;Universität Leipzig, 1643&lt;/span&gt;&lt;/span&gt;
    &lt;/button&gt;
    &lt;span class="gen-pop"&gt;
      &lt;span class="gen-pop-head"&gt;&lt;span class="gen-fig" data-initials="JT"&gt;&lt;img src="https://robjhyndman.com/genealogy/thomasius.jpg" alt="Jakob Thomasius"&gt;&lt;/span&gt;&lt;span class="gen-name"&gt;Jakob Thomasius&lt;span class="gen-meta"&gt;Universität Leipzig, 1643&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
      &lt;p&gt;B. 1622, Leipzig. D. 1684, Leipzig.&lt;/p&gt;
      &lt;p&gt;Philosopher and philologist at Leipzig, and the teacher both branches share. He supervised Leibniz's 1666 philosophy degree and Otto Mencke's 1665 thesis, which is where the two lines below separate.&lt;/p&gt;
      &lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Jakob_Thomasius"&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;
    &lt;/span&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;div class="gen-join gen-join--fork"&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;

&lt;!-- ============ the two branches ============ --&gt;
&lt;div class="gen-branches"&gt;

&lt;!-- ---------- left branch: through Adrian Raftery ---------- --&gt;
&lt;div class="gen-branch gen-branch--left"&gt;
&lt;ol class="gen-chain"&gt;

  &lt;li class="gen-row"&gt;
    &lt;button type="button" class="gen-node"&gt;
      &lt;span class="gen-fig" data-initials="GL"&gt;&lt;img src="https://robjhyndman.com/genealogy/leibniz.jpg" alt="Gottfried Leibniz"&gt;&lt;/span&gt;
      &lt;span class="gen-name"&gt;Gottfried Leibniz&lt;span class="gen-meta"&gt;Dr. jur. Universität Altdorf, 1667&lt;/span&gt;&lt;/span&gt;
    &lt;/button&gt;
    &lt;span class="gen-pop"&gt;
      &lt;span class="gen-pop-head"&gt;&lt;span class="gen-fig" data-initials="GL"&gt;&lt;img src="https://robjhyndman.com/genealogy/leibniz.jpg" alt="Gottfried Leibniz"&gt;&lt;/span&gt;&lt;span class="gen-name"&gt;Gottfried Leibniz&lt;span class="gen-meta"&gt;Dr. jur. Universität Altdorf, 1667&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
      &lt;img class="gen-inset" src="https://robjhyndman.com/genealogy/weigel.jpg" alt="Erhard Weigel"&gt;
      &lt;p&gt;B. 1646, Leipzig. D. 1716, Hanover.&lt;/p&gt;
      &lt;p&gt;German philosopher, mathematician and logician, best known for inventing calculus independently of Newton.&lt;/p&gt;
      &lt;p class="gen-caveat"&gt;His other advisors were Erhard Weigel at Jena (pictured, professor of mathematics there from 1653), Bartholomäus Schwendendörffer at Altdorf, and Christiaan Huygens in Paris.&lt;/p&gt;
      &lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Gottfried_Wilhelm_Leibniz"&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;
    &lt;/span&gt;
  &lt;/li&gt;

  &lt;li class="gen-row"&gt;
    &lt;button type="button" class="gen-node"&gt;
      &lt;span class="gen-fig" data-initials="NM"&gt;&lt;img src="https://robjhyndman.com/genealogy/malebranche.jpg" alt="Nicolas Malebranche"&gt;&lt;/span&gt;
      &lt;span class="gen-name"&gt;Nicolas Malebranche&lt;span class="gen-meta"&gt;Oratoire de France, Paris&lt;/span&gt;&lt;/span&gt;
    &lt;/button&gt;
    &lt;span class="gen-pop"&gt;
      &lt;span class="gen-pop-head"&gt;&lt;span class="gen-fig" data-initials="NM"&gt;&lt;img src="https://robjhyndman.com/genealogy/malebranche.jpg" alt="Nicolas Malebranche"&gt;&lt;/span&gt;&lt;span class="gen-name"&gt;Nicolas Malebranche&lt;span class="gen-meta"&gt;Oratoire de France, Paris&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
      &lt;p&gt;B. 1638, Paris. D. 1715, Paris.&lt;/p&gt;
      &lt;p&gt;Oratorian priest and Cartesian philosopher, author of &lt;em&gt;De la recherche de la vérité&lt;/em&gt; (1674). He came to mathematics late, after reading Descartes, and his Paris circle carried the new calculus into France.&lt;/p&gt;
      &lt;p class="gen-caveat"&gt;The MGP records his link to Leibniz to mark intellectual descent, not an actual supervision, so treat this edge as a courtesy.&lt;/p&gt;
      &lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Nicolas_Malebranche"&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;
    &lt;/span&gt;
  &lt;/li&gt;

  &lt;li class="gen-row"&gt;
    &lt;button type="button" class="gen-node"&gt;
      &lt;span class="gen-fig" data-initials="JB"&gt;&lt;img src="https://robjhyndman.com/genealogy/jabernoulli.jpg" alt="Jacob Bernoulli"&gt;&lt;/span&gt;
      &lt;span class="gen-name"&gt;Jacob Bernoulli&lt;span class="gen-meta"&gt;Dr. hab. Universität Basel, 1684&lt;/span&gt;&lt;/span&gt;
    &lt;/button&gt;
    &lt;span class="gen-pop"&gt;
      &lt;span class="gen-pop-head"&gt;&lt;span class="gen-fig" data-initials="JB"&gt;&lt;img src="https://robjhyndman.com/genealogy/jabernoulli.jpg" alt="Jacob Bernoulli"&gt;&lt;/span&gt;&lt;span class="gen-name"&gt;Jacob Bernoulli&lt;span class="gen-meta"&gt;Dr. hab. Universität Basel, 1684&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
      &lt;p&gt;B. 1654, Basel. D. 1705, Basel.&lt;/p&gt;
      &lt;p&gt;One of the famous Bernoulli family. His contributions include the law of large numbers in probability theory and work on the convergence of infinite series.&lt;/p&gt;
      &lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Jacob_Bernoulli"&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;
    &lt;/span&gt;
  &lt;/li&gt;

  &lt;li class="gen-row"&gt;
    &lt;button type="button" class="gen-node"&gt;
      &lt;span class="gen-fig" data-initials="JB"&gt;&lt;img src="https://robjhyndman.com/genealogy/jobernoulli.jpg" alt="Johann Bernoulli"&gt;&lt;/span&gt;
      &lt;span class="gen-name"&gt;Johann Bernoulli&lt;span class="gen-meta"&gt;Universität Basel, 1690, 1694&lt;/span&gt;&lt;/span&gt;
    &lt;/button&gt;
    &lt;span class="gen-pop"&gt;
      &lt;span class="gen-pop-head"&gt;&lt;span class="gen-fig" data-initials="JB"&gt;&lt;img src="https://robjhyndman.com/genealogy/jobernoulli.jpg" alt="Johann Bernoulli"&gt;&lt;/span&gt;&lt;span class="gen-name"&gt;Johann Bernoulli&lt;span class="gen-meta"&gt;Universität Basel, 1690, 1694&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
      &lt;p&gt;B. 1667, Basel. D. 1748, Basel.&lt;/p&gt;
      &lt;p&gt;Jacob's brother, elected a fellow of the academies of Paris, Berlin, London, St Petersburg and Bologna. Known as the "Archimedes of his age", he solved the catenary problem (alongside Leibniz and Huygens), and the rule for limits of functions commonly attributed to his student de l'Hôpital is his.&lt;/p&gt;
      &lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Johann_Bernoulli"&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;
    &lt;/span&gt;
  &lt;/li&gt;

  &lt;li class="gen-row"&gt;
    &lt;button type="button" class="gen-node"&gt;
      &lt;span class="gen-fig" data-initials="LE"&gt;&lt;img src="https://robjhyndman.com/genealogy/euler.jpg" alt="Leonhard Euler"&gt;&lt;/span&gt;
      &lt;span class="gen-name"&gt;Leonhard Euler&lt;span class="gen-meta"&gt;Universität Basel, 1726&lt;/span&gt;&lt;/span&gt;
    &lt;/button&gt;
    &lt;span class="gen-pop"&gt;
      &lt;span class="gen-pop-head"&gt;&lt;span class="gen-fig" data-initials="LE"&gt;&lt;img src="https://robjhyndman.com/genealogy/euler.jpg" alt="Leonhard Euler"&gt;&lt;/span&gt;&lt;span class="gen-name"&gt;Leonhard Euler&lt;span class="gen-meta"&gt;Universität Basel, 1726&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
      &lt;p&gt;B. 1707, Basel. D. 1783, St Petersburg.&lt;/p&gt;
      &lt;p&gt;One of the most prolific mathematicians in history, with over 800 papers covering every branch of mathematics known in his day, an influential series of calculus textbooks, and books on a dozen other fields.&lt;/p&gt;
      &lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Leonhard_Euler"&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;
    &lt;/span&gt;
  &lt;/li&gt;

  &lt;li class="gen-row"&gt;
    &lt;button type="button" class="gen-node"&gt;
      &lt;span class="gen-fig" data-initials="JL"&gt;&lt;img src="https://robjhyndman.com/genealogy/lagrange.jpg" alt="Joseph Lagrange"&gt;&lt;/span&gt;
      &lt;span class="gen-name"&gt;Joseph Lagrange&lt;span class="gen-meta"&gt;Università di Torino, 1754&lt;/span&gt;&lt;/span&gt;
    &lt;/button&gt;
    &lt;span class="gen-pop"&gt;
      &lt;span class="gen-pop-head"&gt;&lt;span class="gen-fig" data-initials="JL"&gt;&lt;img src="https://robjhyndman.com/genealogy/lagrange.jpg" alt="Joseph Lagrange"&gt;&lt;/span&gt;&lt;span class="gen-name"&gt;Joseph Lagrange&lt;span class="gen-meta"&gt;Università di Torino, 1754&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
      &lt;p&gt;B. 1736, Turin. D. 1813, Paris.&lt;/p&gt;
      &lt;p&gt;Developed the theory of differential equations and produced many new results in number theory. His earlier work on permutations of the roots of polynomial equations is now seen as a forerunner of group theory, and he is remembered in the Lagrange multiplier.&lt;/p&gt;
      &lt;p class="gen-caveat"&gt;Lagrange was never Euler's student in any formal sense. The MGP lists the relationship as "epistolary correspondence" on the calculus of variations.&lt;/p&gt;
      &lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Joseph-Louis_Lagrange"&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;
    &lt;/span&gt;
  &lt;/li&gt;

  &lt;li class="gen-row"&gt;
    &lt;button type="button" class="gen-node"&gt;
      &lt;span class="gen-fig" data-initials="SP"&gt;&lt;img src="https://robjhyndman.com/genealogy/poisson.jpg" alt="Siméon Poisson"&gt;&lt;/span&gt;
      &lt;span class="gen-name"&gt;Siméon Poisson&lt;span class="gen-meta"&gt;École Polytechnique, 1800&lt;/span&gt;&lt;/span&gt;
    &lt;/button&gt;
    &lt;span class="gen-pop"&gt;
      &lt;span class="gen-pop-head"&gt;&lt;span class="gen-fig" data-initials="SP"&gt;&lt;img src="https://robjhyndman.com/genealogy/poisson.jpg" alt="Siméon Poisson"&gt;&lt;/span&gt;&lt;span class="gen-name"&gt;Siméon Poisson&lt;span class="gen-meta"&gt;École Polytechnique, 1800&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
      &lt;p&gt;B. 1781, Pithiviers. D. 1840, Sceaux.&lt;/p&gt;
      &lt;p&gt;"Life is only good for two things: to do mathematics and to teach it." Best known for his work on probability, including the Poisson distribution. Laplace was his second advisor.&lt;/p&gt;
      &lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Siméon_Denis_Poisson"&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;
    &lt;/span&gt;
  &lt;/li&gt;

  &lt;li class="gen-row"&gt;
    &lt;button type="button" class="gen-node"&gt;
      &lt;span class="gen-fig" data-initials="MC"&gt;&lt;img src="https://robjhyndman.com/genealogy/chasles.jpg" alt="Michel Chasles"&gt;&lt;/span&gt;
      &lt;span class="gen-name"&gt;Michel Chasles&lt;span class="gen-meta"&gt;École Polytechnique, 1814&lt;/span&gt;&lt;/span&gt;
    &lt;/button&gt;
    &lt;span class="gen-pop"&gt;
      &lt;span class="gen-pop-head"&gt;&lt;span class="gen-fig" data-initials="MC"&gt;&lt;img src="https://robjhyndman.com/genealogy/chasles.jpg" alt="Michel Chasles"&gt;&lt;/span&gt;&lt;span class="gen-name"&gt;Michel Chasles&lt;span class="gen-meta"&gt;École Polytechnique, 1814&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
      &lt;p&gt;B. 1793, Épernon. D. 1880, Paris.&lt;/p&gt;
      &lt;p&gt;Worked on projective and enumerative geometry, and wrote a history of geometric method that shaped how the subject was taught. The Chasles relation for directed segments is his.&lt;/p&gt;
      &lt;p class="gen-caveat"&gt;Late in life he spent a fortune on thousands of forged letters purportedly from Pascal, Newton and Galileo, and defended their authenticity for years before the forger was tried and convicted.&lt;/p&gt;
      &lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Michel_Chasles"&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;
    &lt;/span&gt;
  &lt;/li&gt;

  &lt;li class="gen-row"&gt;
    &lt;button type="button" class="gen-node"&gt;
      &lt;span class="gen-fig" data-initials="GD"&gt;&lt;img src="https://robjhyndman.com/genealogy/darboux.jpg" alt="Gaston Darboux"&gt;&lt;/span&gt;
      &lt;span class="gen-name"&gt;Gaston Darboux&lt;span class="gen-meta"&gt;Université de Paris, 1866&lt;/span&gt;&lt;/span&gt;
    &lt;/button&gt;
    &lt;span class="gen-pop"&gt;
      &lt;span class="gen-pop-head"&gt;&lt;span class="gen-fig" data-initials="GD"&gt;&lt;img src="https://robjhyndman.com/genealogy/darboux.jpg" alt="Gaston Darboux"&gt;&lt;/span&gt;&lt;span class="gen-name"&gt;Gaston Darboux&lt;span class="gen-meta"&gt;Université de Paris, 1866&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
      &lt;p&gt;B. 1842, Nîmes. D. 1917, Paris.&lt;/p&gt;
      &lt;p&gt;Geometer at the Sorbonne who reshaped the differential geometry of surfaces. Anyone who has taught introductory analysis knows him through Darboux sums and the Darboux integral.&lt;/p&gt;
      &lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Jean_Gaston_Darboux"&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;
    &lt;/span&gt;
  &lt;/li&gt;

  &lt;li class="gen-row"&gt;
    &lt;button type="button" class="gen-node"&gt;
      &lt;span class="gen-fig" data-initials="ÉG"&gt;&lt;img src="https://robjhyndman.com/genealogy/goursat.jpg" alt="Édouard Goursat"&gt;&lt;/span&gt;
      &lt;span class="gen-name"&gt;Édouard Goursat&lt;span class="gen-meta"&gt;Université de Paris, 1881&lt;/span&gt;&lt;/span&gt;
    &lt;/button&gt;
    &lt;span class="gen-pop"&gt;
      &lt;span class="gen-pop-head"&gt;&lt;span class="gen-fig" data-initials="ÉG"&gt;&lt;img src="https://robjhyndman.com/genealogy/goursat.jpg" alt="Édouard Goursat"&gt;&lt;/span&gt;&lt;span class="gen-name"&gt;Édouard Goursat&lt;span class="gen-meta"&gt;Université de Paris, 1881&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
      &lt;p&gt;B. 1858, Lanzac. D. 1936, Paris.&lt;/p&gt;
      &lt;p&gt;Sharpened Cauchy's integral theorem by dropping the continuity assumption on the derivative, giving the Cauchy–Goursat theorem. His three-volume &lt;em&gt;Cours d'analyse mathématique&lt;/em&gt; trained a generation of French analysts.&lt;/p&gt;
      &lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Édouard_Goursat"&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;
    &lt;/span&gt;
  &lt;/li&gt;

  &lt;li class="gen-row"&gt;
    &lt;button type="button" class="gen-node"&gt;
      &lt;span class="gen-fig" data-initials="GD"&gt;&lt;img src="https://robjhyndman.com/genealogy/darmois.png" alt="Georges Darmois"&gt;&lt;/span&gt;
      &lt;span class="gen-name"&gt;Georges Darmois&lt;span class="gen-meta"&gt;Université de Paris, 1921&lt;/span&gt;&lt;/span&gt;
    &lt;/button&gt;
    &lt;span class="gen-pop"&gt;
      &lt;span class="gen-pop-head"&gt;&lt;span class="gen-fig" data-initials="GD"&gt;&lt;img src="https://robjhyndman.com/genealogy/darmois.png" alt="Georges Darmois"&gt;&lt;/span&gt;&lt;span class="gen-name"&gt;Georges Darmois&lt;span class="gen-meta"&gt;Université de Paris, 1921&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
      &lt;p&gt;B. 1888, Éply. D. 1960, Paris.&lt;/p&gt;
      &lt;p&gt;Started in differential geometry, then turned to statistics, joining the Institut de Statistique de l'Université de Paris (founded by Émile Borel) in 1925 and later becoming its second director. The first statistician in my line: the Darmois–Koopman–Pitman theorem characterises the exponential family, and the Darmois–Skitovich theorem characterises the normal distribution.&lt;/p&gt;
      &lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Georges_Darmois"&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;
    &lt;/span&gt;
  &lt;/li&gt;

  &lt;li class="gen-row"&gt;
    &lt;button type="button" class="gen-node"&gt;
      &lt;span class="gen-fig" data-initials="DD"&gt;&lt;img src="https://robjhyndman.com/genealogy/dugue.jpg" alt="Daniel Dugué"&gt;&lt;/span&gt;
      &lt;span class="gen-name"&gt;Daniel Dugué&lt;span class="gen-meta"&gt;Université de Paris, 1937&lt;/span&gt;&lt;/span&gt;
    &lt;/button&gt;
    &lt;span class="gen-pop"&gt;
      &lt;span class="gen-pop-head"&gt;&lt;span class="gen-fig" data-initials="DD"&gt;&lt;img src="https://robjhyndman.com/genealogy/dugue.jpg" alt="Daniel Dugué"&gt;&lt;/span&gt;&lt;span class="gen-name"&gt;Daniel Dugué&lt;span class="gen-meta"&gt;Université de Paris, 1937&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
      &lt;p&gt;B. 1912. D. 1987.&lt;/p&gt;
      &lt;p&gt;French probabilist who worked on estimation theory and characteristic functions, and who succeeded Darmois in directing the Paris statistics institute.&lt;/p&gt;
      &lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Daniel_Dugué"&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;
    &lt;/span&gt;
  &lt;/li&gt;

  &lt;li class="gen-row"&gt;
    &lt;button type="button" class="gen-node"&gt;
      &lt;span class="gen-fig" data-initials="PD"&gt;&lt;img src="https://robjhyndman.com/genealogy/deheuvels.jpg" alt="Paul Deheuvels"&gt;&lt;/span&gt;
      &lt;span class="gen-name"&gt;Paul Deheuvels&lt;span class="gen-meta"&gt;Université Paris VI, 1974&lt;/span&gt;&lt;/span&gt;
    &lt;/button&gt;
    &lt;span class="gen-pop"&gt;
      &lt;span class="gen-pop-head"&gt;&lt;span class="gen-fig" data-initials="PD"&gt;&lt;img src="https://robjhyndman.com/genealogy/deheuvels.jpg" alt="Paul Deheuvels"&gt;&lt;/span&gt;&lt;span class="gen-name"&gt;Paul Deheuvels&lt;span class="gen-meta"&gt;Université Paris VI, 1974&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
      &lt;p&gt;B. 1948. D. 2026&lt;/p&gt;
      &lt;p&gt;Works on empirical processes, extreme value theory and dependence. His 1979 paper on the empirical dependence function, building on related work by Rüschendorf a few years earlier, gave the empirical copula used in dependence modelling today its lasting form. Elected to the Académie des Sciences.&lt;/p&gt;
      &lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Paul_Deheuvels"&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;
    &lt;/span&gt;
  &lt;/li&gt;

  &lt;li class="gen-row"&gt;
    &lt;button type="button" class="gen-node"&gt;
      &lt;span class="gen-fig" data-initials="AR"&gt;&lt;img src="https://robjhyndman.com/genealogy/raftery.jpg" alt="Adrian Raftery"&gt;&lt;/span&gt;
      &lt;span class="gen-name"&gt;Adrian Raftery&lt;span class="gen-meta"&gt;Université Paris VI, 1980&lt;/span&gt;&lt;/span&gt;
    &lt;/button&gt;
    &lt;span class="gen-pop"&gt;
      &lt;span class="gen-pop-head"&gt;&lt;span class="gen-fig" data-initials="AR"&gt;&lt;img src="https://robjhyndman.com/genealogy/raftery.jpg" alt="Adrian Raftery"&gt;&lt;/span&gt;&lt;span class="gen-name"&gt;Adrian Raftery&lt;span class="gen-meta"&gt;Université Paris VI, 1980&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
      &lt;p&gt;B. 1955, Dublin.&lt;/p&gt;
      &lt;p&gt;Bayesian model averaging, model-based clustering, and the probabilistic population projections the United Nations now uses. Professor of Statistics and Sociology at the University of Washington.&lt;/p&gt;
      &lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Adrian_Raftery"&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;
    &lt;/span&gt;
  &lt;/li&gt;

&lt;/ol&gt;
&lt;/div&gt;

&lt;!-- ---------- right branch: through Peter Guttorp ---------- --&gt;
&lt;div class="gen-branch gen-branch--right"&gt;
&lt;ol class="gen-chain"&gt;

  

  &lt;li class="gen-row"&gt;
    &lt;button type="button" class="gen-node"&gt;
      &lt;span class="gen-fig" data-initials="OM"&gt;&lt;img src="https://robjhyndman.com/genealogy/mencke.jpg" alt="Otto Mencke"&gt;&lt;/span&gt;
      &lt;span class="gen-name"&gt;Otto Mencke&lt;span class="gen-meta"&gt;Universität Leipzig, 1665&lt;/span&gt;&lt;/span&gt;
    &lt;/button&gt;
    &lt;span class="gen-pop"&gt;
      &lt;span class="gen-pop-head"&gt;&lt;span class="gen-fig" data-initials="OM"&gt;&lt;img src="https://robjhyndman.com/genealogy/mencke.jpg" alt="Otto Mencke"&gt;&lt;/span&gt;&lt;span class="gen-name"&gt;Otto Mencke&lt;span class="gen-meta"&gt;Universität Leipzig, 1665&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
      &lt;p&gt;B. 1644, Oldenburg. D. 1707, Leipzig.&lt;/p&gt;
      &lt;p&gt;Professor of moral philosophy at Leipzig, and founder in 1682 of &lt;em&gt;Acta Eruditorum&lt;/em&gt;, the first learned journal in Germany. Leibniz published much of his calculus there.&lt;/p&gt;
      &lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Otto_Mencke"&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;
    &lt;/span&gt;
  &lt;/li&gt;

  &lt;li class="gen-row"&gt;
    &lt;button type="button" class="gen-node"&gt;
      &lt;span class="gen-fig" data-initials="JW"&gt;&lt;img src="https://robjhyndman.com/genealogy/wichmannshausen.jpg" alt="Johann Christoph Wichmannshausen"&gt;&lt;/span&gt;
      &lt;span class="gen-name"&gt;J. C. Wichmannshausen&lt;span class="gen-meta"&gt;M.A. Universität Leipzig, 1685&lt;/span&gt;&lt;/span&gt;
    &lt;/button&gt;
    &lt;span class="gen-pop"&gt;
      &lt;span class="gen-pop-head"&gt;&lt;span class="gen-fig" data-initials="JW"&gt;&lt;img src="https://robjhyndman.com/genealogy/wichmannshausen.jpg" alt="Johann Christoph Wichmannshausen"&gt;&lt;/span&gt;&lt;span class="gen-name"&gt;J. C. Wichmannshausen&lt;span class="gen-meta"&gt;M.A. Universität Leipzig, 1685&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
      &lt;p&gt;B. 1663, Ilsenburg. D. 1727, Wittenberg.&lt;/p&gt;
      &lt;p&gt;Orientalist and professor at Wittenberg, and Mencke's son-in-law. His dissertation was on divorce under natural law, which makes him the least mathematical of my ancestors.&lt;/p&gt;
      &lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Johann_Christoph_Wichmannshausen"&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;
    &lt;/span&gt;
  &lt;/li&gt;

  &lt;li class="gen-row"&gt;
    &lt;button type="button" class="gen-node"&gt;
      &lt;span class="gen-fig" data-initials="CH"&gt;&lt;img src="https://robjhyndman.com/genealogy/hausen.jpg" alt="Christian August Hausen"&gt;&lt;/span&gt;
      &lt;span class="gen-name"&gt;Christian August Hausen&lt;span class="gen-meta"&gt;Universität Halle-Wittenberg, 1713&lt;/span&gt;&lt;/span&gt;
    &lt;/button&gt;
    &lt;span class="gen-pop"&gt;
      &lt;span class="gen-pop-head"&gt;&lt;span class="gen-fig" data-initials="CH"&gt;&lt;img src="https://robjhyndman.com/genealogy/hausen.jpg" alt="Christian August Hausen"&gt;&lt;/span&gt;&lt;span class="gen-name"&gt;Christian August Hausen&lt;span class="gen-meta"&gt;Universität Halle-Wittenberg, 1713&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
      &lt;p&gt;B. 1693, Dresden. D. 1743, Leipzig.&lt;/p&gt;
      &lt;p&gt;Professor of mathematics at Leipzig. He built one of the early electrostatic friction machines and studied the sparks it produced.&lt;/p&gt;
      &lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Christian_August_Hausen"&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;
    &lt;/span&gt;
  &lt;/li&gt;

  &lt;li class="gen-row"&gt;
    &lt;button type="button" class="gen-node"&gt;
      &lt;span class="gen-fig" data-initials="AK"&gt;&lt;img src="https://robjhyndman.com/genealogy/kastner.jpg" alt="Abraham Gotthelf Kästner"&gt;&lt;/span&gt;
      &lt;span class="gen-name"&gt;A. G. Kästner&lt;span class="gen-meta"&gt;Universität Leipzig, 1739&lt;/span&gt;&lt;/span&gt;
    &lt;/button&gt;
    &lt;span class="gen-pop"&gt;
      &lt;span class="gen-pop-head"&gt;&lt;span class="gen-fig" data-initials="AK"&gt;&lt;img src="https://robjhyndman.com/genealogy/kastner.jpg" alt="Abraham Gotthelf Kästner"&gt;&lt;/span&gt;&lt;span class="gen-name"&gt;A. G. Kästner&lt;span class="gen-meta"&gt;Universität Leipzig, 1739&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
      &lt;p&gt;B. 1719, Leipzig. D. 1800, Göttingen.&lt;/p&gt;
      &lt;p&gt;Professor at Göttingen, prolific textbook writer, historian of mathematics, and a well-known writer of epigrams. Gauss studied at Göttingen during Kästner's time there, though he reportedly found Kästner's lectures too elementary to attend.&lt;/p&gt;
      &lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Abraham_Gotthelf_Kästner"&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;
    &lt;/span&gt;
  &lt;/li&gt;

  &lt;li class="gen-row"&gt;
    &lt;button type="button" class="gen-node"&gt;
      &lt;span class="gen-fig" data-initials="JM"&gt;&lt;img src="https://robjhyndman.com/genealogy/mayer.jpg" alt="Johann Tobias Mayer"&gt;&lt;/span&gt;
      &lt;span class="gen-name"&gt;Johann Tobias Mayer&lt;span class="gen-meta"&gt;Universität Göttingen, 1773&lt;/span&gt;&lt;/span&gt;
    &lt;/button&gt;
    &lt;span class="gen-pop"&gt;
      &lt;span class="gen-pop-head"&gt;&lt;span class="gen-fig" data-initials="JM"&gt;&lt;img src="https://robjhyndman.com/genealogy/mayer.jpg" alt="Johann Tobias Mayer"&gt;&lt;/span&gt;&lt;span class="gen-name"&gt;Johann Tobias Mayer&lt;span class="gen-meta"&gt;Universität Göttingen, 1773&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
      &lt;p&gt;B. 1752, Göttingen. D. 1830, Göttingen.&lt;/p&gt;
      &lt;p&gt;Physicist and mathematician at Göttingen, and son of the astronomer Tobias Mayer. He wrote on geometry and on the design of angle-measuring instruments.&lt;/p&gt;
      &lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Johann_Tobias_Mayer"&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;
    &lt;/span&gt;
  &lt;/li&gt;

  &lt;li class="gen-row"&gt;
    &lt;button type="button" class="gen-node"&gt;
      &lt;span class="gen-fig" data-initials="ED"&gt;&lt;img src="https://robjhyndman.com/genealogy/dirksen.jpg" alt="Enno Heeren Dirksen"&gt;&lt;/span&gt;
      &lt;span class="gen-name"&gt;Enno Heeren Dirksen&lt;span class="gen-meta"&gt;Universität Göttingen, 1820&lt;/span&gt;&lt;/span&gt;
    &lt;/button&gt;
    &lt;span class="gen-pop"&gt;
      &lt;span class="gen-pop-head"&gt;&lt;span class="gen-fig" data-initials="ED"&gt;&lt;img src="https://robjhyndman.com/genealogy/dirksen.jpg" alt="Enno Heeren Dirksen"&gt;&lt;/span&gt;&lt;span class="gen-name"&gt;Enno Heeren Dirksen&lt;span class="gen-meta"&gt;Universität Göttingen, 1820&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
      &lt;p&gt;B. 1788, Eilsum. D. 1850, Paris.&lt;/p&gt;
      &lt;p&gt;Professor in Berlin, where his students included Jacobi, Göpel and Heine. His own work was on the calculus of variations and transcendental analysis.&lt;/p&gt;
      &lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Enno_Dirksen"&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;
    &lt;/span&gt;
  &lt;/li&gt;

  &lt;li class="gen-row"&gt;
    &lt;button type="button" class="gen-node"&gt;
      &lt;span class="gen-fig" data-initials="CJ"&gt;&lt;img src="https://robjhyndman.com/genealogy/jacobi.jpg" alt="Carl Gustav Jacob Jacobi"&gt;&lt;/span&gt;
      &lt;span class="gen-name"&gt;Carl Gustav Jacob Jacobi&lt;span class="gen-meta"&gt;Universität Berlin, 1825&lt;/span&gt;&lt;/span&gt;
    &lt;/button&gt;
    &lt;span class="gen-pop"&gt;
      &lt;span class="gen-pop-head"&gt;&lt;span class="gen-fig" data-initials="CJ"&gt;&lt;img src="https://robjhyndman.com/genealogy/jacobi.jpg" alt="Carl Gustav Jacob Jacobi"&gt;&lt;/span&gt;&lt;span class="gen-name"&gt;Carl Gustav Jacob Jacobi&lt;span class="gen-meta"&gt;Universität Berlin, 1825&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
      &lt;p&gt;B. 1804, Potsdam. D. 1851, Berlin.&lt;/p&gt;
      &lt;p&gt;Founded the theory of elliptic functions alongside Abel, and gave us the Jacobian determinant and the Hamilton–Jacobi equation. His advice to students was to invert.&lt;/p&gt;
      &lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Carl_Gustav_Jacob_Jacobi"&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;
    &lt;/span&gt;
  &lt;/li&gt;

  &lt;li class="gen-row"&gt;
    &lt;button type="button" class="gen-node"&gt;
      &lt;span class="gen-fig" data-initials="WS"&gt;&lt;img src="https://robjhyndman.com/genealogy/scheibner.jpg" alt="Wilhelm Scheibner"&gt;&lt;/span&gt;
      &lt;span class="gen-name"&gt;Wilhelm Scheibner&lt;span class="gen-meta"&gt;Universität Halle-Wittenberg, 1848&lt;/span&gt;&lt;/span&gt;
    &lt;/button&gt;
    &lt;span class="gen-pop"&gt;
      &lt;span class="gen-pop-head"&gt;&lt;span class="gen-fig" data-initials="WS"&gt;&lt;img src="https://robjhyndman.com/genealogy/scheibner.jpg" alt="Wilhelm Scheibner"&gt;&lt;/span&gt;&lt;span class="gen-name"&gt;Wilhelm Scheibner&lt;span class="gen-meta"&gt;Universität Halle-Wittenberg, 1848&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
      &lt;p&gt;B. 1826, Ölsnitz. D. 1908, Leipzig.&lt;/p&gt;
      &lt;p&gt;Professor at Leipzig, working on analysis and number theory.&lt;/p&gt;
      &lt;p class="gen-caveat"&gt;Story's other Leipzig advisor was Carl Neumann, who also studied under Jacobi (through Hesse and Richelot), so both routes rejoin here.&lt;/p&gt;
    &lt;/span&gt;
  &lt;/li&gt;

  &lt;li class="gen-row"&gt;
    &lt;button type="button" class="gen-node"&gt;
      &lt;span class="gen-fig" data-initials="WS"&gt;&lt;img src="https://robjhyndman.com/genealogy/Story.jpg" alt="William Story"&gt;&lt;/span&gt;
      &lt;span class="gen-name"&gt;William Story&lt;span class="gen-meta"&gt;Universität Leipzig, 1875&lt;/span&gt;&lt;/span&gt;
    &lt;/button&gt;
    &lt;span class="gen-pop"&gt;
      &lt;span class="gen-pop-head"&gt;&lt;span class="gen-fig" data-initials="WS"&gt;&lt;img src="https://robjhyndman.com/genealogy/Story.jpg" alt="William Story"&gt;&lt;/span&gt;&lt;span class="gen-name"&gt;William Story&lt;span class="gen-meta"&gt;Universität Leipzig, 1875&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
      &lt;p&gt;B. 1850, Boston. D. 1930, Worcester.&lt;/p&gt;
      &lt;p&gt;Worked on algebraic problems and was an important player in the development of American mathematics. He helped found the &lt;em&gt;American Journal of Mathematics&lt;/em&gt;.&lt;/p&gt;
      &lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/William_Edward_Story"&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;
    &lt;/span&gt;
  &lt;/li&gt;

  &lt;li class="gen-row"&gt;
    &lt;button type="button" class="gen-node"&gt;
      &lt;span class="gen-fig" data-initials="SL"&gt;&lt;img src="https://robjhyndman.com/genealogy/lefschetz.jpg" alt="Solomon Lefschetz"&gt;&lt;/span&gt;
      &lt;span class="gen-name"&gt;Solomon Lefschetz&lt;span class="gen-meta"&gt;Clark University, 1911&lt;/span&gt;&lt;/span&gt;
    &lt;/button&gt;
    &lt;span class="gen-pop"&gt;
      &lt;span class="gen-pop-head"&gt;&lt;span class="gen-fig" data-initials="SL"&gt;&lt;img src="https://robjhyndman.com/genealogy/lefschetz.jpg" alt="Solomon Lefschetz"&gt;&lt;/span&gt;&lt;span class="gen-name"&gt;Solomon Lefschetz&lt;span class="gen-meta"&gt;Clark University, 1911&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
      &lt;p&gt;B. 1884, Moscow. D. 1972, Princeton.&lt;/p&gt;
      &lt;p&gt;Russian-born mathematician who became the main source of the algebraic aspects of topology.&lt;/p&gt;
      &lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Solomon_Lefschetz"&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;
    &lt;/span&gt;
  &lt;/li&gt;

  &lt;li class="gen-row"&gt;
    &lt;button type="button" class="gen-node"&gt;
      &lt;span class="gen-fig" data-initials="JT"&gt;&lt;img src="https://robjhyndman.com/genealogy/tukey.jpg" alt="John Tukey"&gt;&lt;/span&gt;
      &lt;span class="gen-name"&gt;John Tukey&lt;span class="gen-meta"&gt;Princeton University, 1939&lt;/span&gt;&lt;/span&gt;
    &lt;/button&gt;
    &lt;span class="gen-pop"&gt;
      &lt;span class="gen-pop-head"&gt;&lt;span class="gen-fig" data-initials="JT"&gt;&lt;img src="https://robjhyndman.com/genealogy/tukey.jpg" alt="John Tukey"&gt;&lt;/span&gt;&lt;span class="gen-name"&gt;John Tukey&lt;span class="gen-meta"&gt;Princeton University, 1939&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
      &lt;p&gt;B. 1915, New Bedford. D. 2000, New Brunswick.&lt;/p&gt;
      &lt;p&gt;The most innovative statistician of the 20th century. He invented the box plot and the stem-and-leaf plot, co-invented the fast Fourier transform, and contributed heavily to jackknife estimation and spectral density estimation. He is also credited with the words "software" and "bit".&lt;/p&gt;
      &lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/John_Tukey"&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;
    &lt;/span&gt;
  &lt;/li&gt;

  &lt;li class="gen-row"&gt;
    &lt;button type="button" class="gen-node"&gt;
      &lt;span class="gen-fig" data-initials="DB"&gt;&lt;img src="https://robjhyndman.com/genealogy/brillinger.jpg" alt="David Brillinger"&gt;&lt;/span&gt;
      &lt;span class="gen-name"&gt;David Brillinger&lt;span class="gen-meta"&gt;Princeton University, 1961&lt;/span&gt;&lt;/span&gt;
    &lt;/button&gt;
    &lt;span class="gen-pop"&gt;
      &lt;span class="gen-pop-head"&gt;&lt;span class="gen-fig" data-initials="DB"&gt;&lt;img src="https://robjhyndman.com/genealogy/brillinger.jpg" alt="David Brillinger"&gt;&lt;/span&gt;&lt;span class="gen-name"&gt;David Brillinger&lt;span class="gen-meta"&gt;Princeton University, 1961&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
      &lt;p&gt;B. 1937, Toronto.&lt;/p&gt;
      &lt;p&gt;Prolific researcher with over 200 papers, best known for his work on stochastic processes and time series, especially spectral analysis and earthquakes. His 1975 book &lt;em&gt;Time Series: Data Analysis and Theory&lt;/em&gt; has been particularly influential. At the University of California, Berkeley.&lt;/p&gt;
      &lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/David_R._Brillinger"&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;
    &lt;/span&gt;
  &lt;/li&gt;

  &lt;li class="gen-row"&gt;
    &lt;button type="button" class="gen-node"&gt;
      &lt;span class="gen-fig" data-initials="PG"&gt;&lt;img src="https://robjhyndman.com/genealogy/guttorp.jpg" alt="Peter Guttorp"&gt;&lt;/span&gt;
      &lt;span class="gen-name"&gt;Peter Guttorp&lt;span class="gen-meta"&gt;University of California, Berkeley, 1980&lt;/span&gt;&lt;/span&gt;
    &lt;/button&gt;
    &lt;span class="gen-pop"&gt;
      &lt;span class="gen-pop-head"&gt;&lt;span class="gen-fig" data-initials="PG"&gt;&lt;img src="https://robjhyndman.com/genealogy/guttorp.jpg" alt="Peter Guttorp"&gt;&lt;/span&gt;&lt;span class="gen-name"&gt;Peter Guttorp&lt;span class="gen-meta"&gt;University of California, Berkeley, 1980&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
      &lt;p&gt;B. 1949.&lt;/p&gt;
      &lt;p&gt;Uses stochastic models in hydrology, atmospheric science, geophysics, environmental science and haematology. At the University of Washington.&lt;/p&gt;
      &lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Peter_Guttorp"&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;
    &lt;/span&gt;
  &lt;/li&gt;

&lt;/ol&gt;
&lt;/div&gt;

&lt;/div&gt;&lt;!-- /.gen-branches --&gt;

&lt;div class="gen-join gen-join--merge"&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;

&lt;!-- ============ back to one line ============ --&gt;
&lt;ol class="gen-chain"&gt;
  &lt;li class="gen-row"&gt;
    &lt;button type="button" class="gen-node"&gt;
      &lt;span class="gen-fig" data-initials="GG"&gt;&lt;img src="https://robjhyndman.com/img/GaryGrunwald.jpg" alt="Gary Grunwald"&gt;&lt;/span&gt;
      &lt;span class="gen-name"&gt;Gary Grunwald&lt;span class="gen-meta"&gt;University of Washington, 1987&lt;/span&gt;&lt;/span&gt;
    &lt;/button&gt;
    &lt;span class="gen-pop"&gt;
      &lt;span class="gen-pop-head"&gt;&lt;span class="gen-fig" data-initials="GG"&gt;&lt;img src="https://robjhyndman.com/img/GaryGrunwald.jpg" alt="Gary Grunwald"&gt;&lt;/span&gt;&lt;span class="gen-name"&gt;Gary Grunwald&lt;span class="gen-meta"&gt;University of Washington, 1987&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
      &lt;p&gt;B. 1954.&lt;/p&gt;
      &lt;p&gt;Gary spent the first part of his career on time series analysis, particularly non-Gaussian time series. Then he worked at the University of Colorado on nutrition, physiology, and cardiovascular health. Guttorp and Raftery jointly supervised his thesis, which is why the tree above has two branches. &lt;a href="https://coloradosph.cuanschutz.edu/resources/directory/directory-profile/Grunwald-Gary-UCD13990"&gt;Website&lt;/a&gt;&lt;/p&gt;
    &lt;/span&gt;
  &lt;/li&gt;
  &lt;li class="gen-row"&gt;
    &lt;button type="button" class="gen-node"&gt;
      &lt;span class="gen-fig" data-initials="RH"&gt;&lt;img src="https://robjhyndman.com/img/population.jpg" alt="Rob J Hyndman"&gt;&lt;/span&gt;
      &lt;span class="gen-name"&gt;Rob J Hyndman&lt;span class="gen-meta"&gt;University of Melbourne, 1993&lt;/span&gt;&lt;/span&gt;
    &lt;/button&gt;
    &lt;span class="gen-pop"&gt;
      &lt;span class="gen-pop-head"&gt;&lt;span class="gen-fig" data-initials="RH"&gt;&lt;img src="https://robjhyndman.com/img/population.jpg" alt="Rob J Hyndman"&gt;&lt;/span&gt;&lt;span class="gen-name"&gt;Rob J Hyndman&lt;span class="gen-meta"&gt;University of Melbourne, 1993&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
      &lt;p&gt;B. 1967, Melbourne.&lt;/p&gt;
      &lt;p&gt;Peter Brockwell was also my advisor, and he was supervised by Joe Moyal, but then the line stops --- the MGP does not record who Moyal's advisor was.&lt;/p&gt;
      &lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Rob_J._Hyndman"&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;
    &lt;/span&gt;
  &lt;/li&gt;
&lt;/ol&gt;


&lt;/div&gt;

&lt;script&gt;
document.querySelectorAll('.gen .gen-fig img').forEach(function (img) {
  img.addEventListener('error', function () { img.remove(); });
});
&lt;/script&gt;



 </description>
      <category>genealogy</category>
      <category>mathematics</category>
      <guid>https://robjhyndman.com/hyndsight/mathematical-genealogy/</guid>
      <pubDate>Wed, 29 Jul 2026 14:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Monthly, quarterly and annual growth rates</title>
      <link>https://robjhyndman.com/hyndsight/growth_rates.html</link>
      <description> &lt;div&gt;
  &lt;div class="description"&gt;
    I received the following question by email:
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;

&lt;blockquote class="blockquote"&gt;
&lt;p&gt;I was wondering if mathematical relationships exist between monthly, quarterly, and annual growth rates (percentage changes). For time series data …&lt;br&gt; 1) Is there a mathematical formula to know by how many months the Month-to-Month changes lead turns in this-month-to-the-same-month-one-year-ago changes (annual changes)?&lt;br&gt; 2) Is there a mathematical formula to know by how many quarters the Quarter-to-Quarter changes lead turns in this-quarter-to-the-same-quarter-one-year-ago changes (annual changes)?&lt;br&gt; Also, regarding simple moving averages/totals:&lt;br&gt; 3) Is there an exact or approximate formula to know by how many months a 3-month simple moving average (or moving total) leads a turn in a 12-month simple moving average (or moving total)?&lt;br&gt; As an example: Inflation is typically measured with Y/Y percentage changes in the CPI. So, it would be helpful to be able to identify when the 12-month rate of change will likely reach a top or bottom, using the 1-month or 3-months rates of change.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;section id="monthly-growth-vs-year-over-year-growth" class="level2"&gt;&lt;h2 class="anchored" data-anchor-id="monthly-growth-vs-year-over-year-growth"&gt;Monthly growth vs year-over-year growth&lt;/h2&gt;
&lt;p&gt;Suppose we have monthly data &lt;img src="https://latex.codecogs.com/png.latex?y_1,y_2,%5Cdots"&gt;. Then the monthly growth rates are given by &lt;img src="https://latex.codecogs.com/png.latex?g_t%20=%20%5Cfrac%7By_t%20-%20y_%7Bt%20-%201%7D%7D%7By_%7Bt%20-%201%7D%7D"&gt;, and the year-over-year growth rates are given by &lt;img src="https://latex.codecogs.com/png.latex?G_t%20=%20%5Cfrac%7By_t%20-%20y_%7Bt%20-%2012%7D%7D%7By_%7Bt%20-%2012%7D%7D"&gt;. A little algebra gives &lt;span id="eq-product-growth"&gt;&lt;img src="https://latex.codecogs.com/png.latex?%0A%20%201%20+%20G_t%20=%20%5Cprod_%7Bj%20=%201%7D%5E%7B12%7D%20(1%20+%20g_%7Bt%20-%20j%20+%201%7D).%0A%5Ctag%7B1%7D"&gt;&lt;/span&gt; So the year-over-year rate is the compounded product of the last 12 monthly rates. This gives a recurrence relationship: &lt;img src="https://latex.codecogs.com/png.latex?%0A%20%20%5Cfrac%7B1%20+%20G_t%7D%7B1%20+%20G_%7Bt%20-%201%7D%7D%20=%20%5Cfrac%7B1%20+%20g_t%7D%7B1%20+%20g_%7Bt%20-%2012%7D%7D.%0A"&gt; Therefore &lt;img src="https://latex.codecogs.com/png.latex?%0A%20%20G_t%20%3E%20G_%7Bt%20-%201%7D%20%5Ciff%20g_t%20%3E%20g_%7Bt%20-%2012%7D.%0A"&gt; In other words, the year-over-year rate rises when the current monthly change exceeds the change 12 months ago, and falls when the reverse holds. Figure&amp;nbsp;1 shows why: moving from &lt;img src="https://latex.codecogs.com/png.latex?G_%7Bt-1%7D"&gt; to &lt;img src="https://latex.codecogs.com/png.latex?G_t"&gt;, the 12-month window drops &lt;img src="https://latex.codecogs.com/png.latex?g_%7Bt-12%7D"&gt; and adds &lt;img src="https://latex.codecogs.com/png.latex?g_t"&gt;, while the other 11 months are common to both.&lt;/p&gt;
&lt;div class="cell"&gt;
&lt;div class="cell-output-display"&gt;
&lt;div id="fig-window" class="quarto-float quarto-figure quarto-figure-center anchored"&gt;
&lt;figure class="quarto-float quarto-float-fig figure"&gt;&lt;div aria-describedby="fig-window-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca"&gt;
&lt;img src="https://robjhyndman.com/hyndsight/growth_rates_files/figure-html/fig-window-1.png" class="img-fluid figure-img" width="768"&gt;
&lt;/div&gt;
&lt;figcaption class="quarto-float-caption-bottom quarto-float-caption quarto-float-fig" id="fig-window-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca"&gt;
Figure&amp;nbsp;1: The 12-month windows of monthly growth rates used to compute &lt;img src="https://latex.codecogs.com/png.latex?G_%7Bt-1%7D"&gt; and &lt;img src="https://latex.codecogs.com/png.latex?G_t"&gt;.
&lt;/figcaption&gt;&lt;/figure&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;For example, annual inflation peaks when the monthly rates entering the 12-month window fall below the rates dropping out of it. Because year-over-year growth is effectively a 12-month trailing window of monthly growth, month-to-month growth tends to lead year-over-year growth by about half the window length: the &lt;em&gt;centre lag&lt;/em&gt; of an equally-weighted &lt;img src="https://latex.codecogs.com/png.latex?k"&gt;-period trailing window is &lt;img src="https://latex.codecogs.com/png.latex?(k%20-%201)/2"&gt; periods, or 5.5 months when &lt;img src="https://latex.codecogs.com/png.latex?k%20=%2012"&gt;.&lt;/p&gt;
&lt;p&gt;This centre-lag rule works best when the underlying series changes slowly within the 12-month window, as is typical of series like inflation, and is less reliable for more volatile or noisy series.&lt;/p&gt;
&lt;/section&gt;&lt;section id="quarterly-growth-vs-year-over-year-growth" class="level2"&gt;&lt;h2 class="anchored" data-anchor-id="quarterly-growth-vs-year-over-year-growth"&gt;Quarterly growth vs year-over-year growth&lt;/h2&gt;
&lt;p&gt;The quarterly version is exactly analogous: just replace 12 by 4. Since four-quarter growth is a trailing 4-quarter window of quarterly growth, quarter-to-quarter growth leads year-over-year growth by about 1.5 quarters, under the same condition as above.&lt;/p&gt;
&lt;/section&gt;&lt;section id="log-growth-rates" class="level2"&gt;&lt;h2 class="anchored" data-anchor-id="log-growth-rates"&gt;Log growth rates&lt;/h2&gt;
&lt;p&gt;Taking logarithms turns the multiplicative relationship above into a linear one, which is more convenient for compounding over several periods, for forecasting, and for series such as price indices, where growth is conventionally expressed in log form.&lt;/p&gt;
&lt;p&gt;Define monthly log growth &lt;img src="https://latex.codecogs.com/png.latex?%5Cell_t%20=%20%5Cln(1%20+%20g_t)"&gt; and year-over-year log growth &lt;img src="https://latex.codecogs.com/png.latex?L_t%20=%20%5Cln(1%20+%20G_t)"&gt;, using &lt;img src="https://latex.codecogs.com/png.latex?g_t"&gt; and &lt;img src="https://latex.codecogs.com/png.latex?G_t"&gt; from above. Taking logs of Equation&amp;nbsp;1 turns the product into a sum: &lt;img src="https://latex.codecogs.com/png.latex?%0A%20%20L_t%20=%20%5Csum_%7Bj%20=%200%7D%5E%7B11%7D%20%5Cell_%7Bt%20-%20j%7D.%0A"&gt; So &lt;img src="https://latex.codecogs.com/png.latex?L_t"&gt; rises when &lt;img src="https://latex.codecogs.com/png.latex?%5Cell_t%20%3E%20%5Cell_%7Bt%20-%2012%7D"&gt;: the same turning condition as before, now linear rather than multiplicative.&lt;/p&gt;
&lt;p&gt;This also gives a forecasting formula: &lt;img src="https://latex.codecogs.com/png.latex?%0A%20%20L_%7Bt%20+%20h%7D%20=%20L_t%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20+%20%5Csum_%7Bs%20=%201%7D%5E%7Bh%7D%20%5Cleft(%5Cell_%7Bt%20+%20s%7D%20-%20%5Cell_%7Bt%20+%20s%20-%2012%7D%5Cright).%0A"&gt; So given a model for future monthly growth, you can forecast the future year-over-year rate in log terms.&lt;/p&gt;
&lt;p&gt;The same idea works over any horizon, comparing the most recent 3-month block to the corresponding block a year earlier: &lt;img src="https://latex.codecogs.com/png.latex?%0A%20%20L_t%0A%20%20-%20L_%7Bt%20-%203%7D%20=%20%5Csum_%7Bj%20=%200%7D%5E%7B2%7D%20%5Cell_%7Bt%20-%20j%7D%0A%20%20-%20%5Csum_%7Bj%20=%200%7D%5E%7B2%7D%20%5Cell_%7Bt%20-%2012%20-%20j%7D.%0A"&gt; So the year-over-year rate has risen over the past three months if the most recent 3-month growth exceeds the same 3-month block a year earlier.&lt;/p&gt;
&lt;p&gt;This is exactly how CPI inflation is usually reported: &lt;img src="https://latex.codecogs.com/png.latex?y_t"&gt; is the price index, &lt;img src="https://latex.codecogs.com/png.latex?%5Cell_t"&gt; the monthly inflation rate, and &lt;img src="https://latex.codecogs.com/png.latex?L_t"&gt; the standard year-over-year rate quoted in the news.&lt;/p&gt;
&lt;/section&gt;&lt;section id="month-moving-averages-vs-12-month-moving-averages" class="level2"&gt;&lt;h2 class="anchored" data-anchor-id="month-moving-averages-vs-12-month-moving-averages"&gt;3-month moving averages vs 12-month moving averages&lt;/h2&gt;
&lt;p&gt;A &lt;em&gt;trailing&lt;/em&gt; &lt;a href="https://otexts.com/fpp3/moving-averages.html"&gt;simple moving average&lt;/a&gt; of &lt;img src="https://latex.codecogs.com/png.latex?%5C%7By_1,%20y_2,%20%5Cdots%5C%7D"&gt; is defined as: &lt;img src="https://latex.codecogs.com/png.latex?%0A%20%20%5Chat%7BT%7D_%7Bk,t%7D%20=%20%5Cfrac%7B1%7D%7Bk%7D%20%5Csum_%7Bj%20=%200%7D%5E%7Bk%20-%201%7D%20y_%7Bt%20-%20j%7D.%0A"&gt; Then &lt;img src="https://latex.codecogs.com/png.latex?%0A%20%20%5Chat%7BT%7D_%7Bk,t%7D%20-%20%5Chat%7BT%7D_%7Bk,t%20-%201%7D%20=%20%5Cfrac%7B1%7D%7Bk%7D%20(y_%7Bt%7D%20-%20y_%7Bt%20-%20k%7D).%0A"&gt; So &lt;img src="https://latex.codecogs.com/png.latex?%5Chat%7BT%7D_%7Bk,t%7D"&gt; rises when the newest observation entering the window, &lt;img src="https://latex.codecogs.com/png.latex?y_%7Bt%7D"&gt;, exceeds the oldest observation leaving the window, &lt;img src="https://latex.codecogs.com/png.latex?y_%7Bt%20-%20k%7D"&gt;, and falls when the reverse holds.&lt;/p&gt;
&lt;p&gt;As with the growth-rate case, the practical lead between two moving averages of different lengths can be approximated from the centre of each trailing window. A trailing &lt;img src="https://latex.codecogs.com/png.latex?k"&gt;-period average is centred about &lt;img src="https://latex.codecogs.com/png.latex?(k%20-%201)/2"&gt; periods in the past, so a 3-month average is centred about 1 month in the past, while a 12-month average is centred about 5.5 months in the past. So a 3-month moving average tends to lead a 12-month moving average by about &lt;img src="https://latex.codecogs.com/png.latex?5.5%20-%201%20=%204.5"&gt; months, for the same reason that monthly growth leads year-over-year growth above. As before, this holds as long as the series moves slowly relative to the 12-month window.&lt;/p&gt;


&lt;/section&gt; </description>
      <category>time series</category>
      <guid>https://robjhyndman.com/hyndsight/growth_rates.html</guid>
      <pubDate>Mon, 27 Jul 2026 14:00:00 GMT</pubDate>
      <content url="https://robjhyndman.com/hyndsight/growth_rates_files/figure-html/fig-window-1.png" medium="image" type="image/png" height="54" width="144"/>
    </item>
    <item>
      <title>Women in Forecasting</title>
      <link>https://robjhyndman.com/hyndsight/wif2026.html</link>
      <description> 



&lt;div&gt;
  &lt;div class="description"&gt;
    The second edition of the Women in Forecasting (WIF) Conference is taking place on 27 June, right before the International Symposium on Forecasting in Montreal Canada.
  &lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;/p&gt;


&lt;p&gt;&lt;a href="https://wif.nixtla.io/"&gt;Women in Forecasting&lt;/a&gt; was created to showcase the important contributions women are making to time series forecasting, a field where women remain underrepresented. Beyond the talks, the conference is also an opportunity to build community, foster professional connections, and support mentorship for those entering the field and those advancing in their careers.&lt;/p&gt;
&lt;p&gt;I’m delighted to see four of my own former PhD students are &lt;a href="https://wif.nixtla.io/#speakers"&gt;invited speakers&lt;/a&gt; at the conference, along with Mariana Menchero who was a great help to me in solving numerous technical issues related to the &lt;a href="https://OTexts.com/fpppy"&gt;Python edition of FPP&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Date:&lt;/strong&gt; Saturday, June 27&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Venue:&lt;/strong&gt; Université du Québec à Montréal (The same venue as ISF 2026)&lt;/p&gt;
&lt;p&gt;Registration is required for both the in-person venue and on the Zoom.&lt;/p&gt;
&lt;p&gt;Register for the WIF Conference: &lt;a href="https://wif.nixtla.io/" class="uri"&gt;https://wif.nixtla.io/&lt;/a&gt;&lt;/p&gt;



 </description>
      <category>forecasting</category>
      <guid>https://robjhyndman.com/hyndsight/wif2026.html</guid>
      <pubDate>Sun, 14 Jun 2026 14:00:00 GMT</pubDate>
      <content url="https://robjhyndman.com/img/wif2026.jpg" medium="image" type="image/jpeg"/>
    </item>
    <item>
      <title>Forecasting: Principles and Practice, the Pythonic Way</title>
      <link>https://robjhyndman.com/hyndsight/fpppy.html</link>
      <description> 



&lt;div&gt;
  &lt;div class="description"&gt;
    The Python edition of “Forecasting: Principles and Practice” is now &lt;a href="https://otexts.com/fpppy/print-version.html"&gt;available in print&lt;/a&gt;.
  &lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;/p&gt;


&lt;p&gt;&lt;a href="https://otexts.com/fpppy/print-version.html"&gt;&lt;img src="https://robjhyndman.com/img/thumbs/fpppy_front_cover.jpg" alt="FPPPY front cover" style="width: 300px; float: right; margin-left: 20px; margin-bottom: 20px;"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;About a year ago, we did a soft launch of the online edition of &lt;a href="https://OTexts.com/fpppy/"&gt;“Forecasting: Principles and Practice, the Pythonic Way” (FPPPY)&lt;/a&gt;. In this latest edition of the FPP book, George Athanasopoulos and I are joined by four additional co-authors: Azul Garza, Cristian Challu, Max Mergenthaler and Kin Olivares. &lt;a href="https://otexts.com/fpppy/authors.html"&gt;Our new co-authors&lt;/a&gt; are Python and forecasting experts, and have all been involved in developing the open-source &lt;a href="https://github.com/Nixtla/"&gt;Nixtla software&lt;/a&gt; that is used throughout the book.&lt;/p&gt;
&lt;p&gt;Since the online edition was launched, we have made numerous small updates and improvements to the book, ironing out errors, improving the presentation, and simplifying the Python code where possible. Now it is &lt;a href="https://otexts.com/fpppy/print-version.html"&gt;available in print&lt;/a&gt; as well!&lt;/p&gt;
&lt;p&gt;The first 13 chapters of the Python edition closely follow the corresponding &lt;a href="https://otexts.com/fpp3/"&gt;R fpp3 edition&lt;/a&gt;, but with code examples in Python rather than R. We have also included two new chapters: &lt;a href="https://otexts.com/fpppy/14-neural-networks.html"&gt;Neural networks&lt;/a&gt; and &lt;a href="https://otexts.com/fpppy/15-foundation-models.html"&gt;Foundation forecasting models&lt;/a&gt;, which are dedicated to recent techniques and developments in neural networks applied to forecasting.&lt;/p&gt;
&lt;p&gt;As with previous editions, all code and examples are fully reproducible, and exercises are provided for teaching or self-study. The &lt;a href="https://otexts.com/fpppy/"&gt;online edition&lt;/a&gt; will remain free, and will be updated as needed. The &lt;a href="https://otexts.com/fpppy/print-version.html"&gt;print edition&lt;/a&gt; is available for purchase, and we hope it will be a useful resource for students, practitioners, and anyone interested in learning about forecasting with Python.&lt;/p&gt;



 </description>
      <category>forecasting</category>
      <category>Python</category>
      <category>teaching</category>
      <guid>https://robjhyndman.com/hyndsight/fpppy.html</guid>
      <pubDate>Thu, 04 Jun 2026 14:00:00 GMT</pubDate>
      <content url="https://robjhyndman.com/img/thumbs/fpppy_front_cover.jpg" medium="image" type="image/jpeg"/>
    </item>
    <item>
      <title>Podcasts</title>
      <link>https://robjhyndman.com/hyndsight/podcasts/</link>
      <description> &lt;p&gt;I’ve been interviewed for several podcasts over the last few years. It’s always fun to talk about my work, and I hope there are enough differences between them to make it interesting for listeners. Here is a full list of them.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Updated:&lt;/strong&gt; 23 April 2026&lt;/p&gt;
&lt;div class="quarto-listing-container-table"&gt;
&lt;div class="cell"&gt;
&lt;div class="cell-output-display"&gt;
&lt;table class="quarto-listing-table table table" style="margin-left: auto; margin-right: auto;"&gt;
&lt;thead&gt;&lt;tr&gt;
&lt;th style="text-align:left;"&gt; Date &lt;/th&gt;
   &lt;th style="text-align:left;"&gt; Podcast &lt;/th&gt;
   &lt;th style="text-align:left;"&gt; Episode &lt;/th&gt;
  &lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="text-align:left;width: 25%; "&gt; 23 April 2026 &lt;/td&gt;
   &lt;td style="text-align:left;width: 30%; font-weight: bold;"&gt; Value Driven Data Science &lt;/td&gt;
   &lt;td style="text-align:left;width: 45%; "&gt; &lt;a href="https://valuedrivendatascience.com/102"&gt;How giving away your work for free can build your authority as a data scientist&lt;/a&gt; &lt;/td&gt;
  &lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:left;width: 25%; "&gt; 16 April 2026 &lt;/td&gt;
   &lt;td style="text-align:left;width: 30%; font-weight: bold;"&gt; Value Driven Data Science &lt;/td&gt;
   &lt;td style="text-align:left;width: 45%; "&gt; &lt;a href="https://valuedrivendatascience.com/101"&gt;Why traditional statistics still matters in the age of AI&lt;/a&gt; &lt;/td&gt;
  &lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:left;width: 25%; "&gt; 26 May 2023 &lt;/td&gt;
   &lt;td style="text-align:left;width: 30%; font-weight: bold;"&gt; Forecasting Impact &lt;/td&gt;
   &lt;td style="text-align:left;width: 45%; "&gt; &lt;a href="https://forecastingimpact.buzzsprout.com/1641538/12809499-forecasting-software-panel"&gt;Forecasting software panel&lt;/a&gt; &lt;/td&gt;
  &lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:left;width: 25%; "&gt; 14 March 2022 &lt;/td&gt;
   &lt;td style="text-align:left;width: 30%; font-weight: bold;"&gt; Faculty.net &lt;/td&gt;
   &lt;td style="text-align:left;width: 45%; "&gt; &lt;a href="https://faculti.net/forecasting-in-social-settings/"&gt;Forecasting in social settings&lt;/a&gt; &lt;/td&gt;
  &lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:left;width: 25%; "&gt; 17 November 2021 &lt;/td&gt;
   &lt;td style="text-align:left;width: 30%; font-weight: bold;"&gt; The Random Sample &lt;/td&gt;
   &lt;td style="text-align:left;width: 45%; "&gt; &lt;a href="https://www.therandomsample.com.au/podcast/software-as-a-first-class-research-output/"&gt;Software as a first class research output&lt;/a&gt; &lt;/td&gt;
  &lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:left;width: 25%; "&gt; 24 May 2021 &lt;/td&gt;
   &lt;td style="text-align:left;width: 30%; font-weight: bold;"&gt; Data Skeptic &lt;/td&gt;
   &lt;td style="text-align:left;width: 45%; "&gt; &lt;a href="https://podcastaddict.com/data-skeptic/episode/123511469"&gt;Forecasting principles and practice&lt;/a&gt; &lt;/td&gt;
  &lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:left;width: 25%; "&gt; 12 April 2021 &lt;/td&gt;
   &lt;td style="text-align:left;width: 30%; font-weight: bold;"&gt; Seriously Social &lt;/td&gt;
   &lt;td style="text-align:left;width: 45%; "&gt; &lt;a href="https://seriouslysocial.org.au/podcasts/forecasting-the-future-the-science-of-prediction/"&gt;Forecasting the future: the science of prediction&lt;/a&gt; &lt;/td&gt;
  &lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:left;width: 25%; "&gt; 6 February 2021 &lt;/td&gt;
   &lt;td style="text-align:left;width: 30%; font-weight: bold;"&gt; Forecasting Impact &lt;/td&gt;
   &lt;td style="text-align:left;width: 45%; "&gt; &lt;a href="https://forecastingimpact.buzzsprout.com/1641538/7708129-rob-hyndman"&gt;Rob Hyndman&lt;/a&gt; &lt;/td&gt;
  &lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:left;width: 25%; "&gt; 19 July 2020 &lt;/td&gt;
   &lt;td style="text-align:left;width: 30%; font-weight: bold;"&gt; The Curious Quant &lt;/td&gt;
   &lt;td style="text-align:left;width: 45%; "&gt; &lt;a href="https://share.transistor.fm/s/dc2dfd76"&gt;Forecasting COVID, time series, and why causality doesnt matter as much as you think&lt;/a&gt; &lt;/td&gt;
  &lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:left;width: 25%; "&gt; 27 May 2020 &lt;/td&gt;
   &lt;td style="text-align:left;width: 30%; font-weight: bold;"&gt; The Random Sample &lt;/td&gt;
   &lt;td style="text-align:left;width: 45%; "&gt; &lt;a href="https://www.therandomsample.com.au/podcast/forecasting-the-future-the-future-of-forecasting/"&gt;Forecasting the future &amp;amp; the future of forecasting&lt;/a&gt; &lt;/td&gt;
  &lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align:left;width: 25%; "&gt; 9 October 2019 &lt;/td&gt;
   &lt;td style="text-align:left;width: 30%; font-weight: bold;"&gt; Thought Capital &lt;/td&gt;
   &lt;td style="text-align:left;width: 45%; "&gt; &lt;a href="https://impact.monash.edu/podcasts/forecasts-are-always-wrong-but-we-need-them-anyway/"&gt;Forecasts are always wrong (but we need them anyway)&lt;/a&gt; &lt;/td&gt;
  &lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;script&gt;
document.addEventListener("DOMContentLoaded", function () {
  document.querySelectorAll(".quarto-listing-container-table .quarto-listing-table tbody tr").forEach(function (row) {
    row.addEventListener("click", function (e) {
      if (e.target.closest("a")) return;
      const link = row.querySelector("a");
      if (link) {
        window.location.href = link.href;
      }
    });
  });
});
&lt;/script&gt;


 </description>
      <category>forecasting</category>
      <category>podcast</category>
      <guid>https://robjhyndman.com/hyndsight/podcasts/</guid>
      <pubDate>Wed, 22 Apr 2026 14:00:00 GMT</pubDate>
      <content url="https://robjhyndman.com/img/podcasts.png" medium="image" type="image/png" height="37" width="144"/>
    </item>
    <item>
      <title>Why traditional statistics still matters in the age of AI</title>
      <link>https://robjhyndman.com/hyndsight/stats_ai.html</link>
      <description> 





&lt;p&gt;I was interviewed on this topic recently by &lt;a href="https://www.genevievehayes.com/"&gt;Dr Genevieve Hayes&lt;/a&gt; for her podcast &lt;a href="https://valuedrivendatascience.com"&gt;Value Driven Data Science&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Here’s the blurb (not written by me):&lt;/p&gt;
&lt;blockquote class="blockquote"&gt;
&lt;p&gt;Data scientists today are under pressure to adopt the latest tools - machine learning, LLMs, generative AI. But in the rush to embrace what’s new, many are leaving some of the most powerful analytical tools sitting on the shelf. Tools that handle something modern AI largely can’t: uncertainty. &lt;br&gt;&lt;br&gt; In this episode, Prof.&amp;nbsp;Rob Hyndman joins Dr.&amp;nbsp;Genevieve Hayes to make the case for why rigorous statistical thinking remains indispensable in the age of AI, and what data scientists are giving up when they abandon it.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href="https://valuedrivendatascience.com/101"&gt;&lt;strong&gt;Check it out&lt;/strong&gt;&lt;/a&gt; if you’re interested. Other podcasts I’ve done are &lt;a href="../hyndsight/podcasts/index.html"&gt;listed here&lt;/a&gt;.&lt;/p&gt;



 </description>
      <category>forecasting</category>
      <category>statistics</category>
      <category>AI</category>
      <guid>https://robjhyndman.com/hyndsight/stats_ai.html</guid>
      <pubDate>Wed, 15 Apr 2026 14:00:00 GMT</pubDate>
      <content url="https://robjhyndman.com/img/vdds.png" medium="image" type="image/png" height="144" width="144"/>
    </item>
    <item>
      <title>Rolling scaled forecast accuracy</title>
      <link>https://robjhyndman.com/hyndsight/rolling_mase.html</link>
      <description> 



&lt;div&gt;
  &lt;div class="description"&gt;
    When we compute a MASE or RMSSE using a rolling origin, should the scaling factor be recalculated every time?
  &lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;/p&gt;


&lt;p&gt;I’ve been asked this a couple of times, so perhaps it is worth a blog post.&lt;/p&gt;
&lt;p&gt;For a simple training/test split, the Mean Absolute Scaled Error (MASE) &lt;span class="citation" data-cites="HK06"&gt;(Hyndman &amp;amp; Koehler, 2006)&lt;/span&gt; is defined as &lt;img src="https://latex.codecogs.com/png.latex?%0A%5Ctext%7BMASE%7D%20=%20%5Cfrac%7B%5Cfrac%7B1%7D%7BH%7D%5Csum_%7Bt=T+1%7D%5E%7BT+H%7D%20%7Cy_t%20-%20%5Chat%7By%7D_%7Bt%7CT%7D%7C%7D%7B%5Cfrac1%7BT-m%7D%5Csum_%7Bt=m+1%7D%5ET%20%7Cy_t%20-%20y_%7Bt-m%7D%7C%7D%0A"&gt; and the Root Mean Squared Scaled Error (RMSSE) is defined as &lt;img src="https://latex.codecogs.com/png.latex?%0A%5Ctext%7BRMSSE%7D%20=%20%5Csqrt%7B%5Cfrac%7B%5Cfrac%7B1%7D%7BH%7D%5Csum_%7Bt=T+1%7D%5E%7BT+H%7D%20(y_t%20-%20%5Chat%7By%7D_%7Bt%7CT%7D)%5E2%7D%7B%5Cfrac%7B1%7D%7BT-m%7D%5Csum_%7Bt=m+1%7D%5ET%20(y_t%20-%20y_%7Bt-m%7D)%5E2%7D%7D.%0A"&gt; In both cases, &lt;img src="https://latex.codecogs.com/png.latex?m=1"&gt; for non-seasonal data, where &lt;img src="https://latex.codecogs.com/png.latex?m"&gt; is the seasonal period for seasonal data, and the sum in the numerator is over the &lt;em&gt;test&lt;/em&gt; set, while the sum in the denominator is over the &lt;em&gt;training&lt;/em&gt; set. The notation &lt;img src="https://latex.codecogs.com/png.latex?%5Chat%7By%7D_%7Bt%7CT%7D"&gt; means the forecast of &lt;img src="https://latex.codecogs.com/png.latex?y_%7Bt%7D"&gt; given data &lt;img src="https://latex.codecogs.com/png.latex?y_1,%5Cdots,y_T"&gt;.&lt;/p&gt;
&lt;p&gt;These measures are discussed in my &lt;a href="https://otexts.com/fpp3/accuracy.html#scaled-errors"&gt;forecasting textbook with George Athanasopoulos&lt;/a&gt;. The denominator is a scaling factor, introduced so that you can compare MASE or RMSSE values across series of different units. For example, are the forecasts of widget sales more accurate than the forecasts of electricity demand? If all your forecasts are in the same units, then you don’t need to remove the scale, and it is simpler to just use MAE or RMSE (i.e., only the numerators of the above equations).&lt;/p&gt;
&lt;p&gt;Now, the question is, when we are doing &lt;a href="https://otexts.com/fpp3/tscv.html"&gt;time series cross-validation&lt;/a&gt;, and computing forecast accuracy over a series of training/test sets with a rolling origin, does it make sense to compute a different scaling factor each time? For example, a cross-validated MASE for &lt;img src="https://latex.codecogs.com/png.latex?h"&gt;-step forecasts is &lt;img src="https://latex.codecogs.com/png.latex?%0A%5Ctext%7BMASE%7D_h%20=%20%5Cfrac%7B1%7D%7BT-I-h+1%7D%5Csum_%7Bt=I%7D%5E%7BT-h%7D%20%5Cfrac%7B%7Cy_%7Bt+h%7D%20-%20%5Chat%7By%7D_%7Bt+h%7Ct%7D%7C%7D%7B%7B%5Cfrac1%7Bt-m%7D%5Csum_%7Bs=m+1%7D%5E%7Bt%7D%20%7Cy_s%20-%20y_%7Bs-m%7D%7C%7D%7D,%0A"&gt; where the first &lt;img src="https://latex.codecogs.com/png.latex?I"&gt; observations form the smallest training set, and subsequent training sets increase one observation at a time.&lt;/p&gt;
&lt;p&gt;An alternative approach would be to compute the scaling factor across all available data, rather than calculate it separately for each training set. Then MASE would become &lt;img src="https://latex.codecogs.com/png.latex?%0A%5Ctext%7BMASE%7D_h%20=%20%5Cfrac%7B%5Cfrac%7B1%7D%7BT-I-h+1%7D%5Csum_%7Bt=I%7D%5E%7BT-h%7D%20%7Cy_%7Bt+h%7D%20-%20%5Chat%7By%7D_%7Bt+h%7Ct%7D%7C%7D%7B%5Cfrac1%7BT-m%7D%5Csum_%7Bt=m+1%7D%5E%7BT%7D%20%7Cy_t%20-%20y_%7Bt-m%7D%7C%7D%0A"&gt;&lt;/p&gt;
&lt;p&gt;Let’s think about the advantages of this alternative:&lt;/p&gt;
&lt;ol type="1"&gt;
&lt;li&gt;It is (slightly) faster. But the denominators are very fast to compute, so this really doesn’t make much difference.&lt;/li&gt;
&lt;li&gt;It removes a source of variation from the calculation. The scaled errors will be more variable when the denominator changes with each test set, and that makes it harder to see the difference between forecasting methods.&lt;/li&gt;
&lt;li&gt;It uses more data in computing the scaling factor, which reduces the uncertainty in the estimate of the accuracy measure. This is potentially important if &lt;img src="https://latex.codecogs.com/png.latex?I%20%5Cll%20T"&gt;, so that some training sets are relatively small compared to the available data.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;As for disadvantages:&lt;/p&gt;
&lt;ol type="1"&gt;
&lt;li&gt;The measures are no longer true measures of forecast accuracy because the calculation potentially involves future observations. On the face of it, this seems important, but in reality it isn’t. The future observations aren’t affecting the forecasts, only the scaling factor, so there is no leakage involved.&lt;/li&gt;
&lt;li&gt;One of my correspondents suggested that it changed the interpretation. I think the interpretability of these scaled measures is over-rated. They can only be interpreted as a ratio of out-of-sample accuracy to in-sample accuracy, and the two are not necessarily even over the same horizons. How the scaling factor is calculated doesn’t really affect the interpretation, because there is not much value in interpretation either way.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;So I suggest that computing the scaling factor across all available training data when calculating cross-validated MASE and RMSSE values is a good idea.&lt;/p&gt;
&lt;p&gt;That raises the question as to why shouldn’t we use all available data in the denominator when doing a simple training/test split? In that context, the only advantage that is relevant is #3 above, and unless the test set is particularly large, it shouldn’t make much difference. Nevertheless, I can’t see any real problem in using all available data in computing the scaling factor.&lt;/p&gt;




&lt;div id="quarto-appendix" class="default"&gt;&lt;section class="quarto-appendix-contents" id="quarto-bibliography"&gt;&lt;h2 class="anchored quarto-appendix-heading"&gt;References&lt;/h2&gt;&lt;div id="refs" class="references csl-bib-body hanging-indent" data-entry-spacing="0"&gt;
&lt;div id="ref-HK06" class="csl-entry"&gt;
Hyndman, R. J., &amp;amp; Koehler, A. B. (2006). Another look at measures of forecast accuracy. &lt;em&gt;International J Forecasting&lt;/em&gt;, &lt;em&gt;22&lt;/em&gt;(4), 679–688. &lt;a href="https://robjhyndman.com/publications/another-look-at-measures-of-forecast-accuracy/"&gt;https://robjhyndman.com/publications/another-look-at-measures-of-forecast-accuracy/&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/section&gt;&lt;/div&gt; </description>
      <category>forecasting</category>
      <guid>https://robjhyndman.com/hyndsight/rolling_mase.html</guid>
      <pubDate>Mon, 19 Jan 2026 13:00:00 GMT</pubDate>
      <content url="https://robjhyndman.com/files/cv1-1.png" medium="image" type="image/png" height="68" width="144"/>
    </item>
    <item>
      <title>forecast package v9</title>
      <link>https://robjhyndman.com/hyndsight/forecast9.html</link>
      <description> &lt;p&gt;It’s been nearly nine years since the &lt;a href="../hyndsight/forecast8/"&gt;last major release of the forecast package&lt;/a&gt;, as we have been focusing on developing &lt;a href="https://fable.tidyverts.org/"&gt;&lt;code&gt;fable&lt;/code&gt;&lt;/a&gt; and &lt;a href="https://tidyverts.org"&gt;related packages&lt;/a&gt; as a tidyverse-based alternative for time series forecasting in R.&lt;/p&gt;
&lt;p&gt;However, version 9.0 of the &lt;code&gt;forecast&lt;/code&gt; package has now been released on CRAN. Thanks to Maximilian Muecke for helping with this release, and for modernising some of the old code.&lt;/p&gt;
&lt;p&gt;Here are the main new features and changes.&lt;/p&gt;
&lt;section id="new-forecasting-models" class="level2"&gt;&lt;h2 class="anchored" data-anchor-id="new-forecasting-models"&gt;New forecasting models&lt;/h2&gt;
&lt;p&gt;The usual workflow with the forecast package is to fit a model to a time series, and then forecast from the model. For example&lt;/p&gt;
&lt;div class="cell"&gt;
&lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb1" style="background: #f1f3f5;"&gt;&lt;pre class="downlit sourceCode r code-with-copy"&gt;&lt;code class="sourceCode R"&gt;&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;USAccDeaths&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;|&amp;gt;&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;ets&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;|&amp;gt;&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;forecast&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;USAccDeaths&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;|&amp;gt;&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;auto.arima&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;|&amp;gt;&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;forecast&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;But there have always been a few functions that produce forecasts directly from a time series, without the need to explicitly fit a model first. For example,&lt;/p&gt;
&lt;div class="cell"&gt;
&lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb2" style="background: #f1f3f5;"&gt;&lt;pre class="downlit sourceCode r code-with-copy"&gt;&lt;code class="sourceCode R"&gt;&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;USAccDeaths&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;|&amp;gt;&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;snaive&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;produces seasonal naive forecasts.&lt;/p&gt;
&lt;p&gt;But now you can obtain the same forecasts by first fitting a model and then forecasting from it:&lt;/p&gt;
&lt;div class="cell"&gt;
&lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb3" style="background: #f1f3f5;"&gt;&lt;pre class="downlit sourceCode r code-with-copy"&gt;&lt;code class="sourceCode R"&gt;&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;USAccDeaths&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;|&amp;gt;&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;rw_model&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;lag &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;12&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;|&amp;gt;&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;forecast&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Similarly, you can now fit and forecast from mean models, cubic spline models, theta models, and Croston’s method using the new &lt;code&gt;mean_model()&lt;/code&gt;, &lt;code&gt;spline_model()&lt;/code&gt;, &lt;code&gt;theta_model()&lt;/code&gt;, and &lt;code&gt;croston_model()&lt;/code&gt; functions. The existing &lt;code&gt;naive()&lt;/code&gt;, &lt;code&gt;snaive()&lt;/code&gt;, &lt;code&gt;rwf&lt;/code&gt;, &lt;code&gt;meanf()&lt;/code&gt;, &lt;code&gt;splinef()&lt;/code&gt;, &lt;code&gt;thetaf()&lt;/code&gt;, and &lt;code&gt;croston()&lt;/code&gt; functions are still available for backward compatibility, but are now merely wrappers around the modelling and &lt;code&gt;forecast&lt;/code&gt; functions.&lt;/p&gt;
&lt;p&gt;This should make it easier to set up forecasting workflows involving many different models. For example, suppose you wanted to compute forecasts from five different models applied to the &lt;code&gt;USAccDeaths&lt;/code&gt; time series.&lt;/p&gt;
&lt;div class="cell"&gt;
&lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb4" style="background: #f1f3f5;"&gt;&lt;pre class="downlit sourceCode r code-with-copy"&gt;&lt;code class="sourceCode R"&gt;&lt;span&gt;&lt;span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/library.html"&gt;library&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://purrr.tidyverse.org/"&gt;purrr&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;model_fns&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/list.html"&gt;list&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;ets&lt;/span&gt;, &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;auto.arima&lt;/span&gt;, &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;rw_model&lt;/span&gt;, &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;rw_model&lt;/span&gt;, &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;mean_model&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;args&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/vector.html"&gt;vector&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;"&gt;"list"&lt;/span&gt;, &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/length.html"&gt;length&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;model_fns&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;args&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;[[&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;3&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;]&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;]&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/list.html"&gt;list&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;lag &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;12&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;args&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;[[&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;4&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;]&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;]&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/list.html"&gt;list&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;lag &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;12&lt;/span&gt;, drift &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;"&gt;TRUE&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;models&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://purrr.tidyverse.org/reference/map2.html"&gt;map2&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;model_fns&lt;/span&gt;, &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;args&lt;/span&gt;, &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;~&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/do.call.html"&gt;do.call&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;.x&lt;/span&gt;, &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/c.html"&gt;c&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/list.html"&gt;list&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;y&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;USAccDeaths&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;, &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;.y&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/names.html"&gt;names&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;models&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://purrr.tidyverse.org/reference/map.html"&gt;map&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;models&lt;/span&gt;, &lt;span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"&gt;function&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;u&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt; &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;u&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;$&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;method&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;forecasts&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://purrr.tidyverse.org/reference/map.html"&gt;map&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;models&lt;/span&gt;, &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;forecast&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Note that &lt;code&gt;rw_model&lt;/code&gt; is included twice, with different arguments, allowing the calculation of seasonal naive, and seasonal naive with drift, forecasts.&lt;/p&gt;
&lt;p&gt;Forecasting with multiple models is easy to do using the &lt;a href="https://fable.tidyverts.org/"&gt;&lt;code&gt;fable&lt;/code&gt; package&lt;/a&gt; (and was one of the key considerations in its design). Now it is also possible to do it using the &lt;code&gt;forecast&lt;/code&gt; package, with this more consistent interface.&lt;/p&gt;
&lt;/section&gt;&lt;section id="missing-values-in-ets-models" class="level2"&gt;&lt;h2 class="anchored" data-anchor-id="missing-values-in-ets-models"&gt;Missing values in ETS models&lt;/h2&gt;
&lt;p&gt;I wrote the first version of the ETS code (more than 25 years ago) for a consulting project where there were no missing values, so I didn’t write the code to handle them. But obviously missing values occur a lot in many applications, and I’ve now belatedly added support for them. If there are gaps in a time series, &lt;code&gt;ets()&lt;/code&gt; can be applied, and it computes the likelihood and fitted values correctly using all available data. (Previously, it would fit a model to the largest contiguous segment of the data.)&lt;/p&gt;
&lt;p&gt;This change has also been made to the &lt;code&gt;ETS()&lt;/code&gt; function in the &lt;a href="https://fable.tidyverts.org/"&gt;&lt;code&gt;fable&lt;/code&gt; package&lt;/a&gt;.&lt;/p&gt;
&lt;/section&gt;&lt;section id="bootstrapped-prediction-intervals" class="level2"&gt;&lt;h2 class="anchored" data-anchor-id="bootstrapped-prediction-intervals"&gt;Bootstrapped prediction intervals&lt;/h2&gt;
&lt;p&gt;The default prediction intervals in the forecast package are based on the (usually reasonable) assumption that forecast errors are Gaussian. Bootstrapped prediction intervals allow for non-Gaussian forecast errors. These have long been available using ETS, ARIMA, and other models; they are now also available using ARFIMA and TBATS models.&lt;/p&gt;
&lt;/section&gt;&lt;section id="other-changes" class="level2"&gt;&lt;h2 class="anchored" data-anchor-id="other-changes"&gt;Other changes&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Added parallelization for &lt;code&gt;nnetar()&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;More consistent handling of the &lt;code&gt;biasadj&lt;/code&gt; argument across models.&lt;/li&gt;
&lt;li&gt;More consistent interface for simulated and bootstrapped prediction intervals for all models.&lt;/li&gt;
&lt;li&gt;Bug fixes and performance improvements.&lt;/li&gt;
&lt;li&gt;Documentation improvements.&lt;/li&gt;
&lt;/ul&gt;&lt;/section&gt;&lt;section id="future-of-the-forecast-package" class="level2"&gt;&lt;h2 class="anchored" data-anchor-id="future-of-the-forecast-package"&gt;Future of the forecast package&lt;/h2&gt;
&lt;p&gt;I would still encourage people to use the &lt;a href="https://fable.tidyverts.org/"&gt;&lt;code&gt;fable&lt;/code&gt; package&lt;/a&gt; for new projects, as it provides a more modern and consistent interface for time series forecasting in R. However, the &lt;code&gt;forecast&lt;/code&gt; package will continue to be maintained, with bug fixes and minor improvements as needed.&lt;/p&gt;


&lt;/section&gt; </description>
      <category>forecasting</category>
      <category>R</category>
      <category>time series</category>
      <guid>https://robjhyndman.com/hyndsight/forecast9.html</guid>
      <pubDate>Sun, 11 Jan 2026 13:00:00 GMT</pubDate>
      <content url="https://pkg.robjhyndman.com/forecast/logo.png" medium="image" type="image/png"/>
    </item>
    <item>
      <title>WAPE: Weighted Absolute Percentage Error</title>
      <link>https://robjhyndman.com/hyndsight/wape.html</link>
      <description> 



&lt;div&gt;
  &lt;div class="description"&gt;
    I was recently asked for my view on the so-called “Weighted Absolute Percentage Error” (WAPE).
  &lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;/p&gt;


&lt;p&gt;The WAPE was introduced by &lt;span class="citation" data-cites="wmape"&gt;Kolassa &amp;amp; Schütz (2007)&lt;/span&gt; who called it the MAD/Mean ratio. It is defined as &lt;img src="https://latex.codecogs.com/png.latex?%0A%5Ctext%7BWAPE%7D%20=%20%5Cfrac%7B%5Csum_%7Bt%7D%20%7Cy_t%20-%20%5Chat%7By%7D_t%7C%7D%7B%5Csum_%7Bt%7D%20%7Cy_t%7C%7D%0A"&gt; where&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;img src="https://latex.codecogs.com/png.latex?y_t"&gt; is the actual value at time &lt;img src="https://latex.codecogs.com/png.latex?t"&gt;,&lt;/li&gt;
&lt;li&gt;&lt;img src="https://latex.codecogs.com/png.latex?%5Chat%7By%7D_t"&gt; is the forecast value at time &lt;img src="https://latex.codecogs.com/png.latex?t"&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can think of it as a weighted percentage error by writing it as &lt;img src="https://latex.codecogs.com/png.latex?%0A%5Ctext%7BWAPE%7D%20=%20%5Csum_%7Bt%7D%20w_t%20%5Cfrac%7B%7Cy_t%20-%20%5Chat%7By%7D_t%7C%7D%7B%7Cy_t%7C%7D%0A"&gt; where the weights are given by &lt;img src="https://latex.codecogs.com/png.latex?w_t%20=%20%5Cfrac%7B%7Cy_t%7C%7D%7B%5Csum_%7Bt%7D%20%7Cy_t%7C%20%7D"&gt;&lt;/p&gt;
&lt;p&gt;It can also be considered a relative MAE where the comparison method has all forecasts equal to zero. In fact, &lt;img src="https://latex.codecogs.com/png.latex?1-%5Ctext%7BWAPE%7D"&gt; would give the skill score relative to the forecast of zero for all &lt;img src="https://latex.codecogs.com/png.latex?t"&gt;.&lt;/p&gt;
&lt;p&gt;Or you could think of it as like a MASE &lt;span class="citation" data-cites="HK06"&gt;(Hyndman &amp;amp; Koehler, 2006)&lt;/span&gt; but with scaling based on the sum of absolute values on the test set rather than the sum of absolute differences on the training set.&lt;/p&gt;
&lt;p&gt;This has some obvious advantages over the MAPE:&lt;/p&gt;
&lt;ol type="1"&gt;
&lt;li&gt;The MAPE is undefined when &lt;em&gt;any&lt;/em&gt; actual value in the test set is zero. The WAPE is defined even when some actuals are zero. It is only undefined when &lt;em&gt;all&lt;/em&gt; the actuals used in the denominator are zero.&lt;/li&gt;
&lt;li&gt;Optimising the MAPE does not lead to a sensible point forecasts &lt;span class="citation" data-cites="gneiting2011"&gt;(Gneiting, 2011)&lt;/span&gt;, but optimising the WAPE will lead to the median forecast.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;However, I think there are a couple of problems that do not seem to have been widely recognized.&lt;/p&gt;
&lt;ol type="1"&gt;
&lt;li&gt;The resulting estimate is only consistent when the time series is stationary. So it should not be used with data that has trends, or seasonality, or heteroscedasticity.&lt;/li&gt;
&lt;li&gt;It is quite possible to have all actuals in the test set equal to zero, especially with intermittent demand time series and small test sets. Then the denominator is zero, and the WAPE is undefined.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For these reasons, I think the Mean Absolute Scaled Error (MASE) &lt;span class="citation" data-cites="HK06"&gt;(Hyndman &amp;amp; Koehler, 2006)&lt;/span&gt; is a better choice than the WAPE. The MASE is defined as &lt;img src="https://latex.codecogs.com/png.latex?%0A%5Ctext%7BMASE%7D%20=%20%5Cfrac%7B%5Cfrac%7B1%7D%7Bn%7D%5Csum_%7Bt%7D%20%7Cy_t%20-%20%5Chat%7By%7D_t%7C%7D%7B%5Cfrac%7B1%7D%7BT-m%7D%5Csum_%7Bt=m+1%7D%5ET%20%7Cy_t%20-%20y_%7Bt-m%7D%7C%7D%0A"&gt; where &lt;img src="https://latex.codecogs.com/png.latex?m=1"&gt; for non-seasonal data, and &lt;img src="https://latex.codecogs.com/png.latex?m"&gt; is the seasonal period for seasonal data, and the sum in the numerator is over the &lt;em&gt;test&lt;/em&gt; set (of size &lt;img src="https://latex.codecogs.com/png.latex?n"&gt;), and the sum in the denominator is over the &lt;em&gt;training&lt;/em&gt; set (of size &lt;img src="https://latex.codecogs.com/png.latex?T"&gt;). Because the denominator is defined on the &lt;em&gt;training&lt;/em&gt; data, not the &lt;em&gt;test&lt;/em&gt; data, it avoids the above problems with the WAPE:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It is a consistent estimator provided the series is &lt;em&gt;difference stationary&lt;/em&gt;, which is a much weaker condition than stationarity.&lt;/li&gt;
&lt;li&gt;The training data is also usually much longer than the test data, so it is much less likely to contain only zeros. In fact, if the training data did contain only zeros, then the obvious forecasts would all be zeros too.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I don’t want to suggest there are no problems with the MASE. &lt;span class="citation" data-cites="wmape"&gt;Kolassa &amp;amp; Schütz (2007)&lt;/span&gt; point out one potential drawback of MASE — when there are structural breaks or outliers in the training data. Also, like the WAPE, optimising the MASE will lead to the median forecast, which is probably not what you want, especially when you have intermittent demand time series.&lt;/p&gt;
&lt;p&gt;These days, if I want a scale-free accuracy measure, I prefer the Root Mean Squared Scaled Error (RMSSE): &lt;img src="https://latex.codecogs.com/png.latex?%0A%5Ctext%7BRMSSE%7D%20=%20%5Csqrt%7B%5Cfrac%7B%5Cfrac%7B1%7D%7Bn%7D%5Csum_%7Bt%7D%20(y_t%20-%20%5Chat%7By%7D_t)%5E2%7D%7B%5Cfrac%7B1%7D%7BT-m%7D%5Csum_%7Bt=m+1%7D%5ET%20(y_t%20-%20y_%7Bt-m%7D)%5E2%7D%7D,%0A"&gt; where again the sum in the numerator is over the &lt;em&gt;test&lt;/em&gt; set, and the sum in the denominator is over the &lt;em&gt;training&lt;/em&gt; set. This has all the advantages (and most disadvantages) of the MASE, but optimising it leads to the mean forecast rather than the median. It also aligns better with how models are estimated. Almost all models are estimated by minimising the sum of squared errors, so it makes sense to evaluate them using squared errors as well.&lt;/p&gt;
&lt;p&gt;Point forecast reconciliation also works on means rather than medians, and is optimised using least squares, so it is more natural to evaluate using a squared error measure.&lt;/p&gt;
&lt;section id="update-on-consistency-and-stationarity" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="update-on-consistency-and-stationarity"&gt;Update on consistency and stationarity&lt;/h2&gt;
&lt;p&gt;The comments below suggest that I need to explain the consistency issue in more detail. Imagine you are forecasting a time series that is a simple linear trend with some noise. So &lt;img src="https://latex.codecogs.com/png.latex?y_t%20=%20a%20+%20bt%20+%20%5Cvarepsilon_t"&gt;, where &lt;img src="https://latex.codecogs.com/png.latex?%5Cvarepsilon_t"&gt; is Gaussian white noise with mean 0 and variance &lt;img src="https://latex.codecogs.com/png.latex?%5Csigma%5E2"&gt;. As a good forecaster, you would fit a linear trend to this series, so your forecasts would be &lt;img src="https://latex.codecogs.com/png.latex?%5Chat%7By%7D_t%20=%20%5Chat%7Ba%7D%20+%20%5Chat%7Bb%7Dt"&gt;. To keep it simple, let’s ignore the estimation error in this model and set &lt;img src="https://latex.codecogs.com/png.latex?%5Chat%7Ba%7D%20=%20a"&gt; and &lt;img src="https://latex.codecogs.com/png.latex?%5Chat%7Bb%7D%20=%20b"&gt;.&lt;/p&gt;
&lt;p&gt;Now let’s generate forecasts for this series over a test set of &lt;img src="https://latex.codecogs.com/png.latex?n"&gt; observations (either the next &lt;img src="https://latex.codecogs.com/png.latex?n"&gt; time periods, or over a cross-validated set). If you use the RMSE to evaluate these forecasts, you obtain &lt;img src="https://latex.codecogs.com/png.latex?%0A%5Ctext%7BRMSE%7D%20=%20%5Csqrt%7B%5Cfrac%7B1%7D%7Bn%7D%5Csum_%7Bt%7D%20(y_%7Bt%7D%20-%20%5Chat%7By%7D_%7Bt%7D)%5E2%7D%20=%20%5Csqrt%7B%5Cfrac%7B1%7D%7Bn%7D%20%5Csum_%7Bt%7D%20%5Cvarepsilon_%7Bt%7D%5E2%7D,%0A"&gt; which is an estimate of the variance of the noise. As more observations are included in the calculation, the RMSE will converge to &lt;img src="https://latex.codecogs.com/png.latex?%5Csigma"&gt;. That makes it “consistent” in a statistical sense. Practically, it also means that the expected RMSE does not depend on which observations you use to evaluate the forecasts — the RMSE values will be similar regardless of the test set used in the calculation. That is, if you evaluate the forecasts over the next week, the RMSE will be similar to the RMSE calculated on a cross-validated set.&lt;/p&gt;
&lt;p&gt;Suppose, instead, we use the RMSSE to evaluate the forecasts. The RMSSE is equal to the RMSE divided by &lt;img src="https://latex.codecogs.com/png.latex?%5Csqrt%7B%5Cfrac%7B1%7D%7BT-1%7D%5Csum_%7Bt=2%7D%5ET%20(y_%7Bt%7D%20-%20y_%7Bt-1%7D)%5E2%7D%20=%20%5Csqrt%7B%5Cfrac%7B1%7D%7BT-1%7D%5Csum_%7Bt=2%7D%5ET%20(b%20+%20%5Cvarepsilon_t%20-%20%5Cvarepsilon_%7Bt-1%7D)%5E2%7D"&gt; So the RMSSE is still consistent (it converges to &lt;img src="https://latex.codecogs.com/png.latex?%5Csigma/%5Csqrt%7Bb%5E2%20+%202%5Csigma%5E2%7D"&gt;), and the expected RMSSE does not depend on which observations you use to evaluate the forecasts.&lt;/p&gt;
&lt;p&gt;Now, suppose we use the WAPE to evaluate these forecasts. Then we obtain &lt;img src="https://latex.codecogs.com/png.latex?%0A%5Ctext%7BWAPE%7D%20=%20%5Cfrac%7B%5Csum_%7Bt%7D%20%7Cy_t%20-%20%5Chat%7By%7D_t%7C%7D%7B%5Csum_%7Bt%7D%20%7Cy_t%7C%7D%20=%20%5Cfrac%7B%5Cfrac1n%20%5Csum_%7Bt%7D%20%7C%5Cvarepsilon_t%7C%7D%7B%5Cfrac1n%20%5Csum_%7Bt%7D%20%7Ca%20+%20bt%20+%20%5Cvarepsilon_t%7C%7D,%0A"&gt; where both sums are over the test set. As &lt;img src="https://latex.codecogs.com/png.latex?n"&gt; increases, the numerator will converge to the mean absolute value of the noise, approximately &lt;img src="https://latex.codecogs.com/png.latex?0.798%20%5Csigma"&gt;. But the denominator won’t converge at all as it depends on the trend in the series. So the WAPE is not a consistent estimator of anything.&lt;/p&gt;
&lt;p&gt;To see the effect of this, imagine the time series is daily sales, and you produce forecasts each week for the next 7 observations, and evaluate them using the WAPE. Over time, your WAPE values get smaller and smaller, because the denominator is growing larger and larger as the trend accumulates. So you have the illusion of improving accuracy, but your forecasts are really no more accurate than they were at the start.&lt;/p&gt;
&lt;p&gt;While I have used a linear trend as the example here, similar problems can occur whenever the underlying time series is not stationary.&lt;/p&gt;



&lt;/section&gt;

&lt;div id="quarto-appendix" class="default"&gt;&lt;section class="quarto-appendix-contents" id="quarto-bibliography"&gt;&lt;h2 class="anchored quarto-appendix-heading"&gt;References&lt;/h2&gt;&lt;div id="refs" class="references csl-bib-body hanging-indent" data-entry-spacing="0"&gt;
&lt;div id="ref-gneiting2011" class="csl-entry"&gt;
Gneiting, T. (2011). Making and evaluating point forecasts. &lt;em&gt;Journal of the American Statistical Association&lt;/em&gt;, &lt;em&gt;106&lt;/em&gt;(494), 746–762.
&lt;/div&gt;
&lt;div id="ref-HK06" class="csl-entry"&gt;
Hyndman, R. J., &amp;amp; Koehler, A. B. (2006). Another look at measures of forecast accuracy. &lt;em&gt;International J Forecasting&lt;/em&gt;, &lt;em&gt;22&lt;/em&gt;(4), 679–688. &lt;a href="https://robjhyndman.com/publications/another-look-at-measures-of-forecast-accuracy/"&gt;https://robjhyndman.com/publications/another-look-at-measures-of-forecast-accuracy/&lt;/a&gt;
&lt;/div&gt;
&lt;div id="ref-wmape" class="csl-entry"&gt;
Kolassa, S., &amp;amp; Schütz, W. (2007). Advantages of the MAD/mean ratio over the MAPE. &lt;em&gt;Foresight: The International Journal of Applied Forecasting&lt;/em&gt;, &lt;em&gt;6&lt;/em&gt;, 40–43.
&lt;/div&gt;
&lt;/div&gt;&lt;/section&gt;&lt;/div&gt; </description>
      <category>forecasting</category>
      <guid>https://robjhyndman.com/hyndsight/wape.html</guid>
      <pubDate>Thu, 07 Aug 2025 14:00:00 GMT</pubDate>
      <content url="https://robjhyndman.com/img/wape.png" medium="image" type="image/png" height="89" width="144"/>
    </item>
    <item>
      <title>fpp3 package update</title>
      <link>https://robjhyndman.com/hyndsight/fpp3-update.html</link>
      <description> &lt;div&gt;
  &lt;div class="description"&gt;
    The &lt;a href="https://pkg.robjhyndman.com/fpp3/"&gt;&lt;code&gt;fpp3&lt;/code&gt; package&lt;/a&gt; has had its first major update since the book was published.
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;


&lt;p&gt;The &lt;a href="https://pkg.robjhyndman.com/fpp3/"&gt;&lt;code&gt;fpp3&lt;/code&gt; package&lt;/a&gt; is a companion to the book &lt;a href="https://OTexts.com/fpp3/"&gt;Forecasting: Principles and Practice&lt;/a&gt; (3rd edition, Hyndman &amp;amp; Athanasopoulos, OTexts). When you load the package, it loads the data and functions needed for the examples in the book.&lt;/p&gt;
&lt;div class="cell"&gt;
&lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb1" style="background: #f1f3f5;"&gt;&lt;pre class="downlit sourceCode r code-with-copy"&gt;&lt;code class="sourceCode R"&gt;&lt;span&gt;&lt;span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/library.html"&gt;library&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://pkg.robjhyndman.com/fpp3/"&gt;fpp3&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class="cell-output cell-output-stderr"&gt;
&lt;pre&gt;&lt;code&gt;── Attaching packages ──────────────────────────────────────────── fpp3 1.0.0 ──&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class="cell-output cell-output-stderr"&gt;
&lt;pre&gt;&lt;code&gt;✔ tibble      3.2.1     ✔ tsibble     1.1.4
✔ dplyr       1.1.4     ✔ tsibbledata 0.4.1
✔ tidyr       1.3.1     ✔ feasts      0.3.2
✔ lubridate   1.9.3     ✔ fable       0.3.4
✔ ggplot2     3.5.1     ✔ fabletools  0.4.2&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class="cell-output cell-output-stderr"&gt;
&lt;pre&gt;&lt;code&gt;── Conflicts ───────────────────────────────────────────────── fpp3_conflicts ──
✖ lubridate::date()    masks base::date()
✖ dplyr::filter()      masks stats::filter()
✖ tsibble::intersect() masks base::intersect()
✖ tsibble::interval()  masks lubridate::interval()
✖ dplyr::lag()         masks stats::lag()
✖ tsibble::setdiff()   masks base::setdiff()
✖ tsibble::union()     masks base::union()&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This provides a shorthand way of attaching the packages needed for most time series forecasting tasks, using packages from the &lt;a href="https://tidyverts.org"&gt;tidyverts&lt;/a&gt;, just as the &lt;a href="https://www.tidyverse.org/packages/"&gt;&lt;code&gt;tidyverse&lt;/code&gt; package&lt;/a&gt; does for data manipulation and visualization.&lt;/p&gt;
&lt;p&gt;In the most recent update, we have added many new data sets that can be used as examples by instructors, or for users to practice their forecasting skills.&lt;/p&gt;
&lt;p&gt;Each of these new data sets were previously used in an exam for the forecasting subjects taught by George Athanasopoulos and me at Monash University. Three of our exams are available online for those who are interested to see how we assess forecasting students.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://af.numbat.space/exams/exam_2021.pdf"&gt;2021&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://af.numbat.space/exams/exam_2022.pdf"&gt;2022&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://af.numbat.space/exams/exam_2023.pdf"&gt;2023&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Each year, we take a new data set, and write the exam around how to analyse the time series. We strongly believe in assessing students on their forecasting skills with real data, rather than using artificial data, or asking technical questions that are not relevant to real-world forecasting. As a result, our exams are quite different from anything we have seen elsewhere.&lt;/p&gt;
&lt;p&gt;We also think it is best to use “fresh and local”&lt;sup&gt;1&lt;/sup&gt; data sets. So the data are almost always from Australia, and included data up to about a month before the exam was written.&lt;/p&gt;
&lt;p&gt;In the latest update to the &lt;a href="https://pkg.robjhyndman.com/fpp3/"&gt;&lt;code&gt;fpp3&lt;/code&gt; package&lt;/a&gt;, we have expanded these data sets to cover more series than we did in the exams, and in most cases updated them to include more recent observations.&lt;/p&gt;
&lt;p&gt;The new data sets are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://pkg.robjhyndman.com/fpp3/reference/aus_births.html"&gt;&lt;code&gt;aus_births&lt;/code&gt;&lt;/a&gt;: Australian births data&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://pkg.robjhyndman.com/fpp3/reference/aus_fertility.html"&gt;&lt;code&gt;aus_fertility&lt;/code&gt;&lt;/a&gt;: Australian fertility rates&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://pkg.robjhyndman.com/fpp3/reference/aus_inbound.html"&gt;&lt;code&gt;aus_inbound&lt;/code&gt;&lt;/a&gt;: Monthly short term (&amp;lt;1 year) visitor arrivals to Australia&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://pkg.robjhyndman.com/fpp3/reference/aus_migration.html"&gt;&lt;code&gt;aus_migration&lt;/code&gt;&lt;/a&gt;: Australian migration data&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://pkg.robjhyndman.com/fpp3/reference/aus_mortality.html"&gt;&lt;code&gt;aus_mortality&lt;/code&gt;&lt;/a&gt;: Australian mortality data&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://pkg.robjhyndman.com/fpp3/reference/aus_outbound.html"&gt;&lt;code&gt;aus_outbound&lt;/code&gt;&lt;/a&gt;: Monthly short term (&amp;lt;1 year) resident departures in Australia&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://pkg.robjhyndman.com/fpp3/reference/aus_tobacco.html"&gt;&lt;code&gt;aus_tobacco&lt;/code&gt;&lt;/a&gt;: Australian cigarette and tobacco expenditure&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://pkg.robjhyndman.com/fpp3/reference/aus_vehicle_sales.html"&gt;&lt;code&gt;aus_vehicle_sales&lt;/code&gt;&lt;/a&gt;: Australian vehicle sales&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://pkg.robjhyndman.com/fpp3/reference/melb_walkers.html"&gt;&lt;code&gt;melb_walkers&lt;/code&gt;&lt;/a&gt;: Average daily total pedestrian count in Melbourne&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://pkg.robjhyndman.com/fpp3/reference/nsw_offences.html"&gt;&lt;code&gt;nsw_offences&lt;/code&gt;&lt;/a&gt;: Monthly offences in NSW&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://pkg.robjhyndman.com/fpp3/reference/ny_childcare.html"&gt;&lt;code&gt;ny_childcare&lt;/code&gt;&lt;/a&gt;: New York childcare data&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://pkg.robjhyndman.com/fpp3/reference/otexts_views.html"&gt;&lt;code&gt;otexts_views&lt;/code&gt;&lt;/a&gt;: OTexts page views&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Thanks to Nuwani Palihawadana and Shanika Wickramasuriya for most of the work on this latest update, completed at the &lt;a href="https://numbat.space/posts/hackathon_2024/"&gt;NUMBAT hackathon&lt;/a&gt; last month.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://numbat.space/posts/hackathon_2024/project1.jpg" class="img-fluid"&gt;&lt;/p&gt;


&lt;div id="quarto-appendix" class="default"&gt;&lt;section id="footnotes" class="footnotes footnotes-end-of-document"&gt;&lt;h2 class="anchored quarto-appendix-heading"&gt;Footnotes&lt;/h2&gt;
&lt;ol&gt;
&lt;li id="fn1"&gt;&lt;p&gt;Thanks to &lt;a href="https://dicook.org"&gt;Di Cook&lt;/a&gt; for this phrase.↩︎&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/section&gt;&lt;/div&gt; </description>
      <category>forecasting</category>
      <category>R</category>
      <category>teaching</category>
      <guid>https://robjhyndman.com/hyndsight/fpp3-update.html</guid>
      <pubDate>Tue, 25 Jun 2024 14:00:00 GMT</pubDate>
      <content url="https://pkg.robjhyndman.com/fpp3/logo.png" medium="image" type="image/png"/>
    </item>
    <item>
      <title>AIC calculations</title>
      <link>https://robjhyndman.com/hyndsight/lm_aic.html</link>
      <description> &lt;div&gt;
  &lt;div class="description"&gt;
    The AIC returned by &lt;code&gt;TSLM()&lt;/code&gt; is different from that returned by &lt;code&gt;&lt;a href="https://rdrr.io/r/stats/lm.html"&gt;lm()&lt;/a&gt;&lt;/code&gt;. Why?
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;


&lt;p&gt;I get this question a lot, so I thought it might help to explain some issues with AIC calculation.&lt;/p&gt;
&lt;p&gt;First, the equation for the AIC is given by &lt;img src="https://latex.codecogs.com/png.latex?%0A%5Ctext%7BAIC%7D%20=%202k%20-%202%5Clog(L),%0A"&gt; where &lt;img src="https://latex.codecogs.com/png.latex?L"&gt; is the likelihood of the model and &lt;img src="https://latex.codecogs.com/png.latex?k"&gt; is the number of parameters that are estimated (including the error variance). For a linear regression model with iid &lt;img src="https://latex.codecogs.com/png.latex?N(0,%5Csigma%5E2)"&gt; errors, fitted to &lt;img src="https://latex.codecogs.com/png.latex?n"&gt; observations, the log-likelihood can be written as &lt;img src="https://latex.codecogs.com/png.latex?%0A%5Clog(L)%20=%20-%5Cfrac%7Bn%7D%7B2%7D%5Clog(2%5Cpi)%20-%20%5Cfrac%7Bn%7D%7B2%7D%5Clog(%5Csigma%5E2)%20-%20%5Cfrac%7B1%7D%7B2%5Csigma%5E2%7D%5Csum_%7Bi=1%7D%5En%20%5Chat%7Be%7D_i%5E2%0A"&gt; where &lt;img src="https://latex.codecogs.com/png.latex?%5Chat%7Be%7D_i"&gt; is the residual for the &lt;img src="https://latex.codecogs.com/png.latex?i"&gt;th observation. The AIC is then &lt;img src="https://latex.codecogs.com/png.latex?%0A%5Ctext%7BAIC%7D%20=%202k%20+%20n%5Clog(2%5Cpi)%20+%20n%5Clog(%5Csigma%5E2)%20%20+%20%5Cfrac%7B1%7D%7B%5Csigma%5E2%7D%5Csum_%7Bi=1%7D%5En%20%5Chat%7Be%7D_i%5E2.%0A"&gt; Since we don’t know &lt;img src="https://latex.codecogs.com/png.latex?%5Csigma%5E2"&gt;, we estimate it using the mean squared error (the maximum likelihood estimator), giving &lt;img src="https://latex.codecogs.com/png.latex?%5Cbegin%7Balign*%7D%0A%5Ctext%7BAIC%7D%20&amp;amp;%20=%202k%20+n%5Clog(2%5Cpi)%20+%20n%5Clog(%5Ctext%7BMSE%7D)%20+%20n%20%5C%5C%0A&amp;amp;%20=%202k%20+%20n%5Clog(%5Ctext%7BMSE%7D)%20+%20C%0A%5Cend%7Balign*%7D"&gt; where &lt;img src="https://latex.codecogs.com/png.latex?C%20=%20n%20+%20n%5Clog(2%5Cpi)"&gt; is a constant that depends only on the sample size and not on the model. This constant is often ignored. Thus, different software implementations can lead to different AIC values for the same model, since they may include or exclude the constant &lt;img src="https://latex.codecogs.com/png.latex?C"&gt;.&lt;/p&gt;
&lt;p&gt;Now, let’s look at what R returns in a simple case using the &lt;code&gt;&lt;a href="https://rdrr.io/r/stats/lm.html"&gt;lm()&lt;/a&gt;&lt;/code&gt; function.&lt;/p&gt;
&lt;div class="cell"&gt;
&lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb1" style="background: #f1f3f5;"&gt;&lt;pre class="downlit sourceCode r code-with-copy"&gt;&lt;code class="sourceCode R"&gt;&lt;span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/Random.html"&gt;set.seed&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;2023&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/library.html"&gt;library&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://pkg.robjhyndman.com/fpp3/"&gt;fpp3&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;df&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;tibble&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;  time &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/seq.html"&gt;seq&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;100&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;,&lt;/span&gt;
&lt;span&gt;  x &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/stats/Normal.html"&gt;rnorm&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;100&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;,&lt;/span&gt;
&lt;span&gt;  y &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;x&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;+&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/stats/Normal.html"&gt;rnorm&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;100&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;fit&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/stats/lm.html"&gt;lm&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;y&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;~&lt;/span&gt; &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;x&lt;/span&gt;, data &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;df&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/stats/AIC.html"&gt;AIC&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;fit&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class="cell-output cell-output-stdout"&gt;
&lt;pre&gt;&lt;code&gt;[1] 275.6267&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;We can check how this is calculated by computing it ourselves.&lt;/p&gt;
&lt;div class="cell"&gt;
&lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb3" style="background: #f1f3f5;"&gt;&lt;pre class="downlit sourceCode r code-with-copy"&gt;&lt;code class="sourceCode R"&gt;&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;mse&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/mean.html"&gt;mean&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/stats/residuals.html"&gt;residuals&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;fit&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;^&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;2&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;n&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/length.html"&gt;length&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/stats/residuals.html"&gt;residuals&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;fit&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;k&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/length.html"&gt;length&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;fit&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;$&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;coefficients&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;+&lt;/span&gt; &lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;1&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;# With constant&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;2&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;*&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;k&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;+&lt;/span&gt; &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;n&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;*&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/Log.html"&gt;log&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;mse&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;+&lt;/span&gt; &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;n&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;*&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/Log.html"&gt;log&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;2&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;*&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;pi&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;+&lt;/span&gt; &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class="cell-output cell-output-stdout"&gt;
&lt;pre&gt;&lt;code&gt;[1] 275.6267&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb5" style="background: #f1f3f5;"&gt;&lt;pre class="downlit sourceCode r code-with-copy"&gt;&lt;code class="sourceCode R"&gt;&lt;span&gt;&lt;span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;# Without constant&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;2&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;*&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;k&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;+&lt;/span&gt; &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;n&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;*&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/Log.html"&gt;log&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;mse&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class="cell-output cell-output-stdout"&gt;
&lt;pre&gt;&lt;code&gt;[1] -8.161047&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Clearly, &lt;code&gt;&lt;a href="https://rdrr.io/r/stats/AIC.html"&gt;AIC()&lt;/a&gt;&lt;/code&gt; applied to the output from &lt;code&gt;&lt;a href="https://rdrr.io/r/stats/lm.html"&gt;lm()&lt;/a&gt;&lt;/code&gt; is using the version with the constant.&lt;/p&gt;
&lt;p&gt;Now compare that with what we obtain using the &lt;code&gt;TSLM()&lt;/code&gt; function from the fable package.&lt;/p&gt;
&lt;div class="cell"&gt;
&lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb7" style="background: #f1f3f5;"&gt;&lt;pre class="downlit sourceCode r code-with-copy"&gt;&lt;code class="sourceCode R"&gt;&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;df&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;|&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;  &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;as_tsibble&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;index &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;time&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;|&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;  &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;model&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;TSLM&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;y&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;~&lt;/span&gt; &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;x&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;|&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;  &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;glance&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;|&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;  &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;pull&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;AIC&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class="cell-output cell-output-stdout"&gt;
&lt;pre&gt;&lt;code&gt;[1] -8.161047&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This is the AIC without the constant.&lt;/p&gt;
&lt;p&gt;The situation is even more confusing with ARIMA models, and some other model classes, because some functions use approximations to the likelihood, rather than the exact likelihood.&lt;/p&gt;
&lt;p&gt;Thus, AIC values can be compared across models fitted using the same functions, but not necessarily when models have been fitted using different functions.&lt;/p&gt;



 </description>
      <category>AIC</category>
      <guid>https://robjhyndman.com/hyndsight/lm_aic.html</guid>
      <pubDate>Tue, 31 Oct 2023 13:00:00 GMT</pubDate>
      <content url="https://robjhyndman.com/img/aic_lm.png" medium="image" type="image/png" height="69" width="144"/>
    </item>
    <item>
      <title>P-values for prediction intervals</title>
      <link>https://robjhyndman.com/hyndsight/forecasting-pvalues.html</link>
      <description> 



&lt;div&gt;
  &lt;div class="description"&gt;
    Does it make any sense to compute p-values for prediction intervals?
  &lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;/p&gt;


&lt;p&gt;I received this email today:&lt;/p&gt;
&lt;blockquote class="blockquote"&gt;
&lt;p&gt;My team recently used some techniques found in your writings to perform forecasts … Our work has been well received by reviewers, but one commenter asked two questions that I was hoping you may be able to provide insight on.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote class="blockquote"&gt;
&lt;p&gt;First, they wanted to know if we could provide P-values for our prediction intervals. In our work, we said, “Observed rates were deemed significantly different from expected rates when they did not fall within the 95% PI.” This same language has been used by others published in the same journal. I am curious to hear your thoughts on giving P-values for these PIs and what the appropriate method for doing so would be (if any).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote class="blockquote"&gt;
&lt;p&gt;Second, they asked about making a correction for multiple comparisons. … I believe we could apply a Bonferroni correction to the PIs, but that feels too liberal. Moreover, I am curious if this is even called for given our statement of what is deemed significant and the fact that our prediction interval construction relies on a non-parametric method.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Here is my reply:&lt;/p&gt;
&lt;ol type="1"&gt;
&lt;li&gt;&lt;p&gt;I don’t think this makes any sense. A p-value is the probability of obtaining observations at least as extreme as those observed given a null hypothesis. What’s the hypothesis here? In forecasting, we don’t usually have a hypothesis. Instead, we fit a model to the data, and make predictions based on the model. I guess you could make the null hypothesis “The future observations come from the forecast distributions”, and then the p-value for each future time period would be the probability of the tails beyond the observations. But it is well-known that the estimated prediction intervals are almost always too narrow due to them not taking into account all sources of variance. So the size of this test would not be well-calibrated. I think you’re better off pushing back rather than trying to meet the request.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A Bonferroni correction assumes independence between the intervals, and that is not true for PIs from a forecasting model. The future forecast errors are all correlated (with the strength of the correlation depending on the model and the DGP). Usually we just say that these are pointwise PI, and so we expect 5% of observations to fall outside the 95% prediction intervals. It is possible to generate uniform PI, which contain 95% of all future sample paths, but this is a little tricky due to the correlations between horizons. It could be done via simulation – simulate a 1000 future sample paths and compute the envelope that contains 950 of them.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;It sounds like the reviewers are only familiar with inferential statistics, and not with predictive modelling. You could point them to Shmueli’s excellent &lt;a href="https://doi.org/10.1214/10-STS330"&gt;2010 paper “To explain or predict”&lt;/a&gt;, highlighting the differences between the two paradigms.&lt;/p&gt;



 </description>
      <category>forecasting</category>
      <category>time series</category>
      <guid>https://robjhyndman.com/hyndsight/forecasting-pvalues.html</guid>
      <pubDate>Tue, 17 Oct 2023 13:00:00 GMT</pubDate>
      <content url="https://robjhyndman.com/img/PI.png" medium="image" type="image/png" height="71" width="144"/>
    </item>
    <item>
      <title>How NASA didn’t discover the hole in the ozone layer</title>
      <link>https://robjhyndman.com/hyndsight/ozone-hole-anomaly.html</link>
      <description> &lt;div&gt;
  &lt;div class="description"&gt;
    I am writing a new textbook on anomaly detection. It probably won’t be finished for at least a year, but here is an excerpt.
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;


&lt;hr&gt;
&lt;p&gt;There is a widespread myth that NASA did not discover the hole in the ozone layer above the Antarctic because they had been throwing away anomalous data that would have revealed it. This is not true, but the real story is also instructive &lt;span class="citation" data-cites="Pukelsheim1990 Christie2001 christie2004data"&gt;(Pukelsheim 1990; Christie 2001, 2004)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;NASA had been collecting satellite data on Antarctic ozone levels using a Total Ozone Mapping Spectrometer (TOMS) since 1979, while British scientists had collected ozone data using ground sensors at the Halley Research Station, on the edge of the Brunt Ice Shelf in Antarctica, since 1957. Figure&amp;nbsp;1 shows average daily values from the NASA measurements in blue, and from the British observations in orange. There is a clear downward trend in the British data, especially from the late 1970s, which is confirmed with the NASA data. So why wasn’t the “ozone hole” discovered until 1985?&lt;/p&gt;
&lt;div class="cell"&gt;
&lt;div class="cell-output-display"&gt;
&lt;div id="fig-halley" class="quarto-float quarto-figure quarto-figure-center anchored"&gt;
&lt;figure class="quarto-float quarto-float-fig figure"&gt;&lt;div aria-describedby="fig-halley-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca"&gt;
&lt;img src="https://robjhyndman.com/hyndsight/ozone-hole-anomaly_files/figure-html/fig-halley-1.png" class="img-fluid figure-img" style="width:100.0%"&gt;
&lt;/div&gt;
&lt;figcaption class="quarto-float-caption-bottom quarto-float-caption quarto-float-fig" id="fig-halley-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca"&gt;
Figure&amp;nbsp;1: Observations of Antarctic ozone levels since 1957, measured in Dobson units (DU). Observations are mean daily values from October each year. Ground observations are from Halley Research Station, while satellite observations were obtained using a Total Ozone Mapping Spectrometer (TOMS). The satellite data were obtained from &lt;a href="https://ozonewatch.gsfc.nasa.gov/facts/history_SH.html"&gt;Leslie R Lait (NASA)&lt;/a&gt;, while the Halley ground observations were obtained from &lt;a href="https://www.antarctica.ac.uk/met/jds/ozone/"&gt;Jonathan Shanklin (British Antarctic Survey)&lt;/a&gt;. The horizontal line shows the threshold of 180 DU, used by NASA to determine when the ozone level was unusually low.
&lt;/figcaption&gt;&lt;/figure&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The British scientists had noticed the low ozone values as early as 1981, but it took a few years for the scientists to be convinced that the low values were real and not due to instrument problems, and then there were the usual publication delays. Eventually, the results were published in &lt;span class="citation" data-cites="Farman1985"&gt;Farman et al. (1985)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Meanwhile, NASA was flagging observations as anomalous when they were below 180 DU (shown as a horizontal line in Figure&amp;nbsp;1). As is clear from the figure, this is much lower than any of the plotted points before the early 1980s. However, the 180 threshold was used for the &lt;em&gt;daily&lt;/em&gt; measurements, which are much more variable than the monthly averages that are plotted. Occasionally daily observations did fall below 180, and so it was a reasonable threshold for the purpose of identifying instrument problems.&lt;/p&gt;
&lt;p&gt;In fact, NASA had checked the unusually low TOMS values obtained before 1985 by comparing them against other available data. But the other data available to them showed ozone values of about 300 DU, so it was assumed that the satellite sensor was malfunctioning. The British Halley data were not available to them, and only after the publication of &lt;span class="citation" data-cites="Farman1985"&gt;Farman et al. (1985)&lt;/span&gt; did the NASA scientists realise that the TOMS results were accurate.&lt;/p&gt;
&lt;p&gt;In 1986, NASA scientists were able to confirm the British finding, also demonstrating that the ozone hole was widespread across the Antarctic &lt;span class="citation" data-cites="stolarski1986nimbus"&gt;(Stolarski et al. 1986)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;This example reveals some lessons about anomaly detection:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The NASA threshold of 180 was based on daily data, and was designed to identify instrument problems, not genuine systematic changes in ozone levels. The implicit assumption was that ozone levels varied seasonally, but that otherwise the distribution of observations was stable. All anomaly detection involves some implicit assumptions like this, and it is well to be aware of them.&lt;/li&gt;
&lt;li&gt;Sometimes what we think are anomalies are not really anomalies, but the result of incorrect assumptions.&lt;/li&gt;
&lt;li&gt;Often smoothing or averaging data will help to reveal issues that are not so obvious from the original data. This reduces the variation in the data, and allows more systematic variation to be uncovered.&lt;/li&gt;
&lt;li&gt;Always plot the data. In this case, a graph such as Figure&amp;nbsp;1 would have revealed the problem in the late 1970s, but it seems no-one was producing plots like this.&lt;/li&gt;
&lt;/ul&gt;




&lt;div id="quarto-appendix" class="default"&gt;&lt;section class="quarto-appendix-contents" id="quarto-bibliography"&gt;&lt;h2 class="anchored quarto-appendix-heading"&gt;References&lt;/h2&gt;&lt;div id="refs" class="references csl-bib-body hanging-indent"&gt;
&lt;div id="ref-Christie2001" class="csl-entry"&gt;
Christie, M. 2001. &lt;em&gt;The Ozone Layer: A Philosophy of Science Perspective&lt;/em&gt;. Cambridge University Press.
&lt;/div&gt;
&lt;div id="ref-christie2004data" class="csl-entry"&gt;
Christie, M. 2004. &lt;span&gt;“Data Collection and the Ozone Hole: Too Much of a Good Thing?”&lt;/span&gt; &lt;em&gt;History of Meteorology&lt;/em&gt; 1: 99–105.
&lt;/div&gt;
&lt;div id="ref-Farman1985" class="csl-entry"&gt;
Farman, J C, B G Gardiner, and J D Shanklin. 1985. &lt;span&gt;“Large Losses of Total Ozone in &lt;span&gt;Antarctica&lt;/span&gt; Reveal Seasonal &lt;span&gt;ClO&lt;img src="https://latex.codecogs.com/png.latex?_x"&gt;/NO&lt;img src="https://latex.codecogs.com/png.latex?_x"&gt;&lt;/span&gt; Interaction.”&lt;/span&gt; &lt;em&gt;Nature&lt;/em&gt; 315 (6016): 207–10.
&lt;/div&gt;
&lt;div id="ref-Pukelsheim1990" class="csl-entry"&gt;
Pukelsheim, F. 1990. &lt;span&gt;“Robustness of Statistical Gossip and the &lt;span&gt;Antarctic&lt;/span&gt; Ozone Hole.”&lt;/span&gt; &lt;em&gt;The IMS Bulletin&lt;/em&gt; 19 (4): 540–45.
&lt;/div&gt;
&lt;div id="ref-stolarski1986nimbus" class="csl-entry"&gt;
Stolarski, R S, A J Krueger, M R Schoeberl, R D McPeters, P A Newman, and J C Alpert. 1986. &lt;span&gt;“Nimbus 7 Satellite Measurements of the Springtime &lt;span&gt;Antarctic&lt;/span&gt; Ozone Decrease.”&lt;/span&gt; &lt;em&gt;Nature&lt;/em&gt; 322 (6082): 808–11.
&lt;/div&gt;
&lt;/div&gt;&lt;/section&gt;&lt;/div&gt; </description>
      <category>anomalies</category>
      <guid>https://robjhyndman.com/hyndsight/ozone-hole-anomaly.html</guid>
      <pubDate>Thu, 28 Sep 2023 14:00:00 GMT</pubDate>
      <content url="https://robjhyndman.com/img/fig-halley-1.png" medium="image" type="image/png" height="62" width="144"/>
    </item>
    <item>
      <title>Forecast model selection</title>
      <link>https://robjhyndman.com/hyndsight/model-selection.html</link>
      <description> 



&lt;div&gt;
  &lt;div class="description"&gt;
    When using a training/test split, or time-series cross-validation, are you choosing a specific model or a model class?
  &lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;/p&gt;


&lt;p&gt;This question arises most time I teach a forecasting workshop, and it was raised again in the following email I received today:&lt;/p&gt;
&lt;blockquote class="blockquote"&gt;
&lt;p&gt;I have a time series that I have split into training and test datasets with an 80%-20% ratio. I fit a series of different models (ETS, BATS, ARIMA, NN etc) to the training data and generate my forecasts from each model. When evaluating the forecasts against the test set I find the model that gives the best outcome is an ARIMA(1,1,1) that was selected using the auto.arima function. My question is this, should I proceed to fit an ARIMA(1,1,1) to the whole data set, or should I use the auto.arima function again which may give me a slightly different (p,d,q) order as there is now an extra 20% of unseen data available to the forecast model? Any guidance would be greatly received.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If you only have one class of model to consider (e.g., only ETS or only ARIMA), then it is easy enough to select the model on all available data using the AIC, and use the selected model to forecast the future. But if you are selecting between model classes, then you need to use either a training/test split, or (preferably) a &lt;a href="https://otexts.com/fpp3/tscv.html"&gt;time-series cross-validation&lt;/a&gt; procedure.&lt;/p&gt;
&lt;p&gt;If you use time-series cross-validation, then there would usually be different models selected for each training set, and the cross-validated error is a measure of how well the model class works for your data. In that case, there is no single model for the training data, and you are selecting the &lt;em&gt;model class&lt;/em&gt; rather than a specific model. This makes it clear that you should then apply the selected model class to all the data, when forecasting beyond the end of the available data. In other words, if you choose ARIMA over ETS, then you would then fit an ARIMA model to all the data, and use that model to forecast the future.&lt;/p&gt;
&lt;p&gt;You can think of a simple training/test split as a special case of time-series cross-validation, where there is a single fold. So the same argument applies. That is, you are selecting the model class that works best for your data, and so you should apply that model class to all the data, when forecasting beyond the end of the available data.&lt;/p&gt;
&lt;p&gt;This example also illustrates why it is important to use a time-series cross-validation procedure, rather than a simple training/test split. In this case, the ARIMA model was selected because it happened to work best for the particular training/test split that was used. But if a different split had been used, then a different model might have been selected. So the model selection is not stable. By averaging over multiple folds using a time-series cross-validation procedure, you can get a more stable estimate of the model class that works best for your data.&lt;/p&gt;



 </description>
      <category>forecasting</category>
      <category>time series</category>
      <guid>https://robjhyndman.com/hyndsight/model-selection.html</guid>
      <pubDate>Tue, 26 Sep 2023 14:00:00 GMT</pubDate>
      <content url="https://robjhyndman.com/files/cv1-1.png" medium="image" type="image/png" height="68" width="144"/>
    </item>
    <item>
      <title>Videos for Forecasting: principles and practice (3rd ed)</title>
      <link>https://robjhyndman.com/hyndsight/fpp3_videos.html</link>
      <description> 



&lt;div&gt;
  &lt;div class="description"&gt;
    Over the past 6 months, George Athanasopoulos and I have added videos to most sections of the 3rd edition of our textbook &lt;em&gt;Forecasting: principles and practice&lt;/em&gt;.
  &lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;/p&gt;


&lt;p&gt;We have taught from the book many times, but this year we decided to pre-record short videos for each section. Our students often prefer a video explanation than reading the textbook, and we thought other readers might appreciate hearing from us as well.&lt;/p&gt;
&lt;p&gt;These videos are embedded in most sections of the book. So far, we’ve covered the sections that we include in our own courses, but we hope to eventually have videos for all sections. Most of these were done in a single take, so they are sometimes a little rough, but hopefully still useful.&lt;/p&gt;
&lt;p&gt;You can view the &lt;a href="https://www.youtube.com/playlist?list=PLyCNZ_xXGzpm7W9jLqbIyBAiSO5jDwJeE"&gt;entire playlist on YouTube&lt;/a&gt;.&lt;/p&gt;



 </description>
      <category>forecasting</category>
      <category>time series</category>
      <category>fpp</category>
      <category>otexts</category>
      <category>video</category>
      <guid>https://robjhyndman.com/hyndsight/fpp3_videos.html</guid>
      <pubDate>Thu, 20 Jul 2023 14:00:00 GMT</pubDate>
      <content url="https://robjhyndman.com/img/thumbs/fpp3videos.jpg" medium="image" type="image/jpeg"/>
    </item>
    <item>
      <title>Degrees of freedom for a Ljung-Box test</title>
      <link>https://robjhyndman.com/hyndsight/ljung_box_df.html</link>
      <description> &lt;div&gt;
  &lt;div class="description"&gt;
    The Ljung-Box test is widely used to test for autocorrelation remaining in the residuals after fitting a model to a time series. In this post, I look at the degrees of freedom used in such tests.
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;

&lt;section id="the-ljung-box-test" class="level2"&gt;&lt;h2 class="anchored" data-anchor-id="the-ljung-box-test"&gt;The Ljung-Box test&lt;/h2&gt;
&lt;p&gt;Suppose an ARMA(&lt;img src="https://latex.codecogs.com/png.latex?p,q"&gt;) model is fitted to a time series of length &lt;img src="https://latex.codecogs.com/png.latex?T"&gt;, giving a series of residuals &lt;img src="https://latex.codecogs.com/png.latex?e_1,%5Cdots,e_T"&gt;, and let the autocorrelations of this residual series be denoted by &lt;img src="https://latex.codecogs.com/png.latex?%0Ar_k%20=%20%5Csum_%7Bt=k+1%7D%5ET%20e_te_%7Bt-k%7D%20%5CBig/%20%5Csum_%7Bt=1%7D%5ET%20e_t%5E2,%20%5Cqquad%20k=1,2,%5Cdots%0A"&gt; The first &lt;img src="https://latex.codecogs.com/png.latex?%5Cell"&gt; autocorrelations are used to construct the statistic &lt;img src="https://latex.codecogs.com/png.latex?%0A%20%20Q%20=%20T(T+2)%20%5Csum_%7Bk=1%7D%5E%5Cell%20(T-k)%5E%7B-1%7Dr_k%5E2.%0A"&gt;&lt;/p&gt;
&lt;p&gt;This statistic was discussed by &lt;span class="citation" data-cites="BP70"&gt;Box and Pierce (1970)&lt;/span&gt;, who argued that if &lt;img src="https://latex.codecogs.com/png.latex?T"&gt; is large, and the model parameters correspond to the true data generating process, then &lt;img src="https://latex.codecogs.com/png.latex?Q"&gt; has a &lt;img src="https://latex.codecogs.com/png.latex?%5Cchi%5E2"&gt; distribution with &lt;img src="https://latex.codecogs.com/png.latex?%5Cell"&gt; degrees of freedom. Later, &lt;span class="citation" data-cites="LB78"&gt;Ljung and Box (1978)&lt;/span&gt; showed that if the model is correct, but with unknown parameters, then &lt;img src="https://latex.codecogs.com/png.latex?Q"&gt; has a &lt;img src="https://latex.codecogs.com/png.latex?%5Cchi%5E2"&gt; distribution with &lt;img src="https://latex.codecogs.com/png.latex?%5Cell-p-q"&gt; degrees of freedom.&lt;/p&gt;
&lt;/section&gt;&lt;section id="extensions-to-other-models" class="level2"&gt;&lt;h2 class="anchored" data-anchor-id="extensions-to-other-models"&gt;Extensions to other models&lt;/h2&gt;
&lt;p&gt;These days, the Ljung-Box test is applied to a lot more models than non-seasonal ARMA models, and it is not clear what the degrees of freedom should be for other models. For example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What if the model includes an intercept term? Should that be included in the degrees of freedom calculation?&lt;/li&gt;
&lt;li&gt;What about a seasonal ARIMA model? Do we just count all coefficients?&lt;/li&gt;
&lt;li&gt;Or a regression with ARMA errors? Should we include the regression coefficients when computing the degrees of freedom?&lt;/li&gt;
&lt;li&gt;Or an ETS model? Do we count just the smoothing parameters, or do we include the states as well, or something else?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Not long ago, I had naively assumed that the correct degrees of freedom would be &lt;img src="https://latex.codecogs.com/png.latex?%5Cell-K"&gt; where &lt;img src="https://latex.codecogs.com/png.latex?K"&gt; is the number of parameters estimated. I am in good company because Andrew Harvey in &lt;span class="citation" data-cites="harvey90"&gt;Harvey (1990, p259)&lt;/span&gt; made exactly the same conjecture. That was what was coded in the &lt;a href="https://pkg.robjhyndman.com/forecast/reference/checkresiduals.html"&gt;&lt;code&gt;forecast::checkresiduals()&lt;/code&gt;&lt;/a&gt; function prior to v8.21, and how the test was applied in &lt;span class="citation" data-cites="fpp2"&gt;Hyndman and Athanasopoulos (2018)&lt;/span&gt; and &lt;span class="citation" data-cites="fpp3"&gt;Hyndman and Athanasopoulos (2021)&lt;/span&gt; until February 2023. But a recent &lt;a href="https://github.com/robjhyndman/forecast/issues/908"&gt;github discussion with Achim Zeilis&lt;/a&gt; convinced me that it is incorrect.&lt;/p&gt;
&lt;p&gt;Let’s look at a few examples. For each model, we will simulate 5000 series, each of length 250 observations. For each series, we compute the p-value of a Ljung-Box test with &lt;img src="https://latex.codecogs.com/png.latex?%5Cell=10"&gt; and &lt;img src="https://latex.codecogs.com/png.latex?%5Cell-K"&gt; degrees of freedom, for different values of &lt;img src="https://latex.codecogs.com/png.latex?K"&gt;. Under the null hypothesis of uncorrelated residuals, the &lt;img src="https://latex.codecogs.com/png.latex?p"&gt; values should have a uniform distribution.&lt;/p&gt;
&lt;div class="cell" data-hash="ljung_box_df_cache/html/setup_73aa324bb41a8896d092ef7907d377c6"&gt;
&lt;details class="code-fold"&gt;&lt;summary&gt;Code&lt;/summary&gt;&lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb1" style="background: #f1f3f5;"&gt;&lt;pre class="downlit sourceCode r code-with-copy"&gt;&lt;code class="sourceCode R"&gt;&lt;span&gt;&lt;span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/library.html"&gt;library&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://pkg.robjhyndman.com/forecast/"&gt;forecast&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/library.html"&gt;library&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://ggplot2.tidyverse.org"&gt;ggplot2&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/Random.html"&gt;set.seed&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;0&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;# Function to simulate p-values given a DGP model and&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;# a function to fit the model to a time series&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;simulate_pvalue&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"&gt;function&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;model&lt;/span&gt;, &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;fit_fn&lt;/span&gt;, &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;l&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;10&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;  &lt;span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;## simulate series&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;  &lt;span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"&gt;if&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/NULL.html"&gt;is.null&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;model&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;$&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;xreg&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;    &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;y&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/stats/simulate.html"&gt;simulate&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;model&lt;/span&gt;, n &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;250&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;  &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;}&lt;/span&gt; &lt;span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"&gt;else&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;    &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;y&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/stats/simulate.html"&gt;simulate&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;model&lt;/span&gt;, xreg&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;model&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;$&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;xreg&lt;/span&gt;, n&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;250&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;  &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;  &lt;span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"&gt;if&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/class.html"&gt;inherits&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;model&lt;/span&gt;, &lt;span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;"&gt;"ets"&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;    &lt;span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;# If multiplicative errors, fix non-positive values&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;    &lt;span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"&gt;if&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;model&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;$&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;components&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;[&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;1&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;]&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;==&lt;/span&gt; &lt;span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;"&gt;"M"&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;      &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;y&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;[&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;y&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;0&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;]&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;1e-5&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;  &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;  &lt;span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;## Fit model&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;  &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;m&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;fit_fn&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;y&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;  &lt;span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;## compute p-values for various df&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;  &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;pv&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;purrr&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;::&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://purrr.tidyverse.org/reference/map.html"&gt;map_vec&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;0&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;:&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;3&lt;/span&gt;, m&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;m&lt;/span&gt;,&lt;/span&gt;
&lt;span&gt;    &lt;span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"&gt;function&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;x&lt;/span&gt;, &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;m&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;      &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/stats/box.test.html"&gt;Box.test&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/stats/residuals.html"&gt;residuals&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;m&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;, lag &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;l&lt;/span&gt;, fitdf &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;x&lt;/span&gt;, type &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;"&gt;"Ljung-Box"&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;$&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;p.value&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;    &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;  &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;  &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/names.html"&gt;names&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;pv&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/paste.html"&gt;paste&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;"&gt;"K ="&lt;/span&gt;, &lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;0&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;:&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;3&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;  &lt;span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/function.html"&gt;return&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;pv&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;# Function to replicate the above function&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;simulate_pvalues&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"&gt;function&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;model&lt;/span&gt;, &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;fit_fn&lt;/span&gt;, &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;nsim&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;5000&lt;/span&gt;, &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;l&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;10&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;  &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;purrr&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;::&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://purrr.tidyverse.org/reference/map_dfr.html"&gt;map_dfr&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/seq.html"&gt;seq&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;nsim&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;, &lt;span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"&gt;function&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;x&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;    &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;simulate_pvalue&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;model&lt;/span&gt;, &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;fit_fn&lt;/span&gt;, l&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;l&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;  &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;}&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;# Histograms of p values&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;hist_pvalues&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"&gt;function&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;pv&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;  &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;pv&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;|&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;    &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;tidyr&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;::&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://tidyr.tidyverse.org/reference/pivot_longer.html"&gt;pivot_longer&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;cols &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/seq.html"&gt;seq&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/nrow.html"&gt;NCOL&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;arima_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;|&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;    &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://ggplot2.tidyverse.org/reference/ggplot.html"&gt;ggplot&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://ggplot2.tidyverse.org/reference/aes.html"&gt;aes&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;x &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;value&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;+&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;    &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://ggplot2.tidyverse.org/reference/geom_histogram.html"&gt;geom_histogram&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;bins &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;30&lt;/span&gt;, boundary &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;0&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;+&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;    &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://ggplot2.tidyverse.org/reference/facet_grid.html"&gt;facet_grid&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;.&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;~&lt;/span&gt; &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;name&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;+&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;    &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://ggplot2.tidyverse.org/reference/labs.html"&gt;labs&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;title &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;"&gt;"P value distributions"&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;# A nice table of the size of the test&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;table_pvalues&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"&gt;function&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;pv&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;  &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;tibble&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;::&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://tibble.tidyverse.org/reference/tibble.html"&gt;tibble&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;`test size` &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/c.html"&gt;c&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;0.01&lt;/span&gt;, &lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;0.05&lt;/span&gt;, &lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;0.1&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://magrittr.tidyverse.org/reference/pipe.html"&gt;%&amp;gt;%&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;    &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;dplyr&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;::&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://dplyr.tidyverse.org/reference/bind_cols.html"&gt;bind_cols&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;      &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;purrr&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;::&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://purrr.tidyverse.org/reference/map_dfr.html"&gt;map_df&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;pv&lt;/span&gt;, &lt;span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"&gt;function&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;x&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;{&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/stats/ecdf.html"&gt;ecdf&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;x&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;.&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;$&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;`test size`&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;}&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;    &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;|&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;    &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;knitr&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;::&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/pkg/knitr/man/kable.html"&gt;kable&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/details&gt;
&lt;/div&gt;
&lt;/section&gt;&lt;section id="arima-models-with-an-intercept" class="level2"&gt;&lt;h2 class="anchored" data-anchor-id="arima-models-with-an-intercept"&gt;ARIMA models with an intercept&lt;/h2&gt;
&lt;p&gt;We will simulate from an ARIMA(2,0,0) model with a non-zero intercept. For the Ljung-Box test, we will consider &lt;img src="https://latex.codecogs.com/png.latex?0%20%5Cle%20K%20%5Cle%203"&gt;. Note that &lt;img src="https://latex.codecogs.com/png.latex?K=0"&gt; was the original proposal by &lt;span class="citation" data-cites="BP70"&gt;Box and Pierce (1970)&lt;/span&gt;, &lt;img src="https://latex.codecogs.com/png.latex?K=2=p+q"&gt; counts only ARMA coefficients, and &lt;img src="https://latex.codecogs.com/png.latex?K=3"&gt; counts all parameters estimated in the model. The resulting distributions of the p-values are shown below.&lt;/p&gt;
&lt;div class="cell" data-hash="ljung_box_df_cache/html/ARIMA_bf5b946ec3736ef80cfade5f8f0a5bbd"&gt;
&lt;details class="code-fold"&gt;&lt;summary&gt;Code&lt;/summary&gt;&lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb2" style="background: #f1f3f5;"&gt;&lt;pre class="downlit sourceCode r code-with-copy"&gt;&lt;code class="sourceCode R"&gt;&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;model&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://pkg.robjhyndman.com/forecast/reference/Arima.html"&gt;Arima&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/MathFun.html"&gt;sqrt&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;lynx&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;, order&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/c.html"&gt;c&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;2&lt;/span&gt;,&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;0&lt;/span&gt;,&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;0&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;fit_fn&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"&gt;function&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;y&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;  &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://pkg.robjhyndman.com/forecast/reference/Arima.html"&gt;Arima&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;y&lt;/span&gt;, order &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/c.html"&gt;c&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;2&lt;/span&gt;, &lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;0&lt;/span&gt;, &lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;0&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;, include.mean &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;"&gt;TRUE&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;arima_pvalues&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;simulate_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;model&lt;/span&gt;, &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;fit_fn&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;hist_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;arima_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/details&gt;&lt;div class="cell-output-display"&gt;
&lt;div&gt;
&lt;figure class="figure"&gt;&lt;p&gt;&lt;img src="https://robjhyndman.com/hyndsight/ljung_box_df_files/figure-html/ARIMA-1.png" class="img-fluid figure-img" width="768"&gt;&lt;/p&gt;
&lt;/figure&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;details class="code-fold"&gt;&lt;summary&gt;Code&lt;/summary&gt;&lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb3" style="background: #f1f3f5;"&gt;&lt;pre class="downlit sourceCode r code-with-copy"&gt;&lt;code class="sourceCode R"&gt;&lt;span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;table_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;arima_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/details&gt;&lt;div class="cell-output-display"&gt;
&lt;table class="caption-top table table-sm table-striped small"&gt;
&lt;thead&gt;&lt;tr class="header"&gt;
&lt;th style="text-align: right;"&gt;test size&lt;/th&gt;
&lt;th style="text-align: right;"&gt;K = 0&lt;/th&gt;
&lt;th style="text-align: right;"&gt;K = 1&lt;/th&gt;
&lt;th style="text-align: right;"&gt;K = 2&lt;/th&gt;
&lt;th style="text-align: right;"&gt;K = 3&lt;/th&gt;
&lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="odd"&gt;
&lt;td style="text-align: right;"&gt;0.01&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0046&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0072&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0124&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0220&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="even"&gt;
&lt;td style="text-align: right;"&gt;0.05&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0226&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0354&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0534&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0818&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="odd"&gt;
&lt;td style="text-align: right;"&gt;0.10&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0474&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0678&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.1016&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.1514&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Clearly the one with &lt;img src="https://latex.codecogs.com/png.latex?K=2"&gt; is better than the alternatives. The table shows the empirical size of the test for different threshold levels. The empirical sizes are closest to the nominal sizes when &lt;img src="https://latex.codecogs.com/png.latex?K=2=p+q"&gt;. So we shouldn’t count the intercept when computing the degrees of freedom.&lt;/p&gt;
&lt;/section&gt;&lt;section id="seasonal-arima-model" class="level2"&gt;&lt;h2 class="anchored" data-anchor-id="seasonal-arima-model"&gt;Seasonal ARIMA model&lt;/h2&gt;
&lt;p&gt;Next, we will simulate from an ARIMA(0,1,1)(0,1,1)&lt;img src="https://latex.codecogs.com/png.latex?_%7B12%7D"&gt; model, often called the “airline model” due to its application to the Air passenger series in &lt;span class="citation" data-cites="BJ2016"&gt;Box et al. (2016)&lt;/span&gt;. In fact, our DGP for the simulations will be a model fitted to the &lt;code&gt;AirPassengers&lt;/code&gt; data set. Again, we consider &lt;img src="https://latex.codecogs.com/png.latex?0%5Cle%20K%20%5Cle%203"&gt;. There are two parameters to be estimated.&lt;/p&gt;
&lt;div class="cell" data-hash="ljung_box_df_cache/html/SARIMA_4f343c5c334a772e904f79bb38dbff4b"&gt;
&lt;details class="code-fold"&gt;&lt;summary&gt;Code&lt;/summary&gt;&lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb4" style="background: #f1f3f5;"&gt;&lt;pre class="downlit sourceCode r code-with-copy"&gt;&lt;code class="sourceCode R"&gt;&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;model&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://pkg.robjhyndman.com/forecast/reference/Arima.html"&gt;Arima&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/Log.html"&gt;log&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;AirPassengers&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;, order&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/c.html"&gt;c&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;0&lt;/span&gt;,&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;1&lt;/span&gt;,&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;1&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;, seasonal&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/c.html"&gt;c&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;0&lt;/span&gt;,&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;1&lt;/span&gt;,&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;1&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;fit_fn&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"&gt;function&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;y&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;  &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://pkg.robjhyndman.com/forecast/reference/Arima.html"&gt;Arima&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;y&lt;/span&gt;, order &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/c.html"&gt;c&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;0&lt;/span&gt;,&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;1&lt;/span&gt;,&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;1&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;, seasonal&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/c.html"&gt;c&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;0&lt;/span&gt;,&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;1&lt;/span&gt;,&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;1&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;sarima_pvalues&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;simulate_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;model&lt;/span&gt;, &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;fit_fn&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;hist_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;sarima_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/details&gt;&lt;div class="cell-output-display"&gt;
&lt;div&gt;
&lt;figure class="figure"&gt;&lt;p&gt;&lt;img src="https://robjhyndman.com/hyndsight/ljung_box_df_files/figure-html/SARIMA-1.png" class="img-fluid figure-img" width="768"&gt;&lt;/p&gt;
&lt;/figure&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;details class="code-fold"&gt;&lt;summary&gt;Code&lt;/summary&gt;&lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb5" style="background: #f1f3f5;"&gt;&lt;pre class="downlit sourceCode r code-with-copy"&gt;&lt;code class="sourceCode R"&gt;&lt;span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;table_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;sarima_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/details&gt;&lt;div class="cell-output-display"&gt;
&lt;table class="caption-top table table-sm table-striped small"&gt;
&lt;thead&gt;&lt;tr class="header"&gt;
&lt;th style="text-align: right;"&gt;test size&lt;/th&gt;
&lt;th style="text-align: right;"&gt;K = 0&lt;/th&gt;
&lt;th style="text-align: right;"&gt;K = 1&lt;/th&gt;
&lt;th style="text-align: right;"&gt;K = 2&lt;/th&gt;
&lt;th style="text-align: right;"&gt;K = 3&lt;/th&gt;
&lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="odd"&gt;
&lt;td style="text-align: right;"&gt;0.01&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0100&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0170&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0282&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0456&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="even"&gt;
&lt;td style="text-align: right;"&gt;0.05&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0484&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0684&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.1018&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.1452&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="odd"&gt;
&lt;td style="text-align: right;"&gt;0.10&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0882&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.1218&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.1774&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.2526&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Interesting. Although there are two parameters here, the tests with &lt;img src="https://latex.codecogs.com/png.latex?K=0"&gt; and &lt;img src="https://latex.codecogs.com/png.latex?K=1"&gt; do better than &lt;img src="https://latex.codecogs.com/png.latex?K=2"&gt;. I would have expected &lt;img src="https://latex.codecogs.com/png.latex?K=p+q+P+Q"&gt; to be the right choice, but the test with &lt;img src="https://latex.codecogs.com/png.latex?K=2"&gt; has empirical size about twice the nominal size.&lt;/p&gt;
&lt;p&gt;As a guess, perhaps the seasonal parameters aren’t having an effect with &lt;img src="https://latex.codecogs.com/png.latex?%5Cell=10"&gt;. We can test what happens for larger &lt;img src="https://latex.codecogs.com/png.latex?%5Cell"&gt; by setting &lt;img src="https://latex.codecogs.com/png.latex?%5Cell=24"&gt; (covering two years), and repeating the exercise.&lt;/p&gt;
&lt;div class="cell" data-hash="ljung_box_df_cache/html/SARIMA2_dc188e115e90f0c6d881e8c3058e4d5f"&gt;
&lt;details class="code-fold"&gt;&lt;summary&gt;Code&lt;/summary&gt;&lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb6" style="background: #f1f3f5;"&gt;&lt;pre class="downlit sourceCode r code-with-copy"&gt;&lt;code class="sourceCode R"&gt;&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;sarima_pvalues&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;simulate_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;model&lt;/span&gt;, &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;fit_fn&lt;/span&gt;, l&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;24&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;hist_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;sarima_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/details&gt;&lt;div class="cell-output-display"&gt;
&lt;div&gt;
&lt;figure class="figure"&gt;&lt;p&gt;&lt;img src="https://robjhyndman.com/hyndsight/ljung_box_df_files/figure-html/SARIMA2-1.png" class="img-fluid figure-img" width="768"&gt;&lt;/p&gt;
&lt;/figure&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;details class="code-fold"&gt;&lt;summary&gt;Code&lt;/summary&gt;&lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb7" style="background: #f1f3f5;"&gt;&lt;pre class="downlit sourceCode r code-with-copy"&gt;&lt;code class="sourceCode R"&gt;&lt;span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;table_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;sarima_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/details&gt;&lt;div class="cell-output-display"&gt;
&lt;table class="caption-top table table-sm table-striped small"&gt;
&lt;thead&gt;&lt;tr class="header"&gt;
&lt;th style="text-align: right;"&gt;test size&lt;/th&gt;
&lt;th style="text-align: right;"&gt;K = 0&lt;/th&gt;
&lt;th style="text-align: right;"&gt;K = 1&lt;/th&gt;
&lt;th style="text-align: right;"&gt;K = 2&lt;/th&gt;
&lt;th style="text-align: right;"&gt;K = 3&lt;/th&gt;
&lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="odd"&gt;
&lt;td style="text-align: right;"&gt;0.01&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0134&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0164&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0216&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0278&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="even"&gt;
&lt;td style="text-align: right;"&gt;0.05&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0492&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0614&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0748&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0940&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="odd"&gt;
&lt;td style="text-align: right;"&gt;0.10&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0864&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.1066&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.1312&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.1590&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;I was expecting &lt;img src="https://latex.codecogs.com/png.latex?K=2"&gt; to do best there, but not so. &lt;img src="https://latex.codecogs.com/png.latex?K=1"&gt; is the most uniform, and &lt;img src="https://latex.codecogs.com/png.latex?K=0"&gt; gives empirical sizes closest to the nominal sizes, with the results getting worse as &lt;img src="https://latex.codecogs.com/png.latex?K"&gt; increases. Perhaps always setting &lt;img src="https://latex.codecogs.com/png.latex?K=p+q"&gt; would be a sensible strategy for ARIMA models, even if they contain seasonal components. This needs some theoretical analysis.&lt;/p&gt;
&lt;/section&gt;&lt;section id="regression-with-arma-errors" class="level2"&gt;&lt;h2 class="anchored" data-anchor-id="regression-with-arma-errors"&gt;Regression with ARMA errors&lt;/h2&gt;
&lt;p&gt;We will simulate from a linear trend model with AR(1) errors. Here, &lt;img src="https://latex.codecogs.com/png.latex?K=1"&gt; counts only ARMA coefficients, while &lt;img src="https://latex.codecogs.com/png.latex?K=3"&gt; counts all parameters estimated. The resulting distributions of the p-values are shown below.&lt;/p&gt;
&lt;div class="cell" data-hash="ljung_box_df_cache/html/RegARIMA_cbaf48eec0adfe101d66336169d575ee"&gt;
&lt;details class="code-fold"&gt;&lt;summary&gt;Code&lt;/summary&gt;&lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb8" style="background: #f1f3f5;"&gt;&lt;pre class="downlit sourceCode r code-with-copy"&gt;&lt;code class="sourceCode R"&gt;&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;model&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://pkg.robjhyndman.com/forecast/reference/Arima.html"&gt;Arima&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;10&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;+&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/seq.html"&gt;seq&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;250&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;/&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;10&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;+&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/stats/arima.sim.html"&gt;arima.sim&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/list.html"&gt;list&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;ar&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;0.7&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;, n&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;250&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;,&lt;/span&gt;
&lt;span&gt;               order &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/c.html"&gt;c&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;1&lt;/span&gt;,&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;0&lt;/span&gt;,&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;0&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;, xreg &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/seq.html"&gt;seq&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;250&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;fit_fn&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"&gt;function&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;y&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;  &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://pkg.robjhyndman.com/forecast/reference/Arima.html"&gt;Arima&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;y&lt;/span&gt;, order &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/c.html"&gt;c&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;1&lt;/span&gt;,&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;0&lt;/span&gt;,&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;0&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;, include.constant &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;"&gt;TRUE&lt;/span&gt;, xreg &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/seq.html"&gt;seq&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;250&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;regarima_pvalues&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;simulate_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;model&lt;/span&gt;, &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;fit_fn&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;hist_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;regarima_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/details&gt;&lt;div class="cell-output-display"&gt;
&lt;div&gt;
&lt;figure class="figure"&gt;&lt;p&gt;&lt;img src="https://robjhyndman.com/hyndsight/ljung_box_df_files/figure-html/RegARIMA-1.png" class="img-fluid figure-img" width="768"&gt;&lt;/p&gt;
&lt;/figure&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;details class="code-fold"&gt;&lt;summary&gt;Code&lt;/summary&gt;&lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb9" style="background: #f1f3f5;"&gt;&lt;pre class="downlit sourceCode r code-with-copy"&gt;&lt;code class="sourceCode R"&gt;&lt;span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;table_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;regarima_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/details&gt;&lt;div class="cell-output-display"&gt;
&lt;table class="caption-top table table-sm table-striped small"&gt;
&lt;thead&gt;&lt;tr class="header"&gt;
&lt;th style="text-align: right;"&gt;test size&lt;/th&gt;
&lt;th style="text-align: right;"&gt;K = 0&lt;/th&gt;
&lt;th style="text-align: right;"&gt;K = 1&lt;/th&gt;
&lt;th style="text-align: right;"&gt;K = 2&lt;/th&gt;
&lt;th style="text-align: right;"&gt;K = 3&lt;/th&gt;
&lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="odd"&gt;
&lt;td style="text-align: right;"&gt;0.01&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0072&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0104&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0176&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0294&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="even"&gt;
&lt;td style="text-align: right;"&gt;0.05&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0310&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0532&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0782&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.1200&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="odd"&gt;
&lt;td style="text-align: right;"&gt;0.10&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0696&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0996&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.1478&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.2150&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The test with &lt;img src="https://latex.codecogs.com/png.latex?K=1"&gt; looks the most uniform, with the size of the test closest to the nominal values. So only counting ARMA coefficients seems to be correct here.&lt;/p&gt;
&lt;/section&gt;&lt;section id="regression-model" class="level2"&gt;&lt;h2 class="anchored" data-anchor-id="regression-model"&gt;Regression model&lt;/h2&gt;
&lt;p&gt;Next, we will consider a linear trend model with iid errors. That is the same as the previous model, but with a simpler error structure.&lt;/p&gt;
&lt;div class="cell" data-hash="ljung_box_df_cache/html/trend_e646b62c4f784041c6d6ca8ffbfb8c90"&gt;
&lt;details class="code-fold"&gt;&lt;summary&gt;Code&lt;/summary&gt;&lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb10" style="background: #f1f3f5;"&gt;&lt;pre class="downlit sourceCode r code-with-copy"&gt;&lt;code class="sourceCode R"&gt;&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;model&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://pkg.robjhyndman.com/forecast/reference/Arima.html"&gt;Arima&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;10&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;+&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/seq.html"&gt;seq&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;250&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;/&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;10&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;+&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/stats/Normal.html"&gt;rnorm&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;250&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;,&lt;/span&gt;
&lt;span&gt;               order &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/c.html"&gt;c&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;0&lt;/span&gt;,&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;0&lt;/span&gt;,&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;0&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;, xreg &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/seq.html"&gt;seq&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;250&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;fit_fn&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"&gt;function&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;y&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;  &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://pkg.robjhyndman.com/forecast/reference/Arima.html"&gt;Arima&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;y&lt;/span&gt;, include.constant &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;"&gt;TRUE&lt;/span&gt;, xreg &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/seq.html"&gt;seq&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;250&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;trend_pvalues&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;simulate_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;model&lt;/span&gt;, &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;fit_fn&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;hist_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;trend_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/details&gt;&lt;div class="cell-output-display"&gt;
&lt;div&gt;
&lt;figure class="figure"&gt;&lt;p&gt;&lt;img src="https://robjhyndman.com/hyndsight/ljung_box_df_files/figure-html/trend-1.png" class="img-fluid figure-img" width="768"&gt;&lt;/p&gt;
&lt;/figure&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;details class="code-fold"&gt;&lt;summary&gt;Code&lt;/summary&gt;&lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb11" style="background: #f1f3f5;"&gt;&lt;pre class="downlit sourceCode r code-with-copy"&gt;&lt;code class="sourceCode R"&gt;&lt;span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;table_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;trend_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/details&gt;&lt;div class="cell-output-display"&gt;
&lt;table class="caption-top table table-sm table-striped small"&gt;
&lt;thead&gt;&lt;tr class="header"&gt;
&lt;th style="text-align: right;"&gt;test size&lt;/th&gt;
&lt;th style="text-align: right;"&gt;K = 0&lt;/th&gt;
&lt;th style="text-align: right;"&gt;K = 1&lt;/th&gt;
&lt;th style="text-align: right;"&gt;K = 2&lt;/th&gt;
&lt;th style="text-align: right;"&gt;K = 3&lt;/th&gt;
&lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="odd"&gt;
&lt;td style="text-align: right;"&gt;0.01&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0148&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0214&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0338&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0554&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="even"&gt;
&lt;td style="text-align: right;"&gt;0.05&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0580&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0844&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.1204&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.1746&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="odd"&gt;
&lt;td style="text-align: right;"&gt;0.10&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.1054&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.1478&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.2062&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.2816&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The test with &lt;img src="https://latex.codecogs.com/png.latex?K=0"&gt; looks best. If we think of a regression model as a RegARIMA model with ARIMA(0,0,0) errors, this is consistent with the previous results, setting &lt;img src="https://latex.codecogs.com/png.latex?K=p+q"&gt;.&lt;/p&gt;
&lt;/section&gt;&lt;section id="etsann-model" class="level2"&gt;&lt;h2 class="anchored" data-anchor-id="etsann-model"&gt;ETS(A,N,N) model&lt;/h2&gt;
&lt;p&gt;Now let’s try an ETS(A,N,N) model, again using 5000 series each of length 250. If we count only the smoothing parameter, &lt;img src="https://latex.codecogs.com/png.latex?K=1"&gt;, but if we count all estimated parameters, &lt;img src="https://latex.codecogs.com/png.latex?K=2"&gt;. The distributions of p-values are shown below.&lt;/p&gt;
&lt;div class="cell" data-hash="ljung_box_df_cache/html/ETSANN_9f1c0d5c8fff6f356206cab28c8540d1"&gt;
&lt;details class="code-fold"&gt;&lt;summary&gt;Code&lt;/summary&gt;&lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb12" style="background: #f1f3f5;"&gt;&lt;pre class="downlit sourceCode r code-with-copy"&gt;&lt;code class="sourceCode R"&gt;&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;model&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://pkg.robjhyndman.com/forecast/reference/ets.html"&gt;ets&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;fma&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;::&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://pkg.robjhyndman.com/fma/reference/strikes.html"&gt;strikes&lt;/a&gt;&lt;/span&gt;, &lt;span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;"&gt;"ANN"&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;fit_fn&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"&gt;function&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;y&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;  &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://pkg.robjhyndman.com/forecast/reference/ets.html"&gt;ets&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;y&lt;/span&gt;, model &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;"&gt;"ANN"&lt;/span&gt;, damped &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;"&gt;FALSE&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;ets_pvalues&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;simulate_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;model&lt;/span&gt;, &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;fit_fn&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;hist_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;ets_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/details&gt;&lt;div class="cell-output-display"&gt;
&lt;div&gt;
&lt;figure class="figure"&gt;&lt;p&gt;&lt;img src="https://robjhyndman.com/hyndsight/ljung_box_df_files/figure-html/ETSANN-1.png" class="img-fluid figure-img" width="768"&gt;&lt;/p&gt;
&lt;/figure&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;details class="code-fold"&gt;&lt;summary&gt;Code&lt;/summary&gt;&lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb13" style="background: #f1f3f5;"&gt;&lt;pre class="downlit sourceCode r code-with-copy"&gt;&lt;code class="sourceCode R"&gt;&lt;span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;table_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;ets_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/details&gt;&lt;div class="cell-output-display"&gt;
&lt;table class="caption-top table table-sm table-striped small"&gt;
&lt;thead&gt;&lt;tr class="header"&gt;
&lt;th style="text-align: right;"&gt;test size&lt;/th&gt;
&lt;th style="text-align: right;"&gt;K = 0&lt;/th&gt;
&lt;th style="text-align: right;"&gt;K = 1&lt;/th&gt;
&lt;th style="text-align: right;"&gt;K = 2&lt;/th&gt;
&lt;th style="text-align: right;"&gt;K = 3&lt;/th&gt;
&lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="odd"&gt;
&lt;td style="text-align: right;"&gt;0.01&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0064&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0112&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0174&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0316&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="even"&gt;
&lt;td style="text-align: right;"&gt;0.05&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0334&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0522&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0778&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.1196&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="odd"&gt;
&lt;td style="text-align: right;"&gt;0.10&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0702&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0960&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.1442&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.2098&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;img src="https://latex.codecogs.com/png.latex?K=1"&gt; looks about right. That makes sense as an ETS(A,N,N) model is equivalent to an ARIMA(0,1,1) model.&lt;/p&gt;
&lt;/section&gt;&lt;section id="etsmnn-model" class="level2"&gt;&lt;h2 class="anchored" data-anchor-id="etsmnn-model"&gt;ETS(M,N,N) model&lt;/h2&gt;
&lt;p&gt;Next, let’s try an ETS(M,N,N) model, which has no ARIMA equivalent, but which has one smoothing parameter and one initial state to estimate.&lt;/p&gt;
&lt;div class="cell" data-hash="ljung_box_df_cache/html/ETSMNN_f5812bbdc26dd90d28e49ba2533a74d9"&gt;
&lt;details class="code-fold"&gt;&lt;summary&gt;Code&lt;/summary&gt;&lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb14" style="background: #f1f3f5;"&gt;&lt;pre class="downlit sourceCode r code-with-copy"&gt;&lt;code class="sourceCode R"&gt;&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;model&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://pkg.robjhyndman.com/forecast/reference/ets.html"&gt;ets&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;fma&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;::&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://pkg.robjhyndman.com/fma/reference/strikes.html"&gt;strikes&lt;/a&gt;&lt;/span&gt;, &lt;span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;"&gt;"MNN"&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;fit_fn&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"&gt;function&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;y&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;  &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://pkg.robjhyndman.com/forecast/reference/ets.html"&gt;ets&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;y&lt;/span&gt;, model &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;"&gt;"MNN"&lt;/span&gt;, damped &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;"&gt;FALSE&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;ets_pvalues&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;simulate_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;model&lt;/span&gt;, &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;fit_fn&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;hist_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;ets_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/details&gt;&lt;div class="cell-output-display"&gt;
&lt;div&gt;
&lt;figure class="figure"&gt;&lt;p&gt;&lt;img src="https://robjhyndman.com/hyndsight/ljung_box_df_files/figure-html/ETSMNN-1.png" class="img-fluid figure-img" width="768"&gt;&lt;/p&gt;
&lt;/figure&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;details class="code-fold"&gt;&lt;summary&gt;Code&lt;/summary&gt;&lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb15" style="background: #f1f3f5;"&gt;&lt;pre class="downlit sourceCode r code-with-copy"&gt;&lt;code class="sourceCode R"&gt;&lt;span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;table_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;ets_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/details&gt;&lt;div class="cell-output-display"&gt;
&lt;table class="caption-top table table-sm table-striped small"&gt;
&lt;thead&gt;&lt;tr class="header"&gt;
&lt;th style="text-align: right;"&gt;test size&lt;/th&gt;
&lt;th style="text-align: right;"&gt;K = 0&lt;/th&gt;
&lt;th style="text-align: right;"&gt;K = 1&lt;/th&gt;
&lt;th style="text-align: right;"&gt;K = 2&lt;/th&gt;
&lt;th style="text-align: right;"&gt;K = 3&lt;/th&gt;
&lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="odd"&gt;
&lt;td style="text-align: right;"&gt;0.01&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0054&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0084&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0172&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0308&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="even"&gt;
&lt;td style="text-align: right;"&gt;0.05&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0334&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0548&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0814&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.1274&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="odd"&gt;
&lt;td style="text-align: right;"&gt;0.10&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0708&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.1062&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.1520&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.2136&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Again, &lt;img src="https://latex.codecogs.com/png.latex?K=1"&gt; appears to be the best.&lt;/p&gt;
&lt;/section&gt;&lt;section id="etsaan-model" class="level2"&gt;&lt;h2 class="anchored" data-anchor-id="etsaan-model"&gt;ETS(A,A,N) model&lt;/h2&gt;
&lt;p&gt;An ETS(A,A,N) model is equivalent to an ARIMA(0,2,2) model, so I expect this one to need &lt;img src="https://latex.codecogs.com/png.latex?K=2"&gt;.&lt;/p&gt;
&lt;div class="cell" data-hash="ljung_box_df_cache/html/ETSAAN_ce0bcb2507c97eab13f6cc5c746220c5"&gt;
&lt;details class="code-fold"&gt;&lt;summary&gt;Code&lt;/summary&gt;&lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb16" style="background: #f1f3f5;"&gt;&lt;pre class="downlit sourceCode r code-with-copy"&gt;&lt;code class="sourceCode R"&gt;&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;model&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://pkg.robjhyndman.com/forecast/reference/ets.html"&gt;ets&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;fma&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;::&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://pkg.robjhyndman.com/fma/reference/strikes.html"&gt;strikes&lt;/a&gt;&lt;/span&gt;, &lt;span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;"&gt;"AAN"&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;fit_fn&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"&gt;function&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;y&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;  &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://pkg.robjhyndman.com/forecast/reference/ets.html"&gt;ets&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;y&lt;/span&gt;, model &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;"&gt;"AAN"&lt;/span&gt;, damped &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;"&gt;FALSE&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;ets_pvalues&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;simulate_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;model&lt;/span&gt;, &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;fit_fn&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;hist_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;ets_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/details&gt;&lt;div class="cell-output-display"&gt;
&lt;div&gt;
&lt;figure class="figure"&gt;&lt;p&gt;&lt;img src="https://robjhyndman.com/hyndsight/ljung_box_df_files/figure-html/ETSAAN-1.png" class="img-fluid figure-img" width="768"&gt;&lt;/p&gt;
&lt;/figure&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;details class="code-fold"&gt;&lt;summary&gt;Code&lt;/summary&gt;&lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb17" style="background: #f1f3f5;"&gt;&lt;pre class="downlit sourceCode r code-with-copy"&gt;&lt;code class="sourceCode R"&gt;&lt;span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;table_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;ets_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/details&gt;&lt;div class="cell-output-display"&gt;
&lt;table class="caption-top table table-sm table-striped small"&gt;
&lt;thead&gt;&lt;tr class="header"&gt;
&lt;th style="text-align: right;"&gt;test size&lt;/th&gt;
&lt;th style="text-align: right;"&gt;K = 0&lt;/th&gt;
&lt;th style="text-align: right;"&gt;K = 1&lt;/th&gt;
&lt;th style="text-align: right;"&gt;K = 2&lt;/th&gt;
&lt;th style="text-align: right;"&gt;K = 3&lt;/th&gt;
&lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="odd"&gt;
&lt;td style="text-align: right;"&gt;0.01&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0034&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0062&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0106&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0172&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="even"&gt;
&lt;td style="text-align: right;"&gt;0.05&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0180&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0308&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0514&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0802&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="odd"&gt;
&lt;td style="text-align: right;"&gt;0.10&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0430&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0658&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.1008&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.1486&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This time, my conjecture is correct, and &lt;img src="https://latex.codecogs.com/png.latex?K=2"&gt; works well.&lt;/p&gt;
&lt;/section&gt;&lt;section id="etsaaa-model" class="level2"&gt;&lt;h2 class="anchored" data-anchor-id="etsaaa-model"&gt;ETS(A,A,A) model&lt;/h2&gt;
&lt;p&gt;Finally, we will check a seasonal ETS model&lt;/p&gt;
&lt;div class="cell" data-hash="ljung_box_df_cache/html/ETSAAA_1385d6238e693baceddf0a02ce3fa351"&gt;
&lt;details class="code-fold"&gt;&lt;summary&gt;Code&lt;/summary&gt;&lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb18" style="background: #f1f3f5;"&gt;&lt;pre class="downlit sourceCode r code-with-copy"&gt;&lt;code class="sourceCode R"&gt;&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;model&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://pkg.robjhyndman.com/forecast/reference/ets.html"&gt;ets&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://rdrr.io/r/base/Log.html"&gt;log&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;AirPassengers&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;, model&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt;&lt;span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;"&gt;"AAA"&lt;/span&gt;, damped&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt;&lt;span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;"&gt;FALSE&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;fit_fn&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"&gt;function&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;y&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;  &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;&lt;a href="https://pkg.robjhyndman.com/forecast/reference/ets.html"&gt;ets&lt;/a&gt;&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;y&lt;/span&gt;, model &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;"&gt;"AAA"&lt;/span&gt;, damped &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;=&lt;/span&gt; &lt;span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;"&gt;FALSE&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;ets_pvalues&lt;/span&gt; &lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;simulate_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;model&lt;/span&gt;, &lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;fit_fn&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;hist_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;ets_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/details&gt;&lt;div class="cell-output-display"&gt;
&lt;div&gt;
&lt;figure class="figure"&gt;&lt;p&gt;&lt;img src="https://robjhyndman.com/hyndsight/ljung_box_df_files/figure-html/ETSAAA-1.png" class="img-fluid figure-img" width="768"&gt;&lt;/p&gt;
&lt;/figure&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;details class="code-fold"&gt;&lt;summary&gt;Code&lt;/summary&gt;&lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb19" style="background: #f1f3f5;"&gt;&lt;pre class="downlit sourceCode r code-with-copy"&gt;&lt;code class="sourceCode R"&gt;&lt;span&gt;&lt;span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"&gt;table_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;(&lt;/span&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;ets_pvalues&lt;/span&gt;&lt;span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/details&gt;&lt;div class="cell-output-display"&gt;
&lt;table class="caption-top table table-sm table-striped small"&gt;
&lt;thead&gt;&lt;tr class="header"&gt;
&lt;th style="text-align: right;"&gt;test size&lt;/th&gt;
&lt;th style="text-align: right;"&gt;K = 0&lt;/th&gt;
&lt;th style="text-align: right;"&gt;K = 1&lt;/th&gt;
&lt;th style="text-align: right;"&gt;K = 2&lt;/th&gt;
&lt;th style="text-align: right;"&gt;K = 3&lt;/th&gt;
&lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="odd"&gt;
&lt;td style="text-align: right;"&gt;0.01&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0178&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0276&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0396&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0602&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="even"&gt;
&lt;td style="text-align: right;"&gt;0.05&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0634&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.0916&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.1360&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.1942&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="odd"&gt;
&lt;td style="text-align: right;"&gt;0.10&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.1206&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.1672&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.2244&lt;/td&gt;
&lt;td style="text-align: right;"&gt;0.3078&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Here there are 3 smoothing parameters, and 13 initial states to estimate. So I was expecting &lt;img src="https://latex.codecogs.com/png.latex?K=3"&gt; to do best, but it is the worst. Instead, &lt;img src="https://latex.codecogs.com/png.latex?K=0"&gt; is the best. I’m not sure what to make of this result.&lt;/p&gt;
&lt;/section&gt;&lt;section id="conclusions" class="level2"&gt;&lt;h2 class="anchored" data-anchor-id="conclusions"&gt;Conclusions&lt;/h2&gt;
&lt;p&gt;Based only on this empirical evidence:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;For ARIMA models, use &lt;img src="https://latex.codecogs.com/png.latex?%5Cell-p-q"&gt; degrees of freedom.&lt;/li&gt;
&lt;li&gt;For seasonal ARIMA models, it appears that &lt;img src="https://latex.codecogs.com/png.latex?%5Cell-p-q"&gt; also gives the best results.&lt;/li&gt;
&lt;li&gt;For regression with ARIMA errors, use &lt;img src="https://latex.codecogs.com/png.latex?%5Cell-p-q"&gt; degrees of freedom.&lt;/li&gt;
&lt;li&gt;For OLS regression, use &lt;img src="https://latex.codecogs.com/png.latex?%5Cell"&gt; degrees of freedom.&lt;/li&gt;
&lt;li&gt;For non-seasonal ETS models, use &lt;img src="https://latex.codecogs.com/png.latex?K="&gt; the number of smoothing parameters.&lt;/li&gt;
&lt;li&gt;For seasonal ETS models, use &lt;img src="https://latex.codecogs.com/png.latex?K=0"&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The last two of these appear to be contradictory, and it is not clear why.&lt;/p&gt;
&lt;p&gt;It seems like this might be a good project for a PhD student to explore. In particular, can these suggestions based on empirical evidence be supported theoretically? It would also be good to explore other models such as TBATS, ARFIMA, NNETAR, etc.&lt;/p&gt;
&lt;p&gt;For now, I might avoid teaching the Ljung-Box test, and just get students to look at the ACF plot of the residuals instead.&lt;/p&gt;
&lt;/section&gt;&lt;section id="other-literature" class="level2"&gt;&lt;h2 class="anchored" data-anchor-id="other-literature"&gt;Other literature&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;span class="citation" data-cites="Kim2004"&gt;Kim et al. (2004)&lt;/span&gt; shows that &lt;img src="https://latex.codecogs.com/png.latex?Q%20%5Csim%20%5Cchi%5E2_%5Cell"&gt; for an AR(1) model with ARCH errors.&lt;/li&gt;
&lt;li&gt;
&lt;span class="citation" data-cites="McLeod1983"&gt;McLeod and Li (1983)&lt;/span&gt; consider the equivalent test applied to autocorrelations of squared residuals, and show that &lt;img src="https://latex.codecogs.com/png.latex?Q%5E*%20%5Csim%20%5Cchi%5E2_%5Cell"&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;span class="citation" data-cites="Mahdi2016"&gt;Mahdi (2016)&lt;/span&gt; discusses a variation on the LB test for seasonal ARIMA models considering only autocorrelations at the seasonal lags.&lt;/li&gt;
&lt;li&gt;Several other portmanteau tests (i.e., based on multiple autocorrelations) are available, and perhaps we should be using them and not the older Ljung-Box test. See &lt;span class="citation" data-cites="Mahdi2021"&gt;Mahdi (2021)&lt;/span&gt; for some recent developments.&lt;/li&gt;
&lt;/ul&gt;&lt;/section&gt;&lt;section id="references" class="level2"&gt;



&lt;/section&gt;&lt;div id="quarto-appendix" class="default"&gt;&lt;section class="quarto-appendix-contents" id="quarto-bibliography"&gt;&lt;h2 class="anchored quarto-appendix-heading"&gt;References&lt;/h2&gt;&lt;div id="refs" class="references csl-bib-body hanging-indent"&gt;
&lt;div id="ref-BJ2016" class="csl-entry"&gt;
Box, George E P, Gwilym M Jenkins, Gregory C Reinsel, and Greta M Ljung. 2016. &lt;em&gt;Time Series Analysis: Forecasting and Control&lt;/em&gt;. 5th ed. John Wiley; Sons.
&lt;/div&gt;
&lt;div id="ref-BP70" class="csl-entry"&gt;
Box, George E P, and David A Pierce. 1970. &lt;span&gt;“Distribution of Residual Autocorrelations in Autoregressive-Integrated Moving Average Time Series Models.”&lt;/span&gt; &lt;em&gt;Journal of the American Statistical Association&lt;/em&gt; 65 (332): 1509–26. &lt;a href="https://doi.org/10.2307/2284333"&gt;https://doi.org/10.2307/2284333&lt;/a&gt;.
&lt;/div&gt;
&lt;div id="ref-harvey90" class="csl-entry"&gt;
Harvey, Andrew C. 1990. &lt;em&gt;Forecasting, Structural Time Series Models and the Kalman Filter&lt;/em&gt;. Cambridge University Press.
&lt;/div&gt;
&lt;div id="ref-fpp2" class="csl-entry"&gt;
Hyndman, Rob J, and George Athanasopoulos. 2018. &lt;em&gt;Forecasting: Principles and Practice&lt;/em&gt;. 2nd ed. OTexts. &lt;a href="https://OTexts.org/fpp2"&gt;OTexts.org/fpp2&lt;/a&gt;.
&lt;/div&gt;
&lt;div id="ref-fpp3" class="csl-entry"&gt;
Hyndman, Rob J, and George Athanasopoulos. 2021. &lt;em&gt;Forecasting: Principles and Practice&lt;/em&gt;. 3rd ed. OTexts. &lt;a href="https://OTexts.org/fpp3"&gt;OTexts.org/fpp3&lt;/a&gt;.
&lt;/div&gt;
&lt;div id="ref-Kim2004" class="csl-entry"&gt;
Kim, Eunhee, Jeongcheol Ha, Youngsook Jeon, and Sangyeol Lee. 2004. &lt;span&gt;“Ljung-Box Test in Unit Root &lt;span&gt;AR-ARCH&lt;/span&gt; Model.”&lt;/span&gt; &lt;em&gt;Communications for Statistical Applications and Methods&lt;/em&gt; 11 (2): 323–27. &lt;a href="https://doi.org/10.5351/ckss.2004.11.2.323"&gt;https://doi.org/10.5351/ckss.2004.11.2.323&lt;/a&gt;.
&lt;/div&gt;
&lt;div id="ref-LB78" class="csl-entry"&gt;
Ljung, Greta M, and George E P Box. 1978. &lt;span&gt;“On a Measure of Lack of Fit in Time Series Models.”&lt;/span&gt; &lt;em&gt;Biometrika&lt;/em&gt; 65 (2): 297–303. &lt;a href="https://doi.org/10.1093/biomet/65.2.297"&gt;https://doi.org/10.1093/biomet/65.2.297&lt;/a&gt;.
&lt;/div&gt;
&lt;div id="ref-Mahdi2016" class="csl-entry"&gt;
Mahdi, Esam. 2016. &lt;span&gt;“Portmanteau Test Statistics for Seasonal Serial Correlation in Time Series Models.”&lt;/span&gt; &lt;em&gt;SpringerPlus&lt;/em&gt; 5 (1): 1485. &lt;a href="https://doi.org/10.1186/s40064-016-3167-4"&gt;https://doi.org/10.1186/s40064-016-3167-4&lt;/a&gt;.
&lt;/div&gt;
&lt;div id="ref-Mahdi2021" class="csl-entry"&gt;
Mahdi, Esam. 2021. &lt;span&gt;“New Goodness-of-Fit Tests for Time Series Models.”&lt;/span&gt; &lt;a href="http://arxiv.org/abs/2008.08176"&gt;http://arxiv.org/abs/2008.08176&lt;/a&gt;.
&lt;/div&gt;
&lt;div id="ref-McLeod1983" class="csl-entry"&gt;
McLeod, A I, and W K Li. 1983. &lt;span&gt;“Diagnostic Checking &lt;span&gt;ARMA&lt;/span&gt; Time Series Models Using Squared-Residual Autocorrelations.”&lt;/span&gt; &lt;em&gt;Journal of Time Series Analysis&lt;/em&gt; 4 (4): 269–73. &lt;a href="https://doi.org/10.1111/j.1467-9892.1983.tb00373.x"&gt;https://doi.org/10.1111/j.1467-9892.1983.tb00373.x&lt;/a&gt;.
&lt;/div&gt;
&lt;/div&gt;&lt;/section&gt;&lt;/div&gt; </description>
      <category>forecasting</category>
      <category>time series</category>
      <guid>https://robjhyndman.com/hyndsight/ljung_box_df.html</guid>
      <pubDate>Tue, 27 Jun 2023 14:00:00 GMT</pubDate>
      <content url="https://robjhyndman.com/img/ETSMNN.png" medium="image" type="image/png" height="54" width="144"/>
    </item>
    <item>
      <title>Forecasting workshops in New York and Chicago</title>
      <link>https://robjhyndman.com/hyndsight/workshops2023.html</link>
      <description> 



&lt;div&gt;
  &lt;div class="description"&gt;
    I’m giving a 2-day workshop on “Tidy Time Series and Forecasting in R”, first at the New York R Conference in July, and then at the Posit Conference in Chicago in September.
  &lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;/p&gt;


&lt;p&gt;Places are limited, so please book in early.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://web.archive.org/web/20230612041012/https://rstats.ai/nyr#tidy-time-series-and-forecasting-in-r"&gt;New York&lt;/a&gt;, 11-12 July 2023. Followed by the &lt;a href="https://web.archive.org/web/20230612041012/https://rstats.ai/nyr"&gt;New York R conference&lt;/a&gt;. (Register for the workshop as part of the NYR conference registration.)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://posit-conf-2023.github.io/workshops/workshops/forecasting/"&gt;Chicago&lt;/a&gt;, 17-18 September 2023. Followed by the &lt;a href="https://posit.co/conference"&gt;Posit conference&lt;/a&gt;. (Register for the workshop as part of the Posit conference registration.)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The workshop introduces the &lt;a href="https://tidyverts.org"&gt;tidyverts&lt;/a&gt; set of packages. Further details about the workshop are &lt;a href="https://robjhyndman.com/teaching/#tidy-time-series-forecasting-in-r"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;div class="click-embed" data-youtube="g4221KXM7hU" data-src="https://www.youtube.com/embed/g4221KXM7hU?autoplay=1" data-title="YouTube video" data-loading="Loading video…"&gt;
  &lt;button type="button" class="click-facade"&gt;
    &lt;img src="https://i.ytimg.com/vi/g4221KXM7hU/hqdefault.jpg" alt="" loading="lazy"&gt;
    &lt;span class="click-play"&gt;Play video&lt;/span&gt;
  &lt;/button&gt;
&lt;/div&gt;
&lt;script type="module" src="../click-embed.js"&gt;&lt;/script&gt;
&lt;p&gt;&lt;a href="https://tidyverts.org"&gt;&lt;img src="https://robjhyndman.com/img/tidyverts.png" class="img-fluid"&gt;&lt;/a&gt;&lt;/p&gt;



 </description>
      <category>forecasting</category>
      <category>R</category>
      <category>conferences</category>
      <category>teaching</category>
      <guid>https://robjhyndman.com/hyndsight/workshops2023.html</guid>
      <pubDate>Wed, 12 Apr 2023 14:00:00 GMT</pubDate>
      <content url="https://robjhyndman.com/img/thumbs/tidyverts.png" medium="image" type="image/png" height="98" width="144"/>
    </item>
    <item>
      <title>Towards socially responsible forecasting: Identifying and typifying forecasting harms</title>
      <creator>Bahman Rostami-Tabar, Travis Greene, Galit Shmueli, Rob J Hyndman</creator>
      <link>https://robjhyndman.com/publications/harms.html</link>
      <description> 





&lt;p&gt;Data-driven organizations around the world routinely use forecasting methods to improve their planning and decision-making capabilities. Although much research exists on the harms resulting from traditional AI and machine learning applications, little has specifically focused on the ethical impact of time series forecasting. Yet forecasting raises unique ethical issues due to the way it is used in different organizational contexts, supports different goals, and involves different data processing, model development, and evaluation pipelines. These differences make it difficult to apply existing AI and machine learning harm taxonomies to real-world forecasting contexts. We leverage 20 interviews with expert industry practitioners and academic researchers to remedy this knowledge gap by cataloguing and analysing under-explored domains, applications, and scenarios where forecasting may cause harm, with the goal of developing a novel taxonomy of forecasting-specific harms. Inspired by the Microsoft Azure taxonomy for responsible innovation, we combined a human-led inductive coding scheme with an AI-driven analysis centered on the extraction of an initial taxonomy harm in forecasting. We then augment the taxonomy with relevant theoretical considerations from ethics and law, such as the distinction between a harm and wrong. The resulting taxonomy is designed to guide researchers and practitioners and encourage ethical reflection on the impact of their decisions during the forecasting process. A secondary objective is to create a research agenda for socially responsible forecasting that focuses on possible forecasting-related measures to mitigate harm. Our work extends the growing literature on AI and machine learning harms by empirically identifying unique forms of harm that may occur in forecasting and linking them with traditional concepts of responsibility from ethics and law.&lt;/p&gt;



&lt;section class="cite-bibtex"&gt;
  &lt;details&gt;
    &lt;summary&gt;Cite&lt;/summary&gt;
    &lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb1" style="background: #f1f3f5;"&gt;&lt;pre class="sourceCode bibtex code-with-copy"&gt;&lt;code class="sourceCode bibtex"&gt;&lt;span id="cb1-1"&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;@unpublished&lt;/span&gt;{&lt;span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"&gt;harms&lt;/span&gt;,&lt;/span&gt;
&lt;span id="cb1-2"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;author&lt;/span&gt; = {Bahman Rostami-Tabar and Travis Greene and Galit Shmueli and Rob J Hyndman},&lt;/span&gt;
&lt;span id="cb1-3"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;title&lt;/span&gt;  = {Towards socially responsible forecasting: Identifying and typifying forecasting harms},&lt;/span&gt;
&lt;span id="cb1-4"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;url&lt;/span&gt;    = {https://robjhyndman.com/publications/harms.html},&lt;/span&gt;
&lt;span id="cb1-5"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;year&lt;/span&gt;   = {2025}&lt;/span&gt;
&lt;span id="cb1-6"&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
  &lt;/details&gt;
&lt;/section&gt;

 </description>
      <category>Working papers</category>
      <guid>https://robjhyndman.com/publications/harms.html</guid>
      <pubDate>Tue, 28 Jul 2026 14:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Winter forecasting of respiratory viruses in Victoria Australia</title>
      <creator>Alec S Henderson, Robert Moss, Adeshina I Adekunle, Henry Ye, Mitchell O’Hara-Wild, Oliver Eales, Katharine L Senior, Ruarai Tobin, Saras M Windecker, Nick Golding, Ellie Robinson, Janet Strachan, Rob J Hyndman, Peter Dawson, James M. McCaw, Emma S McBryde, Freya M Shearer</creator>
      <link>https://robjhyndman.com/publications/winterforecasting.html</link>
      <description> 





&lt;p&gt;Temperate regions of the world, such as southern Australia, often experience increased health burden from respiratory pathogens during winter. The ability to forecast short-term trends in cases of these pathogens is of significant interest to public health. Across the 2024 southern hemisphere winter period, the Australia–Aotearoa Consortium for Epidemic Forecasting and Analytics (ACEFA) ran a pilot respiratory virus forecasting initiative in collaboration with the Victorian Department of Health. Each week from the 9th of May 2024 through to 12th September 2024, the consortium solicited 28-day forecasts of daily case incidence for influenza, severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2), and respiratory syncytial virus (RSV) from multiple research groups. Four component model forecasts were contributed by three different research groups, with a fourth group utilising the component forecasts to generate ensemble forecasts (making a total of six models, four component models and two ensembles). The pilot programme confirmed the feasibility of a multi-pathogen collaborative forecasting hub in the Australia setting. A statistical performance evaluation of contributing forecasts against the observed case data found that performance varied by pathogen and epidemic phase, and the two ensemble models were frequently the top performing models.&lt;/p&gt;



&lt;section class="cite-bibtex"&gt;
  &lt;details&gt;
    &lt;summary&gt;Cite&lt;/summary&gt;
    &lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb1" style="background: #f1f3f5;"&gt;&lt;pre class="sourceCode bibtex code-with-copy"&gt;&lt;code class="sourceCode bibtex"&gt;&lt;span id="cb1-1"&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;@unpublished&lt;/span&gt;{&lt;span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"&gt;winterforecasting&lt;/span&gt;,&lt;/span&gt;
&lt;span id="cb1-2"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;author&lt;/span&gt; = {Alec S Henderson and Robert Moss and Adeshina I Adekunle and Henry Ye and Mitchell O’Hara-Wild and Oliver Eales and Katharine L Senior and Ruarai Tobin and Saras M Windecker and Nick Golding and Ellie Robinson and Janet Strachan and Rob J Hyndman and Peter Dawson and James M. McCaw and Emma S McBryde and Freya M Shearer},&lt;/span&gt;
&lt;span id="cb1-3"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;doi&lt;/span&gt;    = {10.64898/2026.05.18.26353544},&lt;/span&gt;
&lt;span id="cb1-4"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;title&lt;/span&gt;  = {Winter forecasting of respiratory viruses in Victoria Australia},&lt;/span&gt;
&lt;span id="cb1-5"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;year&lt;/span&gt;   = {2026}&lt;/span&gt;
&lt;span id="cb1-6"&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
  &lt;/details&gt;
&lt;/section&gt;

 </description>
      <category>Working papers</category>
      <guid>https://robjhyndman.com/publications/winterforecasting.html</guid>
      <pubDate>Wed, 20 May 2026 14:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Multivariate reconciliation for hierarchical time series</title>
      <creator>Ana Caroline Pinheiro, Rodrigo de Souza Bulhões, Rob J Hyndman, Paulo Canas Rodrigues</creator>
      <link>https://robjhyndman.com/publications/mvhts.html</link>
      <description> 





&lt;p&gt;Some time series can be hierarchically organized into levels based on certain characteristics, such as geography or other attributes of interest. These series are referred to as hierarchical time series. Typically, forecasts are generated at all levels to ensure coherence, meaning that the forecasts should satisfy the same aggregation constraints as the observed data. Various approaches have been proposed to guarantee this coherence by using a set of base forecasts. The process through which these forecasts are adjusted to become coherent is known as forecast reconciliation. Similar to the univariate case, multivariate time series can also be structured hierarchically. However, all existing approaches are limited to a single variable. As a result, ensuring coherent forecasts requires reconciling each variable separately. However, this process does not account for correlations among multiple variables. To address this limitation, this paper proposes a multivariate reconciliation methodology that ensures coherent forecasts and incorporates relationships among variables. The proposed methodology was tested through numerical simulations, considering distinct scenarios within the series hierarchy and across multiple variables. Additionally, some base forecasting models were evaluated. The methodology was also applied to real employment data of admissions and dismissals in Brazil. The results demonstrated that multivariate reconciliation yielded more accurate outcomes than the other methods considered, both in simulated data and in practical applications.&lt;/p&gt;



&lt;section class="cite-bibtex"&gt;
  &lt;details&gt;
    &lt;summary&gt;Cite&lt;/summary&gt;
    &lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb1" style="background: #f1f3f5;"&gt;&lt;pre class="sourceCode bibtex code-with-copy"&gt;&lt;code class="sourceCode bibtex"&gt;&lt;span id="cb1-1"&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;@unpublished&lt;/span&gt;{&lt;span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"&gt;mvhts&lt;/span&gt;,&lt;/span&gt;
&lt;span id="cb1-2"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;author&lt;/span&gt; = {Ana Caroline Pinheiro and Rodrigo de Souza Bulhões and Rob J Hyndman and Paulo Canas Rodrigues},&lt;/span&gt;
&lt;span id="cb1-3"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;title&lt;/span&gt;  = {Multivariate reconciliation for hierarchical time series},&lt;/span&gt;
&lt;span id="cb1-4"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;url&lt;/span&gt;    = {https://robjhyndman.com/publications/mvhts.html},&lt;/span&gt;
&lt;span id="cb1-5"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;year&lt;/span&gt;   = {2026}&lt;/span&gt;
&lt;span id="cb1-6"&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
  &lt;/details&gt;
&lt;/section&gt;

 </description>
      <category>Working papers</category>
      <guid>https://robjhyndman.com/publications/mvhts.html</guid>
      <pubDate>Sun, 17 May 2026 14:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Ensemble forecasts of COVID-19 activity to support Australia’s pandemic response: 2020–22</title>
      <creator>Robert Moss, Ruarai J Tobin, Mitchell O'Hara-Wild, Adeshina I Adekunle, Dennis Liu, Tobin South, Dylan J Morris, Gerard E Ryan, Tianxiao Hao, Aarathy Babu, Katharine L Senior, James G Wood, Nick Golding, Joshua V Ross, Peter Dawson, Rob J Hyndman, David J Price, James M McCaw, Freya M Shearer</creator>
      <link>https://robjhyndman.com/publications/covid-ensemble.html</link>
      <description> 





&lt;p&gt;During the COVID-19 pandemic, many countries used real-time data analyses, predictive modelling, and COVID-19 case forecasts, to incorporate emerging evidence into their decisions. In Australia, national and jurisdictional public health responses were informed by weekly ensemble forecasts of daily COVID-19 case counts for each of Australia’s eight states and territories, produced by a consortium of researchers under contract with the Australian Government. As members of this consortium, who produced these forecasts at each week, we now retrospectively evaluate approximately 100,000 predictions for daily case counts 1-28 days into the future, generated between July 2020 and December 2022, and report here (a) how the ensemble forecasts supported public health responses; (b) how well the ensemble forecast performed, relative to the forecasts produced by each contributing team; and (c) how we refined our reporting and visualisations to ensure that outputs were interpreted appropriately. Similar to COVID-19 forecasting studies in other countries, we found that the ensemble forecast consistently out-performed the individual model forecasts, and that performance was lowest when there were rapid changes in the epidemiology, such as periods around epidemic peaks. Our consortium’s internal peer-review process allowed us to explain how features of each ensemble forecast related to the design of the individual models, and this helped enable public health stakeholders to interpret the forecasts appropriately. Ultimately, our forecasts provided information that supported public health responses during periods of different policy goals, and over a wide range of epidemic scenarios.&lt;/p&gt;



&lt;section class="cite-bibtex"&gt;
  &lt;details&gt;
    &lt;summary&gt;Cite&lt;/summary&gt;
    &lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb1" style="background: #f1f3f5;"&gt;&lt;pre class="sourceCode bibtex code-with-copy"&gt;&lt;code class="sourceCode bibtex"&gt;&lt;span id="cb1-1"&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;@article&lt;/span&gt;{&lt;span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"&gt;covidensemble&lt;/span&gt;,&lt;/span&gt;
&lt;span id="cb1-2"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;author&lt;/span&gt;  = {Robert Moss and Ruarai J Tobin and Mitchell O'Hara-Wild and Adeshina I Adekunle and Dennis Liu and Tobin South and Dylan J Morris and Gerard E Ryan and Tianxiao Hao and Aarathy Babu and Katharine L Senior and James G Wood and Nick Golding and Joshua V Ross and Peter Dawson and Rob J Hyndman and David J Price and James M McCaw and Freya M Shearer},&lt;/span&gt;
&lt;span id="cb1-3"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;doi&lt;/span&gt;     = {10.1371/journal.pcbi.1014199},&lt;/span&gt;
&lt;span id="cb1-4"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;journal&lt;/span&gt; = {PLOS Computational Biology},&lt;/span&gt;
&lt;span id="cb1-5"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;number&lt;/span&gt;  = 4,&lt;/span&gt;
&lt;span id="cb1-6"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;pages&lt;/span&gt;   = {e1014199},&lt;/span&gt;
&lt;span id="cb1-7"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;title&lt;/span&gt;   = {Ensemble forecasts of {COVID-19} activity to support {Australia}'s pandemic response: 2020--22},&lt;/span&gt;
&lt;span id="cb1-8"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;url&lt;/span&gt;     = {https://robjhyndman.com/publications/covid-ensemble.html},&lt;/span&gt;
&lt;span id="cb1-9"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;volume&lt;/span&gt;  = 22,&lt;/span&gt;
&lt;span id="cb1-10"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;year&lt;/span&gt;    = 2026&lt;/span&gt;
&lt;span id="cb1-11"&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
  &lt;/details&gt;
&lt;/section&gt;

 </description>
      <category>Articles</category>
      <guid>https://robjhyndman.com/publications/covid-ensemble.html</guid>
      <pubDate>Tue, 21 Apr 2026 14:00:00 GMT</pubDate>
    </item>
    <item>
      <title>When lookout sees crackle: Anomaly detection via kernel density estimation</title>
      <creator>Rob J Hyndman, Sevvandi Kandanaarachchi, Katharine Turner</creator>
      <link>https://robjhyndman.com/publications/lookout2.html</link>
      <description> 





&lt;p&gt;We present an updated version of &lt;em&gt;lookout&lt;/em&gt; — an algorithm for detecting anomalies using kernel density estimates with bandwidth based on Rips death diameters — with theoretical guarantees. The kernel density estimator for updated &lt;em&gt;lookout&lt;/em&gt; is shown to be consistent, and the proposed multivariate scaling is robust and efficient. We show our updated algorithm performs better than the previous version on diverse examples.&lt;/p&gt;
&lt;p&gt;The R package &lt;a href="https://github.com/Sevvandi/lookout"&gt;&lt;strong&gt;lookout&lt;/strong&gt;&lt;/a&gt; implements this algorithm.&lt;/p&gt;



&lt;section class="cite-bibtex"&gt;
  &lt;details&gt;
    &lt;summary&gt;Cite&lt;/summary&gt;
    &lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb1" style="background: #f1f3f5;"&gt;&lt;pre class="sourceCode bibtex code-with-copy"&gt;&lt;code class="sourceCode bibtex"&gt;&lt;span id="cb1-1"&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;@unpublished&lt;/span&gt;{&lt;span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"&gt;lookout2&lt;/span&gt;,&lt;/span&gt;
&lt;span id="cb1-2"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;author&lt;/span&gt; = {Rob J Hyndman and Sevvandi Kandanaarachchi and Katharine Turner},&lt;/span&gt;
&lt;span id="cb1-3"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;title&lt;/span&gt;  = {When lookout sees crackle: Anomaly detection via kernel density estimation},&lt;/span&gt;
&lt;span id="cb1-4"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;url&lt;/span&gt;    = {http://robjhyndman.com/publications/lookout2.html},&lt;/span&gt;
&lt;span id="cb1-5"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;year&lt;/span&gt;   = 2026&lt;/span&gt;
&lt;span id="cb1-6"&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
  &lt;/details&gt;
&lt;/section&gt;

 </description>
      <category>Working papers</category>
      <guid>https://robjhyndman.com/publications/lookout2.html</guid>
      <pubDate>Mon, 23 Mar 2026 13:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Anomaly detection using surprisals</title>
      <creator>Rob J Hyndman, David T Frazier</creator>
      <link>https://robjhyndman.com/publications/surprisals.html</link>
      <description> 





&lt;p&gt;Anomaly detection methods are widely used but often rely on ad hoc rules or strong assumptions, and they often focus on tail events, missing “inlier” anomalies that occur in low-density gaps between modes. We propose a unified framework that defines an anomaly as an observation with unusually low probability under a (possibly misspecified) model. For each observation we compute its surprisal (the negative log generalized density) and define an anomaly score as the probability of a surprisal at least as large as that observed. This reduces anomaly detection for complex univariate or multivariate data to estimating the upper tail of a univariate surprisal distribution. We develop two model-robust estimators of these tail probabilities: an empirical estimator based on the observed surprisal distribution and an extreme-value estimator that fits a Generalized Pareto Distribution above a high threshold. For the empirical method we give conditions under which tail ordering is preserved and derive finite-sample confidence guarantees via the Dvoretzky–Kiefer–Wolfowitz inequality. For the GPD method we establish broad tail conditions ensuring classical extreme-value behavior. Simulations and applications to French mortality and Test-cricket data show the approach remains effective under substantial model misspecification.&lt;/p&gt;
&lt;p&gt;The R package &lt;a href="https://pkg.robjhyndman.com/weird"&gt;&lt;strong&gt;weird&lt;/strong&gt;&lt;/a&gt; implements the methods described in this paper.&lt;/p&gt;



&lt;section class="cite-bibtex"&gt;
  &lt;details&gt;
    &lt;summary&gt;Cite&lt;/summary&gt;
    &lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb1" style="background: #f1f3f5;"&gt;&lt;pre class="sourceCode bibtex code-with-copy"&gt;&lt;code class="sourceCode bibtex"&gt;&lt;span id="cb1-1"&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;@techreport&lt;/span&gt;{&lt;span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"&gt;surprisals&lt;/span&gt;,&lt;/span&gt;
&lt;span id="cb1-2"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;author&lt;/span&gt;      = {Rob J Hyndman and David T Frazier},&lt;/span&gt;
&lt;span id="cb1-3"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;institution&lt;/span&gt; = {Department of Econometrics &lt;span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;"&gt;\&amp;amp;&lt;/span&gt; Business Statistics, Monash University},&lt;/span&gt;
&lt;span id="cb1-4"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;title&lt;/span&gt;       = {Anomaly detection using surprisals},&lt;/span&gt;
&lt;span id="cb1-5"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;type&lt;/span&gt;        = {Working paper},&lt;/span&gt;
&lt;span id="cb1-6"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;url&lt;/span&gt;         = {http://robjhyndman.com/publications/surprisals.html},&lt;/span&gt;
&lt;span id="cb1-7"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;year&lt;/span&gt;        = 2026&lt;/span&gt;
&lt;span id="cb1-8"&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
  &lt;/details&gt;
&lt;/section&gt;

 </description>
      <category>Working papers</category>
      <guid>https://robjhyndman.com/publications/surprisals.html</guid>
      <pubDate>Mon, 09 Mar 2026 13:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Forecasting the age structure of the scientific workforce in Australia</title>
      <creator>Rob J Hyndman, Khuyen Vanh Nguyen</creator>
      <link>https://robjhyndman.com/publications/age_structure_forecasts.html</link>
      <description> 





&lt;p&gt;Planning for a future workforce requires forecasts of age structure changes to inform policy decisions, particularly related to universities and immigration. We propose a new dynamic statistical model for forecasting the age structure of a workforce. Our approach is inspired by a stochastic model used in population forecasting, replacing births with graduate entry, modelling exits through death and retirement, and including a remainder term that captures migration and career changes. Functional data models are used to model age-specific components, while ARIMA models are used for time series components. Simulation is employed to generate forecast distributions, capturing uncertainty from all components. The approach is illustrated using data on Australia’s scientific workforce, allowing us to forecast the age distribution of various scientific disciplines for the next ten years. This analysis was central to an Australian Academy of Science initiative examining the capability of Australia’s science system and identifying workforce gaps.&lt;/p&gt;



&lt;section class="cite-bibtex"&gt;
  &lt;details&gt;
    &lt;summary&gt;Cite&lt;/summary&gt;
    &lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb1" style="background: #f1f3f5;"&gt;&lt;pre class="sourceCode bibtex code-with-copy"&gt;&lt;code class="sourceCode bibtex"&gt;&lt;span id="cb1-1"&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;@article&lt;/span&gt;{&lt;span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"&gt;asf&lt;/span&gt;,&lt;/span&gt;
&lt;span id="cb1-2"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;author&lt;/span&gt;  = {Rob J Hyndman and Khuyen Vanh Nguyen},&lt;/span&gt;
&lt;span id="cb1-3"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;doi&lt;/span&gt;     = {10.1111/anzs.70043},&lt;/span&gt;
&lt;span id="cb1-4"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;journal&lt;/span&gt; = {Australian &lt;span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;"&gt;\&amp;amp;&lt;/span&gt; New Zealand J Statistics},&lt;/span&gt;
&lt;span id="cb1-5"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;number&lt;/span&gt;  = 1,&lt;/span&gt;
&lt;span id="cb1-6"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;pages&lt;/span&gt;   = {1369-1473},&lt;/span&gt;
&lt;span id="cb1-7"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;title&lt;/span&gt;   = {Forecasting the age structure of the scientific workforce in Australia},&lt;/span&gt;
&lt;span id="cb1-8"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;url&lt;/span&gt;     = {http://robjhyndman.com/publications/asf},&lt;/span&gt;
&lt;span id="cb1-9"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;volume&lt;/span&gt;  = 68,&lt;/span&gt;
&lt;span id="cb1-10"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;year&lt;/span&gt;    = 2026&lt;/span&gt;
&lt;span id="cb1-11"&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
  &lt;/details&gt;
&lt;/section&gt;

 </description>
      <category>Articles</category>
      <guid>https://robjhyndman.com/publications/age_structure_forecasts.html</guid>
      <pubDate>Sat, 21 Feb 2026 13:00:00 GMT</pubDate>
    </item>
    <item>
      <title>ggtime: A grammar of temporal graphics</title>
      <creator>Cynthia A Huang, Mitchell O'Hara-Wild, Rob J Hyndman, Matthew Kay</creator>
      <link>https://robjhyndman.com/publications/ggtime.html</link>
      <description> 





&lt;p&gt;Visualizing changes over time is fundamental to learning from the past and anticipating the future. However, temporal semantics can be complicated, and existing visualization tools often struggle to accurately represent these complexities. It is common to use bespoke plot helper functions designed to produce specific graphics, due to the absence of flexible general tools that respect temporal semantics. We address this problem by proposing a grammar of temporal graphics, and an associated software implementation, &lt;a href="https://pkg.mitchelloharawild.com/ggtime/dev"&gt;&lt;code&gt;ggtime&lt;/code&gt;&lt;/a&gt;, that encodes temporal semantics into a declarative grammar for visualizing temporal data. The grammar introduces new composable elements that support visualization across linear, cyclical, quasi-cyclical, and other granularities; standardization of irregular durations; and alignment of time points across different granularities and time zones. It is designed for interoperability with other semantic variables, allowing navigation across the space of visualizations while preserving temporal semantics.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://pkg.mitchelloharawild.com/ggtime/dev"&gt;R package: &lt;strong&gt;ggtime&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;



&lt;section class="cite-bibtex"&gt;
  &lt;details&gt;
    &lt;summary&gt;Cite&lt;/summary&gt;
    &lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb1" style="background: #f1f3f5;"&gt;&lt;pre class="sourceCode bibtex code-with-copy"&gt;&lt;code class="sourceCode bibtex"&gt;&lt;span id="cb1-1"&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;@techreport&lt;/span&gt;{&lt;span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"&gt;ggtime&lt;/span&gt;,&lt;/span&gt;
&lt;span id="cb1-2"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;author&lt;/span&gt;      = {Cynthia A Huang and Mitchell O'Hara-Wild and Rob J Hyndman and Matthew Kay},&lt;/span&gt;
&lt;span id="cb1-3"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;institution&lt;/span&gt; = {Department of Econometrics &lt;span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;"&gt;\&amp;amp;&lt;/span&gt; Business Statistics, Monash University},&lt;/span&gt;
&lt;span id="cb1-4"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;title&lt;/span&gt;       = {ggtime: A grammar of temporal graphics},&lt;/span&gt;
&lt;span id="cb1-5"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;type&lt;/span&gt;        = {Working paper},&lt;/span&gt;
&lt;span id="cb1-6"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;url&lt;/span&gt;         = {http://robjhyndman.com/publications/ggtime.html},&lt;/span&gt;
&lt;span id="cb1-7"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;year&lt;/span&gt;        = 2025&lt;/span&gt;
&lt;span id="cb1-8"&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
  &lt;/details&gt;
&lt;/section&gt;

 </description>
      <category>Working papers</category>
      <guid>https://robjhyndman.com/publications/ggtime.html</guid>
      <pubDate>Wed, 29 Oct 2025 13:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Distortion corrected kernel density estimator on Riemannian manifolds</title>
      <creator>Fan Cheng, Rob J Hyndman, Anastasios Panagiotelis</creator>
      <link>https://robjhyndman.com/publications/kderm.html</link>
      <description> 





&lt;p&gt;Manifold learning obtains a low-dimensional representation of an underlying Riemannian manifold supporting high-dimensional data. Kernel density estimates of the low-dimensional embedding with a fixed bandwidth fail to account for the way manifold learning algorithms distort the geometry of the Riemannian manifold. We propose a novel distortion-corrected kernel density estimator (DC-KDE) for any manifold learning embedding, with a bandwidth that depends on the estimated Riemannian metric at each data point. Exploiting the geometric information of the manifold leads to more accurate density estimation, which subsequently could be used for anomaly detection. To compare our proposed estimator with a fixed-bandwidth kernel density estimator, we run two simulations including one with data lying in a 100 dimensional ambient space. We demonstrate that the proposed DC-KDE improves the density estimates as long as the manifold learning embedding is of sufficient quality, and has higher rank correlations with the true manifold density. Further simulation results are provided via a supplementary R shiny app. The proposed method is applied to density estimation in statistical manifolds of electricity usage with the Irish smart meter data.&lt;/p&gt;



&lt;section class="cite-bibtex"&gt;
  &lt;details&gt;
    &lt;summary&gt;Cite&lt;/summary&gt;
    &lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb1" style="background: #f1f3f5;"&gt;&lt;pre class="sourceCode bibtex code-with-copy"&gt;&lt;code class="sourceCode bibtex"&gt;&lt;span id="cb1-1"&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;@article&lt;/span&gt;{&lt;span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"&gt;kderm&lt;/span&gt;,&lt;/span&gt;
&lt;span id="cb1-2"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;author&lt;/span&gt;  = {Fan Cheng and Rob J Hyndman and Anastasios Panagiotelis},&lt;/span&gt;
&lt;span id="cb1-3"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;doi&lt;/span&gt;     = {10.1080/10618600.2024.2415543},&lt;/span&gt;
&lt;span id="cb1-4"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;journal&lt;/span&gt; = {J Computational &lt;span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;"&gt;\&amp;amp;&lt;/span&gt; Graphical Statistics},&lt;/span&gt;
&lt;span id="cb1-5"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;number&lt;/span&gt;  = 3,&lt;/span&gt;
&lt;span id="cb1-6"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;pages&lt;/span&gt;   = {906-922},&lt;/span&gt;
&lt;span id="cb1-7"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;title&lt;/span&gt;   = {Distortion corrected kernel density estimator on Riemannian manifolds},&lt;/span&gt;
&lt;span id="cb1-8"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;url&lt;/span&gt;     = {https://robjhyndman.com/publications/kderm.html},&lt;/span&gt;
&lt;span id="cb1-9"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;volume&lt;/span&gt;  = 34,&lt;/span&gt;
&lt;span id="cb1-10"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;year&lt;/span&gt;    = 2025&lt;/span&gt;
&lt;span id="cb1-11"&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
  &lt;/details&gt;
&lt;/section&gt;

 </description>
      <category>Articles</category>
      <guid>https://robjhyndman.com/publications/kderm.html</guid>
      <pubDate>Sun, 31 Aug 2025 14:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Moving averages</title>
      <creator>Rob J Hyndman </creator>
      <link>https://robjhyndman.com/publications/iess1b.html</link>
      <description> 








&lt;section class="cite-bibtex"&gt;
  &lt;details&gt;
    &lt;summary&gt;Cite&lt;/summary&gt;
    &lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb1" style="background: #f1f3f5;"&gt;&lt;pre class="sourceCode bibtex code-with-copy"&gt;&lt;code class="sourceCode bibtex"&gt;&lt;span id="cb1-1"&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;@incollection&lt;/span&gt;{&lt;span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"&gt;IESS25a&lt;/span&gt;,&lt;/span&gt;
&lt;span id="cb1-2"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;author&lt;/span&gt;    = {Rob J Hyndman},&lt;/span&gt;
&lt;span id="cb1-3"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;booktitle&lt;/span&gt; = {International Encyclopedia of Statistical Science},&lt;/span&gt;
&lt;span id="cb1-4"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;doi&lt;/span&gt;       = {10.1007/978-3-662-69359-9_383},&lt;/span&gt;
&lt;span id="cb1-5"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;edition&lt;/span&gt;   = {2nd ed},&lt;/span&gt;
&lt;span id="cb1-6"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;editor&lt;/span&gt;    = {Miodrag Lovric},&lt;/span&gt;
&lt;span id="cb1-7"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;pages&lt;/span&gt;     = {1559-1562},&lt;/span&gt;
&lt;span id="cb1-8"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;publisher&lt;/span&gt; = {Springer},&lt;/span&gt;
&lt;span id="cb1-9"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;title&lt;/span&gt;     = {Moving averages},&lt;/span&gt;
&lt;span id="cb1-10"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;year&lt;/span&gt;      = 2025&lt;/span&gt;
&lt;span id="cb1-11"&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
  &lt;/details&gt;
&lt;/section&gt;

 </description>
      <category>Book chapters</category>
      <guid>https://robjhyndman.com/publications/iess1b.html</guid>
      <pubDate>Wed, 18 Jun 2025 14:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Business forecasting methods</title>
      <creator>Rob J Hyndman </creator>
      <link>https://robjhyndman.com/publications/iess2b.html</link>
      <description> 








&lt;section class="cite-bibtex"&gt;
  &lt;details&gt;
    &lt;summary&gt;Cite&lt;/summary&gt;
    &lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb1" style="background: #f1f3f5;"&gt;&lt;pre class="sourceCode bibtex code-with-copy"&gt;&lt;code class="sourceCode bibtex"&gt;&lt;span id="cb1-1"&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;@incollection&lt;/span&gt;{&lt;span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"&gt;IESS25c&lt;/span&gt;,&lt;/span&gt;
&lt;span id="cb1-2"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;author&lt;/span&gt;    = {Rob J Hyndman},&lt;/span&gt;
&lt;span id="cb1-3"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;booktitle&lt;/span&gt; = {International Encyclopedia of Statistical Science},&lt;/span&gt;
&lt;span id="cb1-4"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;doi&lt;/span&gt;       = {10.1007/978-3-662-69359-9_83},&lt;/span&gt;
&lt;span id="cb1-5"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;edition&lt;/span&gt;   = {2nd ed},&lt;/span&gt;
&lt;span id="cb1-6"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;editor&lt;/span&gt;    = {Miodrag Lovric},&lt;/span&gt;
&lt;span id="cb1-7"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;pages&lt;/span&gt;     = {362-372},&lt;/span&gt;
&lt;span id="cb1-8"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;publisher&lt;/span&gt; = {Springer},&lt;/span&gt;
&lt;span id="cb1-9"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;title&lt;/span&gt;     = {Business forecasting methods},&lt;/span&gt;
&lt;span id="cb1-10"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;year&lt;/span&gt;      = 2025&lt;/span&gt;
&lt;span id="cb1-11"&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
  &lt;/details&gt;
&lt;/section&gt;

 </description>
      <category>Book chapters</category>
      <guid>https://robjhyndman.com/publications/iess2b.html</guid>
      <pubDate>Wed, 18 Jun 2025 14:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Forecasting overview</title>
      <creator>Rob J Hyndman </creator>
      <link>https://robjhyndman.com/publications/iess3b.html</link>
      <description> 








&lt;section class="cite-bibtex"&gt;
  &lt;details&gt;
    &lt;summary&gt;Cite&lt;/summary&gt;
    &lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb1" style="background: #f1f3f5;"&gt;&lt;pre class="sourceCode bibtex code-with-copy"&gt;&lt;code class="sourceCode bibtex"&gt;&lt;span id="cb1-1"&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;@incollection&lt;/span&gt;{&lt;span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"&gt;IESS25b&lt;/span&gt;,&lt;/span&gt;
&lt;span id="cb1-2"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;author&lt;/span&gt;    = {Rob J Hyndman},&lt;/span&gt;
&lt;span id="cb1-3"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;booktitle&lt;/span&gt; = {International Encyclopedia of Statistical Science},&lt;/span&gt;
&lt;span id="cb1-4"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;doi&lt;/span&gt;       = {10.1007/978-3-662-69359-9_234},&lt;/span&gt;
&lt;span id="cb1-5"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;edition&lt;/span&gt;   = {2nd ed},&lt;/span&gt;
&lt;span id="cb1-6"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;editor&lt;/span&gt;    = {Miodrag Lovric},&lt;/span&gt;
&lt;span id="cb1-7"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;pages&lt;/span&gt;     = {964-968},&lt;/span&gt;
&lt;span id="cb1-8"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;publisher&lt;/span&gt; = {Springer},&lt;/span&gt;
&lt;span id="cb1-9"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;title&lt;/span&gt;     = {Forecasting overview},&lt;/span&gt;
&lt;span id="cb1-10"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;year&lt;/span&gt;      = 2025&lt;/span&gt;
&lt;span id="cb1-11"&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
  &lt;/details&gt;
&lt;/section&gt;

 </description>
      <category>Book chapters</category>
      <guid>https://robjhyndman.com/publications/iess3b.html</guid>
      <pubDate>Wed, 18 Jun 2025 14:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Hierarchical time series forecasting in emergency medical services</title>
      <creator>Bahman Rostami-Tabar, Rob J Hyndman</creator>
      <link>https://robjhyndman.com/publications/fem.html</link>
      <description> 





&lt;p&gt;Accurate forecasts of ambulance demand are crucial inputs when planning and deploying staff and fleet. Such demand forecasts are required at national, regional and sub-regional levels, and must take account of the nature of incidents and their priorities. These forecasts are often generated independently by different teams within the organization. As a result, forecasts at different levels may be inconsistent, resulting in conflicting decisions and a lack of coherent coordination in the service. To address this issue, we exploit the hierarchical and grouped structure of the demand time series, and apply forecast reconciliation methods to generate both point and probabilistic forecasts that are coherent and use all the available data at all levels of disaggregation. The methods are applied to daily incident data from an ambulance service in Great Britain, from October 2015 to July 2019, disaggregated by nature of incident, priority, managing health board, and control area. We use an ensemble of forecasting models, and show that the resulting forecasts are better than any individual forecasting model. We validate the forecasting approach using time-series cross-validation.&lt;/p&gt;



&lt;section class="cite-bibtex"&gt;
  &lt;details&gt;
    &lt;summary&gt;Cite&lt;/summary&gt;
    &lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb1" style="background: #f1f3f5;"&gt;&lt;pre class="sourceCode bibtex code-with-copy"&gt;&lt;code class="sourceCode bibtex"&gt;&lt;span id="cb1-1"&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;@article&lt;/span&gt;{&lt;span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"&gt;fem&lt;/span&gt;,&lt;/span&gt;
&lt;span id="cb1-2"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;author&lt;/span&gt;  = {Bahman Rostami-Tabar and Rob J Hyndman},&lt;/span&gt;
&lt;span id="cb1-3"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;doi&lt;/span&gt;     = {10.1177/10946705241232169},&lt;/span&gt;
&lt;span id="cb1-4"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;journal&lt;/span&gt; = {Journal of Service Research},&lt;/span&gt;
&lt;span id="cb1-5"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;number&lt;/span&gt;  = 4,&lt;/span&gt;
&lt;span id="cb1-6"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;pages&lt;/span&gt;   = {278-295},&lt;/span&gt;
&lt;span id="cb1-7"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;title&lt;/span&gt;   = {Hierarchical time series forecasting in emergency medical services},&lt;/span&gt;
&lt;span id="cb1-8"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;url&lt;/span&gt;     = {http://robjhyndman.com/publications/fem.html},&lt;/span&gt;
&lt;span id="cb1-9"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;volume&lt;/span&gt;  = 28,&lt;/span&gt;
&lt;span id="cb1-10"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;year&lt;/span&gt;    = {2025}&lt;/span&gt;
&lt;span id="cb1-11"&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
  &lt;/details&gt;
&lt;/section&gt;

 </description>
      <category>Articles</category>
      <guid>https://robjhyndman.com/publications/fem.html</guid>
      <pubDate>Thu, 01 May 2025 14:00:00 GMT</pubDate>
    </item>
    <item>
      <title>MSTL: A Seasonal-Trend Decomposition Algorithm for Time Series with Multiple Seasonal Patterns</title>
      <creator>Kasun Bandara, Rob J Hyndman, Christoph Bergmeir</creator>
      <link>https://robjhyndman.com/publications/mstl/</link>
      <description> 





&lt;p&gt;The decomposition of time series into components is an important task that helps to understand time series and can enable better forecasting. Nowadays, with high sampling rates leading to high-frequency data (such as daily, hourly, or minutely data), many datasets contain time series data that can exhibit multiple seasonal patterns. Although several methods have been proposed to decompose time series better under these circumstances, they are often computationally inefficient or inaccurate. We propose a procedure to decompose time series with multiple seasonal patterns that is suited to a wide range of high-frequency data. The procedure for Multiple Seasonal Trend decomposition (MSTL) introduced in this paper extends the traditional Seasonal-Trend decomposition using Loess (STL) algorithm, allowing the decomposition of time series with multiple seasonal patterns. In our evaluation on synthetic and a perturbed real-world time series dataset, compared to other decomposition benchmarks, MSTL demonstrates competitive results with lower computational cost. The implementation of MSTL is available in the R packages &lt;a href="https://pkg.robjhyndman.com/forecast/"&gt;forecast&lt;/a&gt; and &lt;a href="https://feasts.tidyverts.org"&gt;feasts&lt;/a&gt;.&lt;/p&gt;



&lt;section class="cite-bibtex"&gt;
  &lt;details&gt;
    &lt;summary&gt;Cite&lt;/summary&gt;
    &lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb1" style="background: #f1f3f5;"&gt;&lt;pre class="sourceCode bibtex code-with-copy"&gt;&lt;code class="sourceCode bibtex"&gt;&lt;span id="cb1-1"&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;@article&lt;/span&gt;{&lt;span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"&gt;mstl&lt;/span&gt;,&lt;/span&gt;
&lt;span id="cb1-2"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;author&lt;/span&gt;  = {Kasun Bandara and Rob J Hyndman and Christoph Bergmeir},&lt;/span&gt;
&lt;span id="cb1-3"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;doi&lt;/span&gt;     = {10.1504/IJOR.2022.10048281},&lt;/span&gt;
&lt;span id="cb1-4"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;journal&lt;/span&gt; = {International J Operational Research},&lt;/span&gt;
&lt;span id="cb1-5"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;number&lt;/span&gt;  = 1,&lt;/span&gt;
&lt;span id="cb1-6"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;title&lt;/span&gt;   = {{MSTL}: A Seasonal-Trend Decomposition Algorithm for Time Series with Multiple Seasonal Patterns},&lt;/span&gt;
&lt;span id="cb1-7"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;url&lt;/span&gt;     = {http://robjhyndman.com/publications/mstl/},&lt;/span&gt;
&lt;span id="cb1-8"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;volume&lt;/span&gt;  = {52},&lt;/span&gt;
&lt;span id="cb1-9"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;year&lt;/span&gt;    = 2025&lt;/span&gt;
&lt;span id="cb1-10"&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
  &lt;/details&gt;
&lt;/section&gt;

 </description>
      <category>Articles</category>
      <guid>https://robjhyndman.com/publications/mstl/</guid>
      <pubDate>Wed, 15 Jan 2025 13:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Comments on: Exploratory functional data analysis</title>
      <creator>Rob J Hyndman </creator>
      <link>https://robjhyndman.com/publications/efda.html</link>
      <description> 





&lt;p&gt;Commentary on &lt;a href="https://doi.org/10.1007/s11749-024-00952-8"&gt;Qu, Dai, Euan, Sun and Genton (2025) Exploratory Functional Data Analysis, &lt;em&gt;TEST&lt;/em&gt;, &lt;strong&gt;34&lt;/strong&gt;, 459-482&lt;/a&gt;.&lt;/p&gt;



&lt;section class="cite-bibtex"&gt;
  &lt;details&gt;
    &lt;summary&gt;Cite&lt;/summary&gt;
    &lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb1" style="background: #f1f3f5;"&gt;&lt;pre class="sourceCode bibtex code-with-copy"&gt;&lt;code class="sourceCode bibtex"&gt;&lt;span id="cb1-1"&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;@article&lt;/span&gt;{&lt;span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"&gt;efda&lt;/span&gt;,&lt;/span&gt;
&lt;span id="cb1-2"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;author&lt;/span&gt;  = {Rob J Hyndman},&lt;/span&gt;
&lt;span id="cb1-3"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;doi&lt;/span&gt;     = {10.1007/s11749-025-00963-z},&lt;/span&gt;
&lt;span id="cb1-4"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;journal&lt;/span&gt; = {TEST},&lt;/span&gt;
&lt;span id="cb1-5"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;pages&lt;/span&gt;   = {483-487},&lt;/span&gt;
&lt;span id="cb1-6"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;title&lt;/span&gt;   = {Comments on: Exploratory functional data analysis},&lt;/span&gt;
&lt;span id="cb1-7"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;volume&lt;/span&gt;  = 34,&lt;/span&gt;
&lt;span id="cb1-8"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;year&lt;/span&gt;    = 2025&lt;/span&gt;
&lt;span id="cb1-9"&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
  &lt;/details&gt;
&lt;/section&gt;

 </description>
      <category>Articles</category>
      <guid>https://robjhyndman.com/publications/efda.html</guid>
      <pubDate>Tue, 07 Jan 2025 13:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Optimal forecast reconciliation with time series selection</title>
      <creator>Xiaoqian Wang, Rob J Hyndman, Shanika L Wickramasuriya</creator>
      <link>https://robjhyndman.com/publications/hf_selection.html</link>
      <description> 





&lt;p&gt;Forecast reconciliation ensures forecasts of time series in a hierarchy adhere to aggregation constraints, enabling aligned decision making. While forecast reconciliation can enhance overall accuracy in a hierarchical or grouped structure, it can lead to worse forecasts for certain series, with the greatest gains typically seen in series that originally have poorly performing base forecasts. In practical applications, some series in a structure often produce poor base forecasts due to model misspecification or low forecastability. To mitigate their negative impact, we propose two categories of forecast reconciliation methods that incorporate automatic time series selection based on out-of-sample and in-sample information, respectively. These methods keep “poor” base forecasts unused in forming reconciled forecasts, while adjusting the weights assigned to the remaining series accordingly when generating bottom-level reconciled forecasts. Additionally, our methods ameliorate disparities stemming from varied estimators of the base forecast error covariance matrix, alleviating challenges associated with estimator selection. Empirical evaluations through two simulation studies and applications using Australian labour force and domestic tourism data demonstrate the potential of the proposed methods to exclude series with high scaled forecast errors and show promising results.&lt;/p&gt;



&lt;section class="cite-bibtex"&gt;
  &lt;details&gt;
    &lt;summary&gt;Cite&lt;/summary&gt;
    &lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb1" style="background: #f1f3f5;"&gt;&lt;pre class="sourceCode bibtex code-with-copy"&gt;&lt;code class="sourceCode bibtex"&gt;&lt;span id="cb1-1"&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;@article&lt;/span&gt;{&lt;span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"&gt;hfselection&lt;/span&gt;,&lt;/span&gt;
&lt;span id="cb1-2"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;author&lt;/span&gt;  = {Xiaoqian Wang and Rob J Hyndman and Shanika L Wickramasuriya},&lt;/span&gt;
&lt;span id="cb1-3"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;doi&lt;/span&gt;     = {10.1016/j.ejor.2024.12.004},&lt;/span&gt;
&lt;span id="cb1-4"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;journal&lt;/span&gt; = {European J Operational Research},&lt;/span&gt;
&lt;span id="cb1-5"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;number&lt;/span&gt;  = 2,&lt;/span&gt;
&lt;span id="cb1-6"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;pages&lt;/span&gt;   = {455-470},&lt;/span&gt;
&lt;span id="cb1-7"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;title&lt;/span&gt;   = {Optimal forecast reconciliation with time series selection},&lt;/span&gt;
&lt;span id="cb1-8"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;url&lt;/span&gt;     = {http://robjhyndman.com/publications/hf_selection.html},&lt;/span&gt;
&lt;span id="cb1-9"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;volume&lt;/span&gt;  = 323,&lt;/span&gt;
&lt;span id="cb1-10"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;year&lt;/span&gt;    = 2025&lt;/span&gt;
&lt;span id="cb1-11"&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
  &lt;/details&gt;
&lt;/section&gt;

 </description>
      <category>Articles</category>
      <guid>https://robjhyndman.com/publications/hf_selection.html</guid>
      <pubDate>Tue, 31 Dec 2024 13:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Extreme value modelling of feature residuals for anomaly detection in dynamic graphs</title>
      <creator>Sevvandi Kandanaarachchi, Conrad Sanderson, Rob J Hyndman</creator>
      <link>https://robjhyndman.com/publications/oddnet2.html</link>
      <description> 





&lt;p&gt;Detecting anomalies in a temporal sequence of graphs can be applied is areas such as the detection of accidents in transport networks and cyber attacks in computer networks. Existing methods for detecting abnormal graphs can suffer from multiple limitations, such as high false positive rates as well as difficulties with handling variable-sized graphs and non-trivial temporal dynamics. To address this, we propose a technique where temporal dependencies are explicitly modelled via time series analysis of a large set of pertinent graph features, followed by using residuals to remove the dependencies. Extreme Value Theory is then used to robustly model and classify any remaining extremes, aiming to produce low false positives rates. Comparative evaluations on a multitude of graph instances show that the proposed approach obtains considerably better accuracy than &lt;em&gt;TensorSplat&lt;/em&gt; and &lt;em&gt;Laplacian Anomaly Detection&lt;/em&gt;.&lt;/p&gt;



&lt;section class="cite-bibtex"&gt;
  &lt;details&gt;
    &lt;summary&gt;Cite&lt;/summary&gt;
    &lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb1" style="background: #f1f3f5;"&gt;&lt;pre class="sourceCode bibtex code-with-copy"&gt;&lt;code class="sourceCode bibtex"&gt;&lt;span id="cb1-1"&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;@inproceedings&lt;/span&gt;{&lt;span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"&gt;oddnet2&lt;/span&gt;,&lt;/span&gt;
&lt;span id="cb1-2"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;author&lt;/span&gt;    = {Sevvandi Kandanaarachchi and Conrad Sanderson and Rob J Hyndman},&lt;/span&gt;
&lt;span id="cb1-3"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;booktitle&lt;/span&gt; = {2024 11th International Conference on Soft Computing &lt;span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;"&gt;\&amp;amp;&lt;/span&gt; Machine Intelligence (ISCMI)},&lt;/span&gt;
&lt;span id="cb1-4"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;doi&lt;/span&gt;       = {10.1109/ISCMI63661.2024.10851659},&lt;/span&gt;
&lt;span id="cb1-5"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;pages&lt;/span&gt;     = {32-37},&lt;/span&gt;
&lt;span id="cb1-6"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;title&lt;/span&gt;     = {Extreme value modelling of feature residuals for anomaly detection in dynamic graphs},&lt;/span&gt;
&lt;span id="cb1-7"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;url&lt;/span&gt;       = {https://robjhyndman.com/publications/oddnet2.html},&lt;/span&gt;
&lt;span id="cb1-8"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;year&lt;/span&gt;      = 2024&lt;/span&gt;
&lt;span id="cb1-9"&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
  &lt;/details&gt;
&lt;/section&gt;

 </description>
      <category>Conference proceedings</category>
      <guid>https://robjhyndman.com/publications/oddnet2.html</guid>
      <pubDate>Thu, 21 Nov 2024 13:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Functional data analysis for peak shape forecasting</title>
      <creator>Shreyashi Shukla, Tao Hong, Rob J Hyndman</creator>
      <link>https://robjhyndman.com/publications/fdashape.html</link>
      <description> 





&lt;p&gt;Peak load forecasting is critical for power system operations and planning. Electric utilities are increasingly adopting peak-shaving strategies as they look for sustainable solutions to improve operational excellence. During the past few decades, hourly load forecasts have been used in practice as the input to inform peak-shaving decisions. The BigDEAL Challenge 2022 first proposed the concept of peak (load) shape forecasting, which showed that a better hourly load forecast may not result in a better peak shape forecast. This paper tackles peak shape forecasting, an under-served aspect of peak load forecasting, which is critical for deploying those peak shaving programs. We adopt functional data analysis in exploring new approaches to peak shape forecasting. Using the data published by ISONE, the experiments show that the peak shape forecasts are more robust when compared with the state-of-the-art hourly forecasting models, reducing the errors by 14–18%. The experiment also demonstrates that no single model excels across all attributes, emphasizing the need to build task-specific models.&lt;/p&gt;



&lt;section class="cite-bibtex"&gt;
  &lt;details&gt;
    &lt;summary&gt;Cite&lt;/summary&gt;
    &lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb1" style="background: #f1f3f5;"&gt;&lt;pre class="sourceCode bibtex code-with-copy"&gt;&lt;code class="sourceCode bibtex"&gt;&lt;span id="cb1-1"&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;@unpublished&lt;/span&gt;{&lt;span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"&gt;fdashape&lt;/span&gt;,&lt;/span&gt;
&lt;span id="cb1-2"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;author&lt;/span&gt; = {Shreyashi Shukla and Tao Hong and Rob J Hyndman},&lt;/span&gt;
&lt;span id="cb1-3"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;title&lt;/span&gt;  = {Functional data analysis for peak shape forecasting},&lt;/span&gt;
&lt;span id="cb1-4"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;url&lt;/span&gt;    = {https://robjhyndman.com/publications/fdashape},&lt;/span&gt;
&lt;span id="cb1-5"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;year&lt;/span&gt;   = {2024}&lt;/span&gt;
&lt;span id="cb1-6"&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
  &lt;/details&gt;
&lt;/section&gt;

 </description>
      <category>Working papers</category>
      <guid>https://robjhyndman.com/publications/fdashape.html</guid>
      <pubDate>Fri, 15 Nov 2024 13:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Online conformal inference for multi-step time series forecasting</title>
      <creator>Xiaoqian Wang, Rob J Hyndman</creator>
      <link>https://robjhyndman.com/publications/cpts.html</link>
      <description> 





&lt;p&gt;We consider the problem of constructing distribution-free prediction intervals for multi-step time series forecasting, with a focus on the temporal dependencies inherent in multi-step forecast errors. We establish that the optimal &lt;img src="https://latex.codecogs.com/png.latex?h"&gt;-step-ahead forecast errors exhibit serial correlation up to lag &lt;img src="https://latex.codecogs.com/png.latex?(h-1)"&gt; under a general non-stationary autoregressive data generating process. To leverage these properties, we propose the Autocorrelated Multi-step Conformal Prediction (AcMCP) method, which effectively incorporates autocorrelations in multi-step forecast errors, resulting in more statistically efficient prediction intervals. This method ensures theoretical long-run coverage guarantees for multi-step prediction intervals, though we note that increased forecasting horizons may exacerbate deviations from the target coverage, particularly in the context of limited sample sizes. Additionally, we extend several easy-to-implement conformal prediction methods, originally designed for single-step forecasting, to accommodate multi-step scenarios. Through empirical evaluations, including simulations and applications to data, we demonstrate that AcMCP achieves coverage that closely aligns with the target within local windows, while providing adaptive prediction intervals that effectively respond to varying conditions.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;R package&lt;/strong&gt;: &lt;a href="https://xqnwang.github.io/conformalForecast/"&gt;conformalForecast&lt;/a&gt;&lt;/p&gt;



&lt;section class="cite-bibtex"&gt;
  &lt;details&gt;
    &lt;summary&gt;Cite&lt;/summary&gt;
    &lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb1" style="background: #f1f3f5;"&gt;&lt;pre class="sourceCode bibtex code-with-copy"&gt;&lt;code class="sourceCode bibtex"&gt;&lt;span id="cb1-1"&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;@techreport&lt;/span&gt;{&lt;span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"&gt;cpts&lt;/span&gt;,&lt;/span&gt;
&lt;span id="cb1-2"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;author&lt;/span&gt;      = {Xiaoqian Wang and Rob J Hyndman},&lt;/span&gt;
&lt;span id="cb1-3"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;institution&lt;/span&gt; = {Department of Econometrics &lt;span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;"&gt;\&amp;amp;&lt;/span&gt; Business Statistics, Monash University},&lt;/span&gt;
&lt;span id="cb1-4"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;number&lt;/span&gt;      = {20-24},&lt;/span&gt;
&lt;span id="cb1-5"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;title&lt;/span&gt;       = {Online conformal inference for multi-step time series forecasting},&lt;/span&gt;
&lt;span id="cb1-6"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;type&lt;/span&gt;        = {Working paper},&lt;/span&gt;
&lt;span id="cb1-7"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;url&lt;/span&gt;         = {http://robjhyndman.com/publications/cpts.html},&lt;/span&gt;
&lt;span id="cb1-8"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;year&lt;/span&gt;        = 2024&lt;/span&gt;
&lt;span id="cb1-9"&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
  &lt;/details&gt;
&lt;/section&gt;

 </description>
      <category>Working papers</category>
      <guid>https://robjhyndman.com/publications/cpts.html</guid>
      <pubDate>Thu, 17 Oct 2024 13:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Improving out-of-sample forecasts of stock price indexes with forecast reconciliation and clustering</title>
      <creator>Raffaele Mattera, George Athanasopoulos, Rob J Hyndman</creator>
      <link>https://robjhyndman.com/publications/dow_hts.html</link>
      <description> 





&lt;p&gt;We propose a novel approach to improving forecasts of stock market indexes by considering common stock prices as hierarchical time series, combining clustering with forecast reconciliation. We propose to group the individual stock price series in various ways including via metadata and using unsupervised learning techniques. The proposed approach is applied to the Dow Jones Industrial Average Index and the Standard &amp;amp; Poor 500 Index and their component stocks, and the results obtained with different grouping approaches are compared. The results demonstrate empirically that the combined use of clustering and reconciliation improves the forecast accuracy of the stock market indexes and their constituents.&lt;/p&gt;



&lt;section class="cite-bibtex"&gt;
  &lt;details&gt;
    &lt;summary&gt;Cite&lt;/summary&gt;
    &lt;div class="code-copy-outer-scaffold"&gt;&lt;div class="sourceCode" id="cb1" style="background: #f1f3f5;"&gt;&lt;pre class="sourceCode bibtex code-with-copy"&gt;&lt;code class="sourceCode bibtex"&gt;&lt;span id="cb1-1"&gt;&lt;span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"&gt;@article&lt;/span&gt;{&lt;span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;"&gt;dowhts&lt;/span&gt;,&lt;/span&gt;
&lt;span id="cb1-2"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;author&lt;/span&gt;  = {Raffaele Mattera and George Athanasopoulos and Rob J Hyndman},&lt;/span&gt;
&lt;span id="cb1-3"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;doi&lt;/span&gt;     = {10.1080/14697688.2024.2412687},&lt;/span&gt;
&lt;span id="cb1-4"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;journal&lt;/span&gt; = {Quantitative Finance},&lt;/span&gt;
&lt;span id="cb1-5"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;number&lt;/span&gt;  = 11,&lt;/span&gt;
&lt;span id="cb1-6"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;pages&lt;/span&gt;   = {1641-1667},&lt;/span&gt;
&lt;span id="cb1-7"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;title&lt;/span&gt;   = {Improving out-of-sample forecasts of stock price indexes with forecast reconciliation and clustering},&lt;/span&gt;
&lt;span id="cb1-8"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;url&lt;/span&gt;     = {https://robjhyndman.com/publications/dow_hts.html},&lt;/span&gt;
&lt;span id="cb1-9"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;volume&lt;/span&gt;  = 24,&lt;/span&gt;
&lt;span id="cb1-10"&gt;  &lt;span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;"&gt;year&lt;/span&gt;    = 2024&lt;/span&gt;
&lt;span id="cb1-11"&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
  &lt;/details&gt;
&lt;/section&gt;

 </description>
      <category>Articles</category>
      <guid>https://robjhyndman.com/publications/dow_hts.html</guid>
      <pubDate>Thu, 19 Sep 2024 14:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Surprises in time series analysis</title>
      <link>https://robjhyndman.com/seminars/ts_surprises.html</link>
      <description> 



&lt;p&gt;Part of &lt;a href="https://yaozheng-stat.github.io/time-series-connect/"&gt;Time Series Connect webinar series&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Monday 26 October 2026, 6:00 PM Eastern Time&lt;/p&gt;
&lt;section id="abstract" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="abstract"&gt;Abstract&lt;/h2&gt;
&lt;p&gt;I will present a statistical framework for identifying anomalies in three time series settings: unusual observations within a single historical series, unusual series within a large collection, and real-time surveillance of incoming data streams.&lt;/p&gt;
&lt;p&gt;In each case, anomalies are identified using a probabilistic approach based on ‘surprisal values’ — equal to minus the log (conditional) density of each observation — with extreme value theory used to model the tail of the surprisal distribution and avoid strong parametric assumptions.&lt;/p&gt;
&lt;p&gt;The methods will be illustrated using the &lt;a href="https://pkg.robjhyndman.com/weird/"&gt;{weird}&lt;/a&gt; package for R, with examples including French and US mortality rates, and pharmaceutical sales.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="slides" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="slides"&gt;Slides&lt;/h2&gt;
&lt;div class="click-embed" data-src="https://pkg.robjhyndman.com/surprisal_talk/uconn_2026.html" data-title="Slides" data-loading="Loading slides…"&gt;
  &lt;button type="button" class="click-facade"&gt;
    &lt;img src="https://robjhyndman.com/seminars/ts_surprises.jpg" alt="Title slide"&gt;
    &lt;span class="click-play"&gt;View slides&lt;/span&gt;
  &lt;/button&gt;
&lt;/div&gt;
&lt;script type="module" src="../click-embed.js"&gt;&lt;/script&gt;
&lt;a href="https://pkg.robjhyndman.com/surprisal_talk/uconn_2026.html" class="badge badge-small badge-red"&gt;Open slides in a new tab&lt;/a&gt;

&lt;/section&gt;
&lt;section id="software" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="software"&gt;Software&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://pkg.robjhyndman.com/weird/"&gt;&lt;img src="https://pkg.robjhyndman.com/weird/reference/figures/weird-hex.png" class="img-fluid" alt="weird package hex logo" width="130"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/section&gt;
&lt;section id="references" class="level2"&gt;




&lt;/section&gt;


&lt;div id="quarto-appendix" class="default"&gt;&lt;section class="quarto-appendix-contents" id="quarto-bibliography"&gt;&lt;h2 class="anchored quarto-appendix-heading"&gt;References&lt;/h2&gt;&lt;div id="refs" class="references csl-bib-body hanging-indent"&gt;
&lt;div id="ref-weird" class="csl-entry"&gt;
Hyndman, Rob J. 2026. &lt;em&gt;That’s Weird: Anomaly Detection Using &lt;span&gt;R&lt;/span&gt;&lt;/em&gt;. &lt;a href="https://OTexts.com/weird"&gt;https://OTexts.com/weird&lt;/a&gt;.
&lt;/div&gt;
&lt;div id="ref-surprisalevt" class="csl-entry"&gt;
Hyndman, Rob J, and David T Frazier. 2026. &lt;span&gt;“Anomaly Detection Using Surprisals.”&lt;/span&gt; &lt;a href="http://robjhyndman.com/publications/surprisals.html"&gt;http://robjhyndman.com/publications/surprisals.html&lt;/a&gt;.
&lt;/div&gt;
&lt;div id="ref-lookout2" class="csl-entry"&gt;
Hyndman, Rob J, Sevvandi Kandanaarachchi, and Katharine Turner. 2026. &lt;span&gt;“When Lookout Sees Crackle: Anomaly Detection via Kernel Density Estimation.”&lt;/span&gt; &lt;a href="http://robjhyndman.com/publications/lookout2.html"&gt;http://robjhyndman.com/publications/lookout2.html&lt;/a&gt;.
&lt;/div&gt;
&lt;/div&gt;&lt;/section&gt;&lt;/div&gt; </description>
      <guid>https://robjhyndman.com/seminars/ts_surprises.html</guid>
      <pubDate>Sun, 25 Oct 2026 13:00:00 GMT</pubDate>
      <content url="https://robjhyndman.com/seminars/ts_surprises.jpg" medium="image" type="image/jpeg"/>
    </item>
    <item>
      <title>Formatting and linting code and documents</title>
      <link>https://robjhyndman.com/seminars/formatting_linting.html</link>
      <description> 



&lt;section id="numbat-seminar" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="numbat-seminar"&gt;NUMBAT seminar&lt;/h2&gt;
&lt;p&gt;Consistently formatted source is easier to read, review and diff, and linters alert you to problems before they become bugs. I will survey and demonstrate the current generation of fast, opinionated formatters and linters — mostly written in Rust, and usable from the command line or from within Positron (and in some cases from RStudio). I’ll focus on air for R and panache for Quarto and R Markdown. If time, I might also mention jarl for R linting, ruff for Python, tex-fmt and chktex for LaTeX, and vale for&amp;nbsp;prose (checking manuscripts against a style guide). I’ll show how to use TOML configuration and format-on-save, so that your code and documents stay tidy with no ongoing effort.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="r" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="r"&gt;R&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://google.github.io/styleguide/Rguide.html"&gt;&lt;strong&gt;Google style guide&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://style.tidyverse.org/"&gt;&lt;strong&gt;Tidyverse style guide&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://styler.r-lib.org/"&gt;&lt;strong&gt;styler&lt;/strong&gt;&lt;/a&gt;: R code formatting&lt;/li&gt;
&lt;li&gt;&lt;a href="https://yihui.org/formatr/"&gt;&lt;strong&gt;formatR&lt;/strong&gt;&lt;/a&gt;: R code formatting&lt;/li&gt;
&lt;li&gt;&lt;a href="https://posit-dev.github.io/air/"&gt;&lt;strong&gt;air&lt;/strong&gt;&lt;/a&gt;: R code formatting&lt;/li&gt;
&lt;li&gt;&lt;a href="https://jarl.etiennebacher.com/"&gt;&lt;strong&gt;Jarl&lt;/strong&gt;&lt;/a&gt;: R code linting&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="python" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="python"&gt;Python&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.astral.sh/ruff/"&gt;&lt;strong&gt;Ruff&lt;/strong&gt;&lt;/a&gt;: Python linting and formatting&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="quarto-and-rmarkdown" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="quarto-and-rmarkdown"&gt;Quarto and Rmarkdown&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://panache.bz/"&gt;&lt;strong&gt;Panache&lt;/strong&gt;&lt;/a&gt;: Markdown, quarto and Rmarkdown linting and formatting&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="latex" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="latex"&gt;LaTeX&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/cmhughes/latexindent.pl"&gt;&lt;strong&gt;latexindent&lt;/strong&gt;&lt;/a&gt;: LaTeX formatting&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/wgunderwood/tex-fmt"&gt;&lt;strong&gt;tex-fmt&lt;/strong&gt;&lt;/a&gt;: LaTeX formatting&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.nongnu.org/chktex/"&gt;&lt;strong&gt;chktex&lt;/strong&gt;&lt;/a&gt;: LaTeX linting&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="other" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="other"&gt;Other&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://prettier.io/"&gt;&lt;strong&gt;Prettier&lt;/strong&gt;&lt;/a&gt;: JavaScript, TypeScript, HTML, CSS, JSON, Markdown&lt;/li&gt;
&lt;li&gt;&lt;a href="https://vale.sh/"&gt;&lt;strong&gt;Vale&lt;/strong&gt;&lt;/a&gt;: Prose linting&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="slides" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="slides"&gt;Slides&lt;/h2&gt;


&lt;div class="pdf-embed" data-pdf="https://github.com/robjhyndman/fl26_talk/raw/main/fl26.pdf"&gt;&lt;/div&gt;
&lt;a href="https://github.com/robjhyndman/fl26_talk/raw/main/fl26.pdf" class="badge badge-small badge-red"&gt;Download pdf&lt;/a&gt;
&lt;script type="module" src="../pdf-embed.js"&gt;&lt;/script&gt;
&lt;/section&gt;


 </description>
      <guid>https://robjhyndman.com/seminars/formatting_linting.html</guid>
      <pubDate>Mon, 17 Aug 2026 14:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Spotting the weird ones</title>
      <link>https://robjhyndman.com/seminars/weird.html</link>
      <description> 



&lt;p&gt;&lt;a href="https://www.auckland.ac.nz/en/science/about-the-faculty/department-of-statistics/ihaka-lecture-series.html#2026-series"&gt;&lt;strong&gt;Ihaka Lecture Series 2026&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;section id="abstract" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="abstract"&gt;Abstract&lt;/h2&gt;
&lt;p&gt;Data analysis is about finding the stories hidden in the mass of information that make up a data set. Usually we are interested in understanding the major patterns and the relationships that hold true for most of the data. But sometimes we need to look at the weird observations, the mavericks, the ones that don’t follow the crowd and behave differently. These observations are called ‘anomalies’. Many anomaly detection methods have been developed, but they are often based on ad hoc rules and hidden assumptions, and can lead to misleading conclusions.&lt;/p&gt;
&lt;p&gt;Instead, I will describe a principled statistical approach to identifying anomalies in diverse data sets, from simple numerical data to complex high-dimensional data objects. The ideas will be illustrated using the &lt;a href="https://pkg.robjhyndman.com/weird/"&gt;{weird}&lt;/a&gt; package for R applied to several data analysis problems, including spotting over-priced wines, identifying errors in the records of the Old Faithful Geyser, and uncovering forgotten epidemics in 19th century France.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="software" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="software"&gt;Software&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://pkg.robjhyndman.com/weird/"&gt;&lt;img src="https://pkg.robjhyndman.com/weird/reference/figures/weird-hex.png" class="img-fluid" alt="weird package hex logo" width="130"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/section&gt;
&lt;section id="book" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="book"&gt;Book&lt;/h2&gt;
&lt;div id="refs-book" class="references csl-bib-body hanging-indent"&gt;
&lt;div id="ref-weird" class="csl-entry"&gt;
Hyndman, Rob J. 2026. &lt;em&gt;That’s Weird: Anomaly Detection Using &lt;span&gt;R&lt;/span&gt;&lt;/em&gt;. &lt;a href="https://OTexts.com/weird"&gt;https://OTexts.com/weird&lt;/a&gt;.
&lt;/div&gt;
&lt;/div&gt;
&lt;/section&gt;
&lt;section id="papers" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="papers"&gt;Papers&lt;/h2&gt;
&lt;div id="refs-papers" class="references csl-bib-body hanging-indent"&gt;
&lt;div id="ref-surprisalevt" class="csl-entry"&gt;
Hyndman, Rob J, and David T Frazier. 2026. &lt;span&gt;“Anomaly Detection Using Surprisals.”&lt;/span&gt; &lt;a href="http://robjhyndman.com/publications/surprisals.html"&gt;http://robjhyndman.com/publications/surprisals.html&lt;/a&gt;.
&lt;/div&gt;
&lt;div id="ref-lookout2" class="csl-entry"&gt;
Hyndman, Rob J, Sevvandi Kandanaarachchi, and Katharine Turner. 2026. &lt;span&gt;“When Lookout Sees Crackle: Anomaly Detection via Kernel Density Estimation.”&lt;/span&gt; &lt;a href="http://robjhyndman.com/publications/lookout2.html"&gt;http://robjhyndman.com/publications/lookout2.html&lt;/a&gt;.
&lt;/div&gt;
&lt;div id="ref-lookout" class="csl-entry"&gt;
Kandanaarachchi, Sevvandi, and Rob J Hyndman. 2022. &lt;span&gt;“Leave-One-Out Kernel Density Estimates for Outlier Detection.”&lt;/span&gt; &lt;em&gt;J Computational &amp;amp; Graphical Statistics&lt;/em&gt; 31: 586–99. &lt;a href="https://robjhyndman.com/publications/lookout/"&gt;https://robjhyndman.com/publications/lookout/&lt;/a&gt;.
&lt;/div&gt;
&lt;/div&gt;
&lt;/section&gt;
&lt;section id="slides" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="slides"&gt;Slides&lt;/h2&gt;
&lt;div class="pdf-embed" data-pdf="https://github.com/robjhyndman/surprisal_talk/raw/main/auckland_2026.pdf"&gt;&lt;/div&gt;
&lt;a href="https://github.com/robjhyndman/surprisal_talk/raw/main/auckland_2026.pdf" class="badge badge-small badge-red"&gt;Download pdf&lt;/a&gt;
&lt;script type="module" src="../pdf-embed.js"&gt;&lt;/script&gt;
&lt;/section&gt;
&lt;section id="youtube" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="youtube"&gt;YouTube&lt;/h2&gt;
&lt;div class="click-embed" data-youtube="5sK8UKLsCGM" data-src="https://www.youtube.com/embed/5sK8UKLsCGM?autoplay=1" data-title="YouTube video" data-loading="Loading video…"&gt;
  &lt;button type="button" class="click-facade"&gt;
    &lt;img src="https://i.ytimg.com/vi/5sK8UKLsCGM/hqdefault.jpg" alt="" loading="lazy"&gt;
    &lt;span class="click-play"&gt;Play video&lt;/span&gt;
  &lt;/button&gt;
&lt;/div&gt;
&lt;script type="module" src="../click-embed.js"&gt;&lt;/script&gt;


&lt;/section&gt;


 </description>
      <guid>https://robjhyndman.com/seminars/weird.html</guid>
      <pubDate>Wed, 05 Aug 2026 14:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Developing good research habits</title>
      <link>https://robjhyndman.com/seminars/research_habits/</link>
      <description> 



&lt;section id="presentation-for-the-2026-honours-and-masters-students" class="level2"&gt;

&lt;section id="citing" class="level3"&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.zotero.org"&gt;Zotero&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://paperpile.com/"&gt;Paperpile&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="searching" class="level3"&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://scholar.google.com.au"&gt;Google Scholar&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.semanticscholar.org"&gt;Semantic Scholar&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="writing" class="level3"&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://quarto.org"&gt;Quarto&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/quarto-monash/honours-thesis"&gt;Quarto honours thesis template&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="tracking" class="level3"&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://happygitwithr.com"&gt;Happy git with R&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com"&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="pdf-embed" data-pdf="https://github.com/robjhyndman/ResearchHabits/raw/master/ResearchHabits.pdf"&gt;&lt;/div&gt;
&lt;a href="https://github.com/robjhyndman/ResearchHabits/raw/master/ResearchHabits.pdf" class="badge badge-small badge-red"&gt;Download pdf&lt;/a&gt;
&lt;script type="module" src="../../pdf-embed.js"&gt;&lt;/script&gt;
&lt;/section&gt;
&lt;/section&gt;


 </description>
      <guid>https://robjhyndman.com/seminars/research_habits/</guid>
      <pubDate>Mon, 30 Mar 2026 13:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Anomaly detection using surprisals</title>
      <link>https://robjhyndman.com/seminars/surprisals.html</link>
      <description> 



&lt;section id="abstract" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="abstract"&gt;Abstract&lt;/h2&gt;
&lt;p&gt;I will discuss a probabilistic approach to anomaly detection based on extreme ‘surprisal values’ aka log scores, equal to minus the log density at each observation. The surprisal approach can be used for any collection of data objects, provided a probability density can be defined on the sample space. It can distinguish anomalies from legitimate observations in a heavy tail, and will identify anomalies that are undetected using methods based on distance measures. I will demonstrate the idea in various real data examples including univariate, multivariate and regression contexts, and when exploring more complicated data objects. I will also briefly outline the underlying theory when the density is known, and when it is estimated using a kernel density estimate. In the latter case, an innovative bandwidth selection method is used based on persistent homology.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="given-at" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="given-at"&gt;Given at&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://maths.anu.edu.au/news-events/events/topological-methods-time-varying-data-theory-and-applications-top-time"&gt;TopTime Conference&lt;/a&gt;, Australian National University, Canberra, Australia: 28 October 2025.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://stat-ml.github.io/frontiers-stat-inf-2025/"&gt;Frontiers of Statistical Inference 2025&lt;/a&gt;, MBZUAI, Abu Dhabi, UAE: 26 November 2025.&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="slides" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="slides"&gt;Slides&lt;/h2&gt;
&lt;div class="pdf-embed" data-pdf="https://github.com/robjhyndman/surprisal_talk/raw/f69df7203a21d11f70311ceb83e7546230d5411a/surprisals.pdf"&gt;&lt;/div&gt;
&lt;a href="https://github.com/robjhyndman/surprisal_talk/raw/f69df7203a21d11f70311ceb83e7546230d5411a/surprisals.pdf" class="badge badge-small badge-red"&gt;Download pdf&lt;/a&gt;
&lt;script type="module" src="../pdf-embed.js"&gt;&lt;/script&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/robjhyndman/surprisal_talk/raw/f69df7203a21d11f70311ceb83e7546230d5411a/surprisals.pdf"&gt;Top time slides&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/robjhyndman/surprisal_talk/raw/main/surprisals_fsi2025.pdf"&gt;FSI slides&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="software" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="software"&gt;Software&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://sevvandi.github.io/lookout/"&gt;lookout package for R&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pkg.robjhyndman.com/weird/"&gt;weird package for R&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;



&lt;/section&gt;


&lt;div id="quarto-appendix" class="default"&gt;&lt;section class="quarto-appendix-contents" id="quarto-bibliography"&gt;&lt;h2 class="anchored quarto-appendix-heading"&gt;References&lt;/h2&gt;&lt;div id="refs" class="references csl-bib-body hanging-indent"&gt;
&lt;div id="ref-weird" class="csl-entry"&gt;
Hyndman, Rob J. 2026. &lt;em&gt;That’s Weird: Anomaly Detection Using &lt;span&gt;R&lt;/span&gt;&lt;/em&gt;. &lt;a href="https://OTexts.com/weird"&gt;https://OTexts.com/weird&lt;/a&gt;.
&lt;/div&gt;
&lt;div id="ref-surprisalevt" class="csl-entry"&gt;
Hyndman, Rob J, and David T Frazier. 2026. &lt;span&gt;“Anomaly Detection Using Surprisals.”&lt;/span&gt; &lt;a href="http://robjhyndman.com/publications/surprisals.html"&gt;http://robjhyndman.com/publications/surprisals.html&lt;/a&gt;.
&lt;/div&gt;
&lt;div id="ref-lookout2" class="csl-entry"&gt;
Hyndman, Rob J, Sevvandi Kandanaarachchi, and Katharine Turner. 2026. &lt;span&gt;“When Lookout Sees Crackle: Anomaly Detection via Kernel Density Estimation.”&lt;/span&gt; &lt;a href="http://robjhyndman.com/publications/lookout2.html"&gt;http://robjhyndman.com/publications/lookout2.html&lt;/a&gt;.
&lt;/div&gt;
&lt;div id="ref-lookout" class="csl-entry"&gt;
Kandanaarachchi, Sevvandi, and Rob J Hyndman. 2022. &lt;span&gt;“Leave-One-Out Kernel Density Estimates for Outlier Detection.”&lt;/span&gt; &lt;em&gt;J Computational &amp;amp; Graphical Statistics&lt;/em&gt; 31: 586–99. &lt;a href="https://robjhyndman.com/publications/lookout/"&gt;https://robjhyndman.com/publications/lookout/&lt;/a&gt;.
&lt;/div&gt;
&lt;/div&gt;&lt;/section&gt;&lt;/div&gt; </description>
      <guid>https://robjhyndman.com/seminars/surprisals.html</guid>
      <pubDate>Mon, 27 Oct 2025 13:00:00 GMT</pubDate>
    </item>
    <item>
      <title>ATAR allocation and participation rates</title>
      <creator>Rob J Hyndman</creator>
      <link>https://robjhyndman.com/seminars/actac2025.html</link>
      <description> 





&lt;div class="pdf-embed" data-pdf="/talks/ACTAC_2025.pdf"&gt;&lt;/div&gt;
&lt;a href="../talks/ACTAC_2025.pdf" class="badge badge-small badge-red"&gt;Download pdf&lt;/a&gt;
&lt;script type="module" src="../pdf-embed.js"&gt;&lt;/script&gt;


 </description>
      <guid>https://robjhyndman.com/seminars/actac2025.html</guid>
      <pubDate>Sun, 21 Sep 2025 14:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Efficient reproducible workflows with R</title>
      <link>https://robjhyndman.com/seminars/pku2025.html</link>
      <description> 



&lt;p&gt;I will discuss and demonstrate several digital tools that underpin the efficiency and reproducibility of a modern research workflow. The workflow will combine the renv package for managing project-specific R dependencies, the targets package to avoid unnecessary computation, and quarto for generating multiple versions of papers for online repositories and journal submissions, ensuring seamless integration of code and text, without duplication. I’ll illustrate the workflow using a recent paper I coauthored on “Forecasting interrupted time series”.&lt;/p&gt;
&lt;section id="tools-covered" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="tools-covered"&gt;Tools covered&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://quarto.org"&gt;Quarto&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/quarto-monash/thesis"&gt;Quarto thesis template&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://rstudio.github.io/renv/"&gt;renv&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.ropensci.org/targets/"&gt;targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;section id="example-paper" class="level3"&gt;
&lt;h3 class="anchored" data-anchor-id="example-paper"&gt;Example paper&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://robjhyndman.com/publications/fits.html"&gt;Forecasting interrupted time series&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/bahmanrostamitabar/forecasting_interrupted_time_series"&gt;GitHub repo&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="slides" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="slides"&gt;Slides&lt;/h2&gt;


&lt;div class="pdf-embed" data-pdf="https://github.com/robjhyndman/research_tools/raw/main/research_tools_pku.pdf"&gt;&lt;/div&gt;
&lt;a href="https://github.com/robjhyndman/research_tools/raw/main/research_tools_pku.pdf" class="badge badge-small badge-red"&gt;Download pdf&lt;/a&gt;
&lt;script type="module" src="../pdf-embed.js"&gt;&lt;/script&gt;
&lt;/section&gt;


 </description>
      <guid>https://robjhyndman.com/seminars/pku2025.html</guid>
      <pubDate>Wed, 02 Jul 2025 14:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Forecasting the age structure of the scientific workforce in Australia</title>
      <link>https://robjhyndman.com/seminars/age_structure_forecasts.html</link>
      <description> 



&lt;section id="abstract" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="abstract"&gt;Abstract&lt;/h2&gt;
&lt;p&gt;I will demonstrate how to forecast the age structure of a workforce using demographic growth-balance equations that incorporate functional data components for graduate influx, international mobility, retirement, and mortality. This model adapts the stochastic population framework proposed by &lt;a href="https://robjhyndman.com/publications/stochastic-population-forecasts/"&gt;Hyndman and Booth (IJF, 2008)&lt;/a&gt;, substituting the birth component at age 0 with a graduation process at any age, and integrating retirement dynamics alongside a standard mortality process. It accommodates variable graduate influx, international mobility, and aging, through functional data components.&lt;/p&gt;
&lt;p&gt;The model is illustrated by forecasting the future age structure of scientific disciplines in Australia, utilising a variety of data sources. Data limitations are addressed through cohort interpolation and constrained penalised regression splines in order to obtain a workable data set. A combination of local and global ARIMA models is employed to address the temporal dynamics in the time series components.&lt;/p&gt;
&lt;p&gt;By forecasting age structures in disciplines such as Physics and Astronomy, Mathematical Sciences, Chemical Sciences, Earth Sciences, and Biological Sciences, the model informs strategic workforce planning and policy development.&lt;/p&gt;
&lt;p&gt;This forecasting framework not only aids in strategic planning and policy formulation within the scientific community, but also offers a blueprint for other professional sectors seeking to understand workforce dynamics amid demographic shifts.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="given-at" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="given-at"&gt;Given at&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://isf.forecasters.org/"&gt;International Symposium on Forecasting 2025&lt;/a&gt;, Beijing, China: 30 June.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.asc2025.net/"&gt;Australian Statistics Conference 2025&lt;/a&gt;, Perth, Australia: 1-5 December 2025.&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="slides" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="slides"&gt;Slides&lt;/h2&gt;
&lt;div class="pdf-embed" data-pdf="https://github.com/robjhyndman/age_structure_forecasts/raw/main/age_structure_talk.pdf"&gt;&lt;/div&gt;
&lt;a href="https://github.com/robjhyndman/age_structure_forecasts/raw/main/age_structure_talk.pdf" class="badge badge-small badge-red"&gt;Download pdf&lt;/a&gt;
&lt;script type="module" src="../pdf-embed.js"&gt;&lt;/script&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/robjhyndman/age_structure_forecasts/raw/63898251377b53a39186e6058b7aebc7a97653db/age_structure_talk.pdf"&gt;ISF 2025 slides&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/robjhyndman/age_structure_forecasts/raw/main/age_structure_talk.pdf"&gt;ASC 2025 slides&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="references" class="level2"&gt;




&lt;/section&gt;


&lt;div id="quarto-appendix" class="default"&gt;&lt;section class="quarto-appendix-contents" id="quarto-bibliography"&gt;&lt;h2 class="anchored quarto-appendix-heading"&gt;References&lt;/h2&gt;&lt;div id="refs" class="references csl-bib-body hanging-indent"&gt;
&lt;div id="ref-HB08" class="csl-entry"&gt;
Hyndman, Rob J, and Heather Booth. 2008. &lt;span&gt;“Stochastic Population Forecasts Using Functional Data Models for Mortality, Fertility and Migration.”&lt;/span&gt; &lt;em&gt;International J Forecasting&lt;/em&gt; 24 (3): 323–42. &lt;a href="https://robjhyndman.com/publications/stochastic-population-forecasts"&gt;https://robjhyndman.com/publications/stochastic-population-forecasts&lt;/a&gt;.
&lt;/div&gt;
&lt;div id="ref-asf" class="csl-entry"&gt;
Hyndman, Rob J, and Kelly Vanh Nguyen. 2025. &lt;em&gt;Forecasting the Age Structure of the Scientific Workforce in Australia&lt;/em&gt;. Working paper. Department of Econometrics &amp;amp; Business Statistics, Monash University. &lt;a href="http://robjhyndman.com/publications/asf"&gt;http://robjhyndman.com/publications/asf&lt;/a&gt;.
&lt;/div&gt;
&lt;/div&gt;&lt;/section&gt;&lt;/div&gt; </description>
      <guid>https://robjhyndman.com/seminars/age_structure_forecasts.html</guid>
      <pubDate>Sun, 29 Jun 2025 14:00:00 GMT</pubDate>
    </item>
    <item>
      <title>25 years of open source forecasting software</title>
      <link>https://robjhyndman.com/seminars/osfs25.html</link>
      <description> 



&lt;p&gt;&lt;a href="https://event.nectric.com.au/iif-osf/"&gt;IIF Workshop on Open Source Forecasting&lt;/a&gt;, Beihang University: 25-27 June 2025&lt;/p&gt;
&lt;section id="slides" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="slides"&gt;Slides&lt;/h2&gt;
&lt;div class="pdf-embed" data-pdf="https://github.com/robjhyndman/osfs_25years/raw/main/osfs25.pdf"&gt;&lt;/div&gt;
&lt;a href="https://github.com/robjhyndman/osfs_25years/raw/main/osfs25.pdf" class="badge badge-small badge-red"&gt;Download pdf&lt;/a&gt;
&lt;script type="module" src="../pdf-embed.js"&gt;&lt;/script&gt;
&lt;/section&gt;
&lt;section id="top-10-most-downloaded-r-packages" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="top-10-most-downloaded-r-packages"&gt;Top 10 most downloaded R packages&lt;/h2&gt;
&lt;ol type="1"&gt;
&lt;li&gt;&lt;a href="https://pkg.robjhyndman.com/forecast/"&gt;forecast&lt;/a&gt; &lt;a href="https://github.com/robjhyndman/forecast/"&gt;&lt;i class="fa-brands fa-github" aria-label="github"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cran.r-project.org/package=bsts"&gt;bsts&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cran.r-project.org/package=vars"&gt;vars&lt;/a&gt; &lt;a href="https://github.com/bpfaff/vars"&gt;&lt;i class="fa-brands fa-github" aria-label="github"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cran.r-project.org/package=prophet"&gt;prophet&lt;/a&gt; &lt;a href="https://github.com/facebook/prophet"&gt;&lt;i class="fa-brands fa-github" aria-label="github"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cran.r-project.org/package=smooth"&gt;smooth&lt;/a&gt; &lt;a href="https://github.com/config-i1/smooth"&gt;&lt;i class="fa-brands fa-github" aria-label="github"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://fabletools.tidyverts.org"&gt;fabletools&lt;/a&gt; &lt;a href="https://github.com/tidyverts/fabletools/"&gt;&lt;i class="fa-brands fa-github" aria-label="github"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://fable.tidyverts.org"&gt;fable&lt;/a&gt; &lt;a href="https://github.com/tidyverts/fable"&gt;&lt;i class="fa-brands fa-github" aria-label="github"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cran.r-project.org/package=greybox"&gt;greybox&lt;/a&gt; &lt;a href="https://github.com/config-i1/greybox"&gt;&lt;i class="fa-brands fa-github" aria-label="github"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pkg.earo.me/hts/"&gt;hts&lt;/a&gt; &lt;a href="https://github.com/earowang/hts/"&gt;&lt;i class="fa-brands fa-github" aria-label="github"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pkg.robjhyndman.com/thief/"&gt;thief&lt;/a&gt; &lt;a href="https://github.com/robjhyndman/thief"&gt;&lt;i class="fa-brands fa-github" aria-label="github"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
&lt;section id="r-packages-for-forecast-reconciliation" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="r-packages-for-forecast-reconciliation"&gt;R packages for forecast reconciliation&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://fable.tidyverts.org"&gt;fable&lt;/a&gt; &lt;a href="https://github.com/tidyverts/fable"&gt;&lt;i class="fa-brands fa-github" aria-label="github"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://danigiro.github.io/FoReco/"&gt;FoReco&lt;/a&gt; &lt;a href="https://github.com/danigiro/FoReco"&gt;&lt;i class="fa-brands fa-github" aria-label="github"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pkg.earo.me/hts/"&gt;hts&lt;/a&gt; &lt;a href="https://github.com/earowang/hts/"&gt;&lt;i class="fa-brands fa-github" aria-label="github"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pkg.robjhyndman.com/thief/"&gt;thief&lt;/a&gt; &lt;a href="https://github.com/robjhyndman/thief"&gt;&lt;i class="fa-brands fa-github" aria-label="github"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="python-packages-with-statistical-forecasting-models" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="python-packages-with-statistical-forecasting-models"&gt;Python packages with statistical forecasting models&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://aeon-toolkit.org/"&gt;aeon&lt;/a&gt; &lt;a href="https://github.com/aeon-toolkit/aeon"&gt;&lt;i class="fa-brands fa-github" aria-label="github"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://unit8co.github.io/darts/"&gt;Darts&lt;/a&gt; &lt;a href="https://github.com/unit8co/darts"&gt;&lt;i class="fa-brands fa-github" aria-label="github"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ts.gluon.ai/"&gt;GluonTS&lt;/a&gt; &lt;a href="https://github.com/awslabs/gluonts/"&gt;&lt;i class="fa-brands fa-github" aria-label="github"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/salesforce/Merlion?tab=readme-ov-file#merlion-a-machine-learning-library-for-time-series"&gt;Merlion&lt;/a&gt; &lt;a href="https://github.com/salesforce/Merlion"&gt;&lt;i class="fa-brands fa-github" aria-label="github"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://alkaline-ml.com/pmdarima/"&gt;pmdarima&lt;/a&gt; &lt;a href="https://github.com/alkaline-ml/pmdarima/"&gt;&lt;i class="fa-brands fa-github" aria-label="github"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.sktime.net/"&gt;sktime&lt;/a&gt; &lt;a href="https://github.com/sktime/sktime"&gt;&lt;i class="fa-brands fa-github" aria-label="github"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://nixtlaverse.nixtla.io/statsforecast/"&gt;StatsForecast&lt;/a&gt; &lt;a href="https://github.com/Nixtla/statsforecast"&gt;&lt;i class="fa-brands fa-github" aria-label="github"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.statsmodels.org"&gt;statsmodels&lt;/a&gt; &lt;a href="https://github.com/statsmodels/statsmodels/"&gt;&lt;i class="fa-brands fa-github" aria-label="github"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="python-packages-with-ml-forecasting-methods" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="python-packages-with-ml-forecasting-methods"&gt;Python packages with ML forecasting methods&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://aeon-toolkit.org/"&gt;aeon&lt;/a&gt; &lt;a href="https://github.com/aeon-toolkit/aeon"&gt;&lt;i class="fa-brands fa-github" aria-label="github"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://unit8co.github.io/darts/"&gt;Darts&lt;/a&gt; &lt;a href="https://github.com/unit8co/darts"&gt;&lt;i class="fa-brands fa-github" aria-label="github"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ts.gluon.ai/"&gt;GluonTS&lt;/a&gt; &lt;a href="https://github.com/awslabs/gluonts/"&gt;&lt;i class="fa-brands fa-github" aria-label="github"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://facebookresearch.github.io/Kats/"&gt;Kats&lt;/a&gt; &lt;a href="https://github.com/facebookresearch/Kats"&gt;&lt;i class="fa-brands fa-github" aria-label="github"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/salesforce/Merlion?tab=readme-ov-file#merlion-a-machine-learning-library-for-time-series"&gt;Merlion&lt;/a&gt; &lt;a href="https://github.com/salesforce/Merlion"&gt;&lt;i class="fa-brands fa-github" aria-label="github"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://nixtlaverse.nixtla.io/mlforecast/"&gt;MLForecast&lt;/a&gt; &lt;a href="https://github.com/Nixtla/mlforecast"&gt;&lt;i class="fa-brands fa-github" aria-label="github"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://nixtlaverse.nixtla.io/neuralforecast/"&gt;NeuralForecast&lt;/a&gt; &lt;a href="https://github.com/Nixtla/neuralforecast"&gt;&lt;i class="fa-brands fa-github" aria-label="github"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://neuralprophet.com/"&gt;NeuralProphet&lt;/a&gt; &lt;a href="https://github.com/ourownstory/neural_prophet"&gt;&lt;i class="fa-brands fa-github" aria-label="github"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://skforecast.org/"&gt;SKForecast&lt;/a&gt; &lt;a href="https://github.com/skforecast/skforecast"&gt;&lt;i class="fa-brands fa-github" aria-label="github"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.sktime.net/"&gt;sktime&lt;/a&gt; &lt;a href="https://github.com/sktime/sktime"&gt;&lt;i class="fa-brands fa-github" aria-label="github"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="python-packages-for-forecast-reconciliation" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="python-packages-for-forecast-reconciliation"&gt;Python packages for forecast reconciliation&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://unit8co.github.io/darts/"&gt;Darts&lt;/a&gt; &lt;a href="https://github.com/unit8co/darts"&gt;&lt;i class="fa-brands fa-github" aria-label="github"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://nixtla.github.io/hierarchicalforecast/"&gt;hierarchicalforecast&lt;/a&gt; &lt;a href="https://github.com/Nixtla/hierarchicalforecast"&gt;&lt;i class="fa-brands fa-github" aria-label="github"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://bohan-zhang.com/pyhts/"&gt;pyhts&lt;/a&gt; &lt;a href="https://github.com/AngelPone/pyhts"&gt;&lt;i class="fa-brands fa-github" aria-label="github"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.sktime.net/"&gt;sktime&lt;/a&gt; &lt;a href="https://github.com/sktime/sktime"&gt;&lt;i class="fa-brands fa-github" aria-label="github"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="foundation-forecasting-models" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="foundation-forecasting-models"&gt;Foundation forecasting models&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/amazon-science/chronos-forecasting"&gt;Chronos&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/time-series-foundation-models/lag-llama"&gt;Lag-Llama&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/SalesforceAIResearch/uni2ts"&gt;Moirai&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/moment-timeseries-foundation-model/moment"&gt;MOMENT&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/KimMeen/Time-LLM"&gt;Time-LLM&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/Time-MoE/Time-MoE"&gt;Time-MOE&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/Nixtla/nixtla"&gt;TimeGPT&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/google-research/timesfm"&gt;TimesFM&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ibm-granite/granite-tsfm/tree/main/tsfm_public/models/tinytimemixer"&gt;TinyTimeMixer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/mims-harvard/UniTS"&gt;UniTS&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="forecasting-data" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="forecasting-data"&gt;Forecasting data&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://forecastingdata.org"&gt;Monash time series forecasting repository&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="books" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="books"&gt;Books&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://OTexts.com/fpp2"&gt;&lt;em&gt;Forecasting: principles &amp;amp; practice&lt;/em&gt;, 2nd ed, Hyndman &amp;amp; Athanasopoulos, 2018&lt;/a&gt; – using the forecast package for R&lt;/li&gt;
&lt;li&gt;&lt;a href="https://OTexts.com/fpp3"&gt;&lt;em&gt;Forecasting: principles &amp;amp; practice&lt;/em&gt;, 3rd ed, Hyndman &amp;amp; Athanasopoulos, 2021&lt;/a&gt; – using the tsibble, feasts and fable packages for R&lt;/li&gt;
&lt;li&gt;&lt;a href="https://OTexts.com/fpppy"&gt;&lt;em&gt;Forecasting: principles &amp;amp; practice, the Pythonic way&lt;/em&gt;, Hyndman, Athanasopoulos, Garza, Challu, Mergenthaler, Olivares, 2025&lt;/a&gt; – using the Nixtla Python packages&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openforecast.org/adam"&gt;&lt;em&gt;Forecasting and Analytics with the Augmented Dynamic Adaptive Model (ADAM)&lt;/em&gt;, Svetunkov, 2025&lt;/a&gt; – using the smooth and greybox packages for R&lt;/li&gt;
&lt;/ul&gt;


&lt;/section&gt;


 </description>
      <guid>https://robjhyndman.com/seminars/osfs25.html</guid>
      <pubDate>Wed, 25 Jun 2025 14:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Modern research tools and workflow</title>
      <link>https://robjhyndman.com/seminars/research_tools.html</link>
      <description> 



&lt;p&gt;I will discuss and demonstrate several digital tools that underpin the efficiency and reproducibility of a modern research workflow.&lt;/p&gt;
&lt;section id="tools-covered" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="tools-covered"&gt;Tools covered&lt;/h2&gt;
&lt;section id="citing" class="level3"&gt;
&lt;h3 class="anchored" data-anchor-id="citing"&gt;Citing&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.mendeley.com"&gt;Mendeley&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.zotero.org"&gt;Zotero&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://paperpile.com/"&gt;Paperpile&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="searching" class="level3"&gt;
&lt;h3 class="anchored" data-anchor-id="searching"&gt;Searching&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://scholar.google.com.au"&gt;Google Scholar&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.semanticscholar.org"&gt;Semantic Scholar&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="scripting" class="level3"&gt;
&lt;h3 class="anchored" data-anchor-id="scripting"&gt;Scripting&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://r-project.org"&gt;R&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://posit.co/download/rstudio-desktop/"&gt;RStudio&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://rstudio.github.io/renv/"&gt;renv&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="saving" class="level3"&gt;
&lt;h3 class="anchored" data-anchor-id="saving"&gt;Saving&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/"&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://happygitwithr.com"&gt;Happy git with R&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="caching" class="level3"&gt;
&lt;h3 class="anchored" data-anchor-id="caching"&gt;Caching&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.ropensci.org/targets/"&gt;targets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="writing" class="level3"&gt;
&lt;h3 class="anchored" data-anchor-id="writing"&gt;Writing&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://quarto.org"&gt;Quarto&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/quarto-monash/thesis"&gt;Quarto thesis template&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="example-paper" class="level3"&gt;
&lt;h3 class="anchored" data-anchor-id="example-paper"&gt;Example paper&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://robjhyndman.com/publications/fits.html"&gt;Forecasting interrupted time series&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/bahmanrostamitabar/forecasting_interrupted_time_series"&gt;GitHub repo&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="slides" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="slides"&gt;Slides&lt;/h2&gt;


&lt;div class="pdf-embed" data-pdf="https://github.com/robjhyndman/research_tools/raw/main/research_tools.pdf"&gt;&lt;/div&gt;
&lt;a href="https://github.com/robjhyndman/research_tools/raw/main/research_tools.pdf" class="badge badge-small badge-red"&gt;Download pdf&lt;/a&gt;
&lt;script type="module" src="../pdf-embed.js"&gt;&lt;/script&gt;
&lt;/section&gt;


 </description>
      <guid>https://robjhyndman.com/seminars/research_tools.html</guid>
      <pubDate>Sun, 29 Dec 2024 13:00:00 GMT</pubDate>
    </item>
    <item>
      <title>An efficient reproducible workflow</title>
      <link>https://robjhyndman.com/seminars/workflow.html</link>
      <description> 



&lt;p&gt;Talk given at &lt;a href="https://resbaz.github.io/resbazvic2024/"&gt;Research Bazaar Victoria&lt;/a&gt;, Clayton, Australia.&lt;/p&gt;
&lt;section id="abstract" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="abstract"&gt;Abstract&lt;/h2&gt;
&lt;p&gt;I will demonstrate the digital tools that underpin the efficiency and reproducibility of my research workflow. Utilizing GitHub as the platform for version control and collaboration, and R as a foundational tool, I leverage the &lt;code&gt;renv&lt;/code&gt; package for managing project-specific R dependencies, and the &lt;code&gt;targets&lt;/code&gt; package to avoid unnecessary computation. I employ &lt;code&gt;quarto&lt;/code&gt; for generating multiple versions of my research papers for online repositories and journal submissions, ensuring seamless integration of code and text, without duplication. I’ll illustrate the workflow using a recent paper I coauthored on &lt;a href="https://robjhyndman.com/publications/fits.html"&gt;“Forecasting interrupted time series”&lt;/a&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/bahmanrostamitabar/forecasting_interrupted_time_series"&gt;GitHub repo for example paper&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/robjhyndman/workflow_talk"&gt;GitHub repo for slides&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://rstudio.github.io/renv/"&gt;renv&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.ropensci.org/targets/"&gt;targets&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://quarto.org"&gt;quarto&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="slides" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="slides"&gt;Slides&lt;/h2&gt;


&lt;div class="pdf-embed" data-pdf="https://github.com/robjhyndman/workflow_talk/raw/main/workflow.pdf"&gt;&lt;/div&gt;
&lt;a href="https://github.com/robjhyndman/workflow_talk/raw/main/workflow.pdf" class="badge badge-small badge-red"&gt;Download pdf&lt;/a&gt;
&lt;script type="module" src="../pdf-embed.js"&gt;&lt;/script&gt;
&lt;/section&gt;


 </description>
      <guid>https://robjhyndman.com/seminars/workflow.html</guid>
      <pubDate>Mon, 25 Nov 2024 13:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Creating custom quarto templates</title>
      <link>https://robjhyndman.com/seminars/quarto_templates.html</link>
      <description> 



&lt;section id="talk-for-wombat-2024" class="level3"&gt;
&lt;h3 class="anchored" data-anchor-id="talk-for-wombat-2024"&gt;Talk for &lt;a href="https://wombat2024.numbat.space"&gt;WOMBAT 2024&lt;/a&gt;&lt;/h3&gt;
&lt;/section&gt;
&lt;section id="abstract" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="abstract"&gt;Abstract&lt;/h2&gt;
&lt;p&gt;I will describe several quarto templates we have made for use at Monash University to create presentations, working papers, theses, exams, slides, reports, memos, and letters. These help make our outputs look professional and consistent. They are relatively easy to make if you know a little LaTeX (for pdf output) or CSS (for html output). More advanced customization is possible with the help of Lua. I will show how you can easily adapt our quarto templates to other organizations, and how to make your own templates from scratch.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Templates&lt;/strong&gt;: &lt;a href="https://github.com/quarto-monash"&gt;https://github.com/quarto-monash&lt;/a&gt;&lt;/p&gt;
&lt;/section&gt;
&lt;section id="slides" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="slides"&gt;Slides&lt;/h2&gt;


&lt;div class="pdf-embed" data-pdf="https://github.com/robjhyndman/quarto_templates_talk/raw/main/quarto_templates.pdf"&gt;&lt;/div&gt;
&lt;a href="https://github.com/robjhyndman/quarto_templates_talk/raw/main/quarto_templates.pdf" class="badge badge-small badge-red"&gt;Download pdf&lt;/a&gt;
&lt;script type="module" src="../pdf-embed.js"&gt;&lt;/script&gt;
&lt;/section&gt;


 </description>
      <guid>https://robjhyndman.com/seminars/quarto_templates.html</guid>
      <pubDate>Tue, 22 Oct 2024 13:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Improving forecasts via subspace projections</title>
      <link>https://robjhyndman.com/seminars/subspace_projections.html</link>
      <description> 



&lt;section id="abstract" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="abstract"&gt;Abstract&lt;/h2&gt;
&lt;p&gt;Univariate, multivariate, and hierarchical forecasts can all be improved using projections onto linear subspaces, regardless of what forecasting method is used. I will show some theoretical guarantees of this statement, and demonstrate using empirical applications how linear projections can lead to (sometimes dramatic) improvements in forecast accuracy.&lt;/p&gt;
&lt;p&gt;The procedure involves creating new time series that are linear combinations of the observed time series. These are then forecast, along with the original series, and all forecasts are adjusted via a projection matrix to ensure they satisfy the linear constraints.&lt;/p&gt;
&lt;p&gt;This procedure is now widely used for hierarchical forecasting. It has the potential to revolutionise multivariate forecasting as well.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="given-at" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="given-at"&gt;Given at&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Curtin University, Perth, Australia: 19 September 2024&lt;/li&gt;
&lt;li&gt;&lt;a href="https://isc24.iassl.lk"&gt;International Statistics Conference 2024&lt;/a&gt;, Sri Lanka: 28 December 2024&lt;/li&gt;
&lt;li&gt;Amazon “Forecasting, Macroeconomics &amp;amp; Finance” seminar, online: 21 February 2025&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.ihs.ac.at/events/conference-series/forecasting-workshop/vienna-workshop-on-economic-forecasting-2025/"&gt;3rd Vienna Workshop on Economic Forecasting&lt;/a&gt;, Institute for Advanced Studies, Vienna, Austria: 6 June 2025&lt;/li&gt;
&lt;li&gt;&lt;a href="http://ifs.ruc.edu.cn/dsjsy/dsjEN/index.htm"&gt;International Forum on Statistics&lt;/a&gt;, Renmin University, China: 5 July 2025&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="slides-sri-lanka" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="slides-sri-lanka"&gt;Slides (Sri Lanka)&lt;/h2&gt;
&lt;div class="pdf-embed" data-pdf="https://github.com/robjhyndman/subspace_projections_talk/raw/main/subspace_projections.pdf"&gt;&lt;/div&gt;
&lt;a href="https://github.com/robjhyndman/subspace_projections_talk/raw/main/subspace_projections.pdf" class="badge badge-small badge-red"&gt;Download pdf&lt;/a&gt;
&lt;script type="module" src="../pdf-embed.js"&gt;&lt;/script&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/robjhyndman/subspace_projections_talk/raw/main/subspace_curtin.pdf"&gt;Curtin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/robjhyndman/subspace_projections_talk/raw/main/subspace_amazon.pdf"&gt;Amazon&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/robjhyndman/subspace_projections_talk/raw/main/subspace_vienna.pdf"&gt;Vienna&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/robjhyndman/subspace_projections_talk/raw/main/subspace_renmin.pdf"&gt;Renmin&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="software" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="software"&gt;Software&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://pkg.earo.me/hts/"&gt;hts package for R&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pkg.robjhyndman.com/thief/"&gt;thief package for R&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://fable.tidyverts.org"&gt;fable package for R&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://danigiro.github.io/FoReco/"&gt;FoReco package for R&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cran.r-project.org/package=flap"&gt;flap package for R&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://nixtla.github.io/hierarchicalforecast/"&gt;hierarchicalforecast library for Python&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://angelpone.github.io/"&gt;pyhts library for Python&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;



&lt;/section&gt;


&lt;div id="quarto-appendix" class="default"&gt;&lt;section class="quarto-appendix-contents" id="quarto-bibliography"&gt;&lt;h2 class="anchored quarto-appendix-heading"&gt;References&lt;/h2&gt;&lt;div id="refs" class="references csl-bib-body hanging-indent"&gt;
&lt;div id="ref-temporal-hierarchies" class="csl-entry"&gt;
Athanasopoulos, George, Rob J Hyndman, Nikolaos Kourentzes, and Fotios Petropoulos. 2017. &lt;span&gt;“Forecasting with Temporal Hierarchies.”&lt;/span&gt; &lt;em&gt;European J Operational Research&lt;/em&gt; 262 (1): 60–74. &lt;a href="https://robjhyndman.com/publications/temporal-hierarchies"&gt;https://robjhyndman.com/publications/temporal-hierarchies&lt;/a&gt;.
&lt;/div&gt;
&lt;div id="ref-ctprob" class="csl-entry"&gt;
Girolimetto, Daniele, George Athanasopoulos, Tommaso Di Fonzo, and Rob J Hyndman. 2024. &lt;span&gt;“Cross-Temporal Probabilistic Forecast Reconciliation: Methodological and Practical Issues.”&lt;/span&gt; &lt;em&gt;International J Forecasting&lt;/em&gt; 40 (3): 1134–51. &lt;a href="http://robjhyndman.com/publications/ctprob.html"&gt;http://robjhyndman.com/publications/ctprob.html&lt;/a&gt;.
&lt;/div&gt;
&lt;div id="ref-hierarchical" class="csl-entry"&gt;
Hyndman, Rob J, Roman A Ahmed, George Athanasopoulos, and Han Lin Shang. 2011. &lt;span&gt;“Optimal Combination Forecasts for Hierarchical Time Series.”&lt;/span&gt; &lt;em&gt;Computational Statistics &amp;amp; Data Analysis&lt;/em&gt; 55 (9): 2579–89. &lt;a href="https://robjhyndman.com/publications/hierarchical/"&gt;https://robjhyndman.com/publications/hierarchical/&lt;/a&gt;.
&lt;/div&gt;
&lt;div id="ref-htsgeometry" class="csl-entry"&gt;
Panagiotelis, Anastasios, Puwasala Gamakumara, George Athanasopoulos, and Rob J Hyndman. 2021. &lt;span&gt;“Forecast Reconciliation: A Geometric View with New Insights on Bias Correction.”&lt;/span&gt; &lt;em&gt;International J Forecasting&lt;/em&gt; 37 (1): 343–59. &lt;a href="https://robjhyndman.com/publications/hierarchical-geometry"&gt;https://robjhyndman.com/publications/hierarchical-geometry&lt;/a&gt;.
&lt;/div&gt;
&lt;div id="ref-coherentprob" class="csl-entry"&gt;
Panagiotelis, Anastasios, Puwasala Gamakumara, George Athanasopoulos, and Rob J Hyndman. 2023. &lt;span&gt;“Probabilistic Forecast Reconciliation: Properties, Evaluation and Score Optimisation.”&lt;/span&gt; &lt;em&gt;European J Operational Research&lt;/em&gt; 306 (2): 693–706. &lt;a href="https://robjhyndman.com/publications/coherentprob"&gt;https://robjhyndman.com/publications/coherentprob&lt;/a&gt;.
&lt;/div&gt;
&lt;div id="ref-wickramasuriya2021properties" class="csl-entry"&gt;
Wickramasuriya, Shanika L. 2021. &lt;span&gt;“Properties of Point Forecast Reconciliation Approaches.”&lt;/span&gt; &lt;em&gt;arXiv Preprint arXiv:2103.11129&lt;/em&gt;. &lt;a href="https://arxiv.org/abs/2103.11129"&gt;https://arxiv.org/abs/2103.11129&lt;/a&gt;.
&lt;/div&gt;
&lt;div id="ref-mint" class="csl-entry"&gt;
Wickramasuriya, Shanika L, George Athanasopoulos, and Rob J Hyndman. 2019. &lt;span&gt;“Optimal Forecast Reconciliation for Hierarchical and Grouped Time Series Through Trace Minimization.”&lt;/span&gt; &lt;em&gt;J American Statistical Association&lt;/em&gt; 114 (526): 804–19. &lt;a href="https://robjhyndman.com/publications/mint"&gt;https://robjhyndman.com/publications/mint&lt;/a&gt;.
&lt;/div&gt;
&lt;div id="ref-flap" class="csl-entry"&gt;
Yang, Yangzhuoran Fin, George Athanasopoulos, Rob J Hyndman, and Anastasios Panagiotelis. 2024. &lt;span&gt;“Forecast Linear Augmented Projection (&lt;span&gt;FLAP&lt;/span&gt;): A Free Lunch to Reduce Forecast Error Variance.”&lt;/span&gt; Working paper. &lt;a href="https://robjhyndman.com/publications/flap.html"&gt;https://robjhyndman.com/publications/flap.html&lt;/a&gt;.
&lt;/div&gt;
&lt;/div&gt;&lt;/section&gt;&lt;/div&gt; </description>
      <guid>https://robjhyndman.com/seminars/subspace_projections.html</guid>
      <pubDate>Wed, 18 Sep 2024 14:00:00 GMT</pubDate>
    </item>
    <item>
      <title>vital: Tidy data analysis for demography</title>
      <link>https://robjhyndman.com/seminars/vital_numbat2024.html</link>
      <description> 



&lt;section id="numbat-seminar" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="numbat-seminar"&gt;NUMBAT seminar&lt;/h2&gt;
&lt;p&gt;I will introduce the vital package which allows analysis of demographic data using tidy tools. The package uses a variation of tsibble objects as the main data class, so all of the infrastructure available for tsibble and tibble objects can also be used with vital objects. Data may include births, deaths, mortality, fertility, population and migration data. Functions for plotting, smoothing, modelling and forecasting data are included. Models include the classical Lee-Carter model as well as functional data models. Future plans include replicating all of the models available in the demography and StMoMo packages. The package is currently available at &lt;a href="https://pkg.robjhyndman.com/vital/"&gt;pkg.robjhyndman.com/vital/&lt;/a&gt; and on &lt;a href="https://cran.r-project.org/package=vital"&gt;CRAN&lt;/a&gt;.&lt;/p&gt;
&lt;section id="r-package" class="level3"&gt;
&lt;h3 class="anchored" data-anchor-id="r-package"&gt;R package&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://pkg.robjhyndman.com/vital/"&gt;vital&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="slides" class="level3"&gt;
&lt;h3 class="anchored" data-anchor-id="slides"&gt;Slides&lt;/h3&gt;


&lt;div class="pdf-embed" data-pdf="https://github.com/robjhyndman/vital-talk/raw/main/vital_numbat2024.pdf"&gt;&lt;/div&gt;
&lt;a href="https://github.com/robjhyndman/vital-talk/raw/main/vital_numbat2024.pdf" class="badge badge-small badge-red"&gt;Download pdf&lt;/a&gt;
&lt;script type="module" src="../pdf-embed.js"&gt;&lt;/script&gt;
&lt;/section&gt;
&lt;/section&gt;


 </description>
      <guid>https://robjhyndman.com/seminars/vital_numbat2024.html</guid>
      <pubDate>Wed, 11 Sep 2024 14:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Forecasting the future and the future of forecasting</title>
      <link>https://robjhyndman.com/seminars/optima_2024.html</link>
      <description> 



&lt;section id="seminar-for-the-optima-arc-training-centre" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="seminar-for-the-optima-arc-training-centre"&gt;Seminar for the OPTIMA ARC training centre&lt;/h2&gt;
&lt;section id="summary" class="level3"&gt;
&lt;h3 class="anchored" data-anchor-id="summary"&gt;Summary&lt;/h3&gt;
&lt;p&gt;People have been forecasting for thousands of years. They forecast whether it will rain tomorrow, how much wheat will be harvested, how long it will take for dinner to cook, how many widgets their company will sell next month, what the unemployment figure will be in a year’s time, or how much superannuation they will have when they retire.&lt;/p&gt;
&lt;p&gt;Some things are relatively easy to forecast and some are unpredictable. Why is it that we can accurately forecast a solar eclipse in 1000 years, but we have no idea whether Google’s stock price will rise or fall tomorrow? How can we forecast the daily electricity consumption for the next week with remarkable precision, but we cannot forecast daily ambulance call-outs with the same accuracy?&lt;/p&gt;
&lt;p&gt;In his presentation, Professor Rob J Hyndman will discuss the conditions we need for predictability, how to measure the uncertainty of our forecasts, and how to evaluate whether we are uncertain enough. Rob will draw on his 30 years of forecasting experience, including forecasting Australia’s health budget for the next few years, forecasting peak electricity demand in 20 years, and producing weekly forecasts of daily COVID-19 cases for all Australian states from 2020-2023.&lt;/p&gt;
&lt;p&gt;He will also look at how forecasting has changed over the last 50 years, and what forecasting might look like in the future.&lt;/p&gt;


&lt;div class="click-embed" data-youtube="ihtJH4X3XyQ" data-src="https://www.youtube.com/embed/ihtJH4X3XyQ?autoplay=1" data-title="YouTube video" data-loading="Loading video…"&gt;
  &lt;button type="button" class="click-facade"&gt;
    &lt;img src="https://i.ytimg.com/vi/ihtJH4X3XyQ/hqdefault.jpg" alt="" loading="lazy"&gt;
    &lt;span class="click-play"&gt;Play video&lt;/span&gt;
  &lt;/button&gt;
&lt;/div&gt;
&lt;script type="module" src="../click-embed.js"&gt;&lt;/script&gt;
&lt;div class="pdf-embed" data-pdf="https://github.com/robjhyndman/uncertain_futures/raw/main/optima_forecasting.pdf"&gt;&lt;/div&gt;
&lt;a href="https://github.com/robjhyndman/uncertain_futures/raw/main/optima_forecasting.pdf" class="badge badge-small badge-red"&gt;Download pdf&lt;/a&gt;
&lt;script type="module" src="../pdf-embed.js"&gt;&lt;/script&gt;
&lt;/section&gt;
&lt;/section&gt;


 </description>
      <guid>https://robjhyndman.com/seminars/optima_2024.html</guid>
      <pubDate>Tue, 10 Sep 2024 14:00:00 GMT</pubDate>
    </item>
    <item>
      <title>vital: Tidy data analysis for demography</title>
      <link>https://robjhyndman.com/seminars/vital_user2024.html</link>
      <description> 



&lt;section id="user2024" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="user2024"&gt;&lt;a href="https://events.linuxfoundation.org/user/"&gt;UseR!2024&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;&lt;a href="https://userconf2024.sched.com/event/1c8uf/vital-tidy-data-analysis-for-demography-rob-hyndman-monash-university"&gt;14:30, 9 July&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I will introduce the vital package which allows analysis of demographic data using tidy tools. The package uses a variation of tsibble objects as the main data class, so all of the infrastructure available for tsibble and tibble objects can also be used with vital objects. Data may include births, deaths, mortality, fertility, population and migration data. Functions for plotting, smoothing, modelling and forecasting data are included. Models include the classical Lee-Carter model as well as functional data models. Future plans include replicating all of the models available in the demography and StMoMo packages. The package is currently available at &lt;a href="https://pkg.robjhyndman.com/vital/"&gt;pkg.robjhyndman.com/vital/&lt;/a&gt; and on &lt;a href="https://cran.r-project.org/package=vital"&gt;CRAN&lt;/a&gt;.&lt;/p&gt;
&lt;section id="r-package" class="level3"&gt;
&lt;h3 class="anchored" data-anchor-id="r-package"&gt;R package&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://pkg.robjhyndman.com/vital/"&gt;vital&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="slides" class="level3"&gt;
&lt;h3 class="anchored" data-anchor-id="slides"&gt;Slides&lt;/h3&gt;


&lt;div class="pdf-embed" data-pdf="https://github.com/robjhyndman/vital-talk/raw/main/vital_user2024.pdf"&gt;&lt;/div&gt;
&lt;a href="https://github.com/robjhyndman/vital-talk/raw/main/vital_user2024.pdf" class="badge badge-small badge-red"&gt;Download pdf&lt;/a&gt;
&lt;script type="module" src="../pdf-embed.js"&gt;&lt;/script&gt;
&lt;/section&gt;
&lt;/section&gt;


 </description>
      <guid>https://robjhyndman.com/seminars/vital_user2024.html</guid>
      <pubDate>Mon, 08 Jul 2024 14:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Probabilistic forecasts for anomaly detection</title>
      <link>https://robjhyndman.com/seminars/isf2024.html</link>
      <description> 



&lt;section id="international-symposium-on-forecasting" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="international-symposium-on-forecasting"&gt;&lt;a href="https://isf.forecasters.org"&gt;International Symposium on Forecasting&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;When a forecast is very inaccurate, it is sometimes because a poor forecasting model is used, but it can also occur when an unusual observation occurs. I will discuss the latter situation, where a good forecasting model can be used to identify anomalies. The approach taken is to use a probabilistic forecast, and to compute the “density scores” equal to the negative log likelihood of the observations based on the forecast distributions. The density scores provide a measure of how anomalous each observation is, given the forecast density. A large density score indicates that the observation is unlikely, and so is a potential anomaly. On the other hand, typical values will have low density scores. A Generalized Pareto Distribution is fitted to the largest density scores to estimate the probability of each observation being an anomaly. Applications to pharmaceutical scripts and mortality data will be used to illustrate the ideas using the &lt;a href="https://fable.tidyverts.org"&gt;fable&lt;/a&gt; and &lt;a href="https://pkg.robjhyndman.com/weird"&gt;weird&lt;/a&gt; R packages.&lt;/p&gt;
&lt;section id="slides" class="level3"&gt;
&lt;h3 class="anchored" data-anchor-id="slides"&gt;Slides&lt;/h3&gt;


&lt;div class="pdf-embed" data-pdf="https://github.com/robjhyndman/forecast-anomalies-talk/raw/main/forecast_anomalies.pdf"&gt;&lt;/div&gt;
&lt;a href="https://github.com/robjhyndman/forecast-anomalies-talk/raw/main/forecast_anomalies.pdf" class="badge badge-small badge-red"&gt;Download pdf&lt;/a&gt;
&lt;script type="module" src="../pdf-embed.js"&gt;&lt;/script&gt;
&lt;/section&gt;
&lt;/section&gt;


 </description>
      <guid>https://robjhyndman.com/seminars/isf2024.html</guid>
      <pubDate>Tue, 02 Jul 2024 14:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Tidy data analysis for demography using R</title>
      <link>https://robjhyndman.com/seminars/vital_mpidr.html</link>
      <description> 



&lt;section id="suessmilch-lecture-mpidr" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="suessmilch-lecture-mpidr"&gt;&lt;a href="https://www.demogr.mpg.de/en/news_events_6123/calendar_1921/vital_tidy_data_analysis_for_demography_using_r_13104"&gt;Suessmilch Lecture, MPIDR&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;3pm CEST, 26 June 2024&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I will introduce the vital package which allows analysis of demographic data using tidy tools. The package uses a variation of tsibble objects as the main data class, so all the infrastructure available for tsibble and tibble objects can also be used with vital objects. Data may include births, deaths, mortality, fertility, population and migration data. Functions for plotting, smoothing, modelling and forecasting data are included. Models include the classical Lee-Carter model as well as functional data models. Future plans include replicating all the models available in the demography and StMoMo packages. The package is available at &lt;a href="https://pkg.robjhyndman.com/vital/"&gt;pkg.robjhyndman.com/vital/&lt;/a&gt; and on &lt;a href="https://cran.r-project.org/package=vital"&gt;CRAN&lt;/a&gt;.&lt;/p&gt;
&lt;section id="r-package" class="level3"&gt;
&lt;h3 class="anchored" data-anchor-id="r-package"&gt;R package&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://pkg.robjhyndman.com/vital/"&gt;vital&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="slides" class="level3"&gt;
&lt;h3 class="anchored" data-anchor-id="slides"&gt;Slides&lt;/h3&gt;


&lt;div class="pdf-embed" data-pdf="https://github.com/robjhyndman/vital-talk/raw/main/vital.pdf"&gt;&lt;/div&gt;
&lt;a href="https://github.com/robjhyndman/vital-talk/raw/main/vital.pdf" class="badge badge-small badge-red"&gt;Download pdf&lt;/a&gt;
&lt;script type="module" src="../pdf-embed.js"&gt;&lt;/script&gt;
&lt;/section&gt;
&lt;/section&gt;


 </description>
      <guid>https://robjhyndman.com/seminars/vital_mpidr.html</guid>
      <pubDate>Tue, 25 Jun 2024 14:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Statistical Forecasting</title>
      <link>https://robjhyndman.com/seminars/futures_2024.html</link>
      <description> 



&lt;section id="talk-given-as-part-of-the-monash-university-futures-symposium" class="level2"&gt;
&lt;h2 class="anchored" data-anchor-id="talk-given-as-part-of-the-monash-university-futures-symposium"&gt;Talk given as part of the Monash University FUTURES symposium&lt;/h2&gt;
&lt;p&gt;Statistical forecasting involves using historical data to predict future outcomes. The goal is to build a stochastic model that captures the underlying patterns in the data, and how those have changed over time, and use it to make predictions about future values. I have developed many statistical forecasting models that are now widely used in diverse domains including retail, energy, demography, and tourism.&lt;/p&gt;
&lt;p&gt;The strength of statistical forecasting lies in its ability to provide quantifiable predictions based on historical data, and to include uncertainty in those predictions. Statistical forecasts are typically presented as probability distributions of future outcomes, which can be used to make decisions that account for the uncertainty in the predictions.&lt;/p&gt;
&lt;p&gt;Most recently I have been developing tools that allow statistical forecasts to be produced for thousands of related time series, such as sales forecasts for individual products in a retail store, or electricity demand forecasts for small regions in a country. The disaggregated data tends to be noisy and sparse, and the models need to be able to share information across related series to make accurate predictions.&lt;/p&gt;
&lt;p&gt;Because of the assumption that the future will continue to evolve similarly to the past, statistical forecasting tends to perform best when: (a) there is substantial historical data; (b) the underlying environment is relatively stable; and (c) the aim is to produce short-term forecasts. When there is limited historical data, or when the data generating process is subject to significant structural changes, statistical forecasting can struggle to make accurate predictions.&lt;/p&gt;
&lt;p&gt;I am also interested in using statistical forecasting techniques to identify anomalies, such as sudden changes in the underlying process, or unusual patterns in the data. This can be useful for detecting fraud, monitoring the health of complex systems, or identifying recording errors in data.&lt;/p&gt;


&lt;div class="pdf-embed" data-pdf="https://github.com/robjhyndman/statistical_forecasting/raw/main/statistical_forecasting.pdf"&gt;&lt;/div&gt;
&lt;a href="https://github.com/robjhyndman/statistical_forecasting/raw/main/statistical_forecasting.pdf" class="badge badge-small badge-red"&gt;Download pdf&lt;/a&gt;
&lt;script type="module" src="../pdf-embed.js"&gt;&lt;/script&gt;
&lt;/section&gt;


 </description>
      <guid>https://robjhyndman.com/seminars/futures_2024.html</guid>
      <pubDate>Mon, 13 May 2024 14:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Forecasting the future and the future of forecasting</title>
      <link>https://robjhyndman.com/seminars/treasury_2024.html</link>
      <description> 



&lt;section id="keynote-address-for-the-2024-australian-treasuries-forecasting-conference" class="level3"&gt;



&lt;div class="pdf-embed" data-pdf="https://github.com/robjhyndman/uncertain_futures/raw/main/future_forecasting.pdf"&gt;&lt;/div&gt;
&lt;a href="https://github.com/robjhyndman/uncertain_futures/raw/main/future_forecasting.pdf" class="badge badge-small badge-red"&gt;Download pdf&lt;/a&gt;
&lt;script type="module" src="../pdf-embed.js"&gt;&lt;/script&gt;
&lt;/section&gt;


 </description>
      <guid>https://robjhyndman.com/seminars/treasury_2024.html</guid>
      <pubDate>Wed, 07 Feb 2024 13:00:00 GMT</pubDate>
    </item>
  </channel>
</rss>
