Skip to content

Commit bae9be1

Browse files
Fix conditional html reference in RJ-2024-008
1 parent 86eefdc commit bae9be1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

_articles/RJ-2024-008/RJ-2024-008.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ kable(runtime,"html", booktabs = TRUE, digits = 4, caption = "Average running ti
592592

593593
As an illustrative example, we analyze the monthly mean carbon dioxide, in parts per million (*ppm*), measured at the Mauna Loa Observatory, in Hawaii, from March 1958 to November 2018. The carbon dioxide data measured as the mole fraction in dry air on Mauna Loa constitute the longest record of direct measurements of $CO2$ in the atmosphere. This dataset is available in the \CRANpkg{astsa} package [@astsa] under the name *cardox* data and it is displayed in the left panel of Figure `r knitr::asis_output(ifelse(knitr::is_html_output(), '\\@ref(fig:fig1-interactive)', '\\@ref(fig:fig1-static)'))`. The plot's grid is created using the \CRANpkg{cowplot} package [@cowplot].
594594

595-
The objective of this subsection is to propose a model to analyze this time series and check the assumptions on the residuals of the model using our implemented `check_residuals()` function. The time series clearly has trend and seasonal components (see left panel of Figure \@ref(fig:fig1-static)), therefore, an adequate model that filters both components has to be selected. We make use of an ETS model. For its implementation, we make use the `ets()` function from the \CRANpkg{forecast} package [@Rob2007]. This function fits 32 different ETS models and selects the best model according to information criteria such as *Akaike's information criterion* (AIC) or *Bayesian Information criteria* (BIC) [@BIC2006].
595+
The objective of this subsection is to propose a model to analyze this time series and check the assumptions on the residuals of the model using our implemented `check_residuals()` function. The time series clearly has trend and seasonal components (see left panel of Figure `r knitr::asis_output(ifelse(knitr::is_html_output(), '\\@ref(fig:fig1-interactive)', '\\@ref(fig:fig1-static)'))`), therefore, an adequate model that filters both components has to be selected. We make use of an ETS model. For its implementation, we make use the `ets()` function from the \CRANpkg{forecast} package [@Rob2007]. This function fits 32 different ETS models and selects the best model according to information criteria such as *Akaike's information criterion* (AIC) or *Bayesian Information criteria* (BIC) [@BIC2006].
596596
The results provided by the `ets()` function are:
597597

598598
```{r fig1-static, fig.cap = "Left panel: CO2 Levels at Mauna Loa, time-series plot. The cardox data show a positive tendency and strong seasonality. Right panel: forecast of the next 12 months for the CO2 levels at Mauna Loa, the model's predictions capture the time-series behaviour.", eval = knitr::is_latex_output(), fig.alt="(ref:demo-caption1)", out.width = "75%"}

_articles/RJ-2024-008/RJ-2024-008.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6490,7 +6490,7 @@ <h3 data-number="4.1" id="numerical-experiments"><span class="header-section-num
64906490
</div>
64916491
<h3 data-number="4.2" id="real-data-application"><span class="header-section-number">4.2</span> Real data application</h3>
64926492
<p>As an illustrative example, we analyze the monthly mean carbon dioxide, in parts per million (<em>ppm</em>), measured at the Mauna Loa Observatory, in Hawaii, from March 1958 to November 2018. The carbon dioxide data measured as the mole fraction in dry air on Mauna Loa constitute the longest record of direct measurements of <span class="math inline">\(CO2\)</span> in the atmosphere. This dataset is available in the <a href="https://cran.r-project.org/package=astsa">astsa</a> package <span class="citation" data-cites="astsa">(<a href="#ref-astsa" role="doc-biblioref">Stoffer 2020</a>)</span> under the name <em>cardox</em> data and it is displayed in the left panel of Figure <a href="#fig:fig1-interactive">1</a>. The plot’s grid is created using the <a href="https://cran.r-project.org/package=cowplot">cowplot</a> package <span class="citation" data-cites="cowplot">(<a href="#ref-cowplot" role="doc-biblioref">Wilke 2020</a>)</span>.</p>
6493-
<p>The objective of this subsection is to propose a model to analyze this time series and check the assumptions on the residuals of the model using our implemented <code>check_residuals()</code> function. The time series clearly has trend and seasonal components (see left panel of Figure <a href="#fig:fig1-static"><strong>??</strong></a>), therefore, an adequate model that filters both components has to be selected. We make use of an ETS model. For its implementation, we make use the <code>ets()</code> function from the <a href="https://cran.r-project.org/package=forecast">forecast</a> package <span class="citation" data-cites="Rob2007">(<a href="#ref-Rob2007" role="doc-biblioref">Hyndman and Khandakar 2008</a>)</span>. This function fits 32 different ETS models and selects the best model according to information criteria such as <em>Akaike’s information criterion</em> (AIC) or <em>Bayesian Information criteria</em> (BIC) <span class="citation" data-cites="BIC2006">(<a href="#ref-BIC2006" role="doc-biblioref">Chen and Chen 2008</a>)</span>.
6493+
<p>The objective of this subsection is to propose a model to analyze this time series and check the assumptions on the residuals of the model using our implemented <code>check_residuals()</code> function. The time series clearly has trend and seasonal components (see left panel of Figure <a href="#fig:fig1-interactive">1</a>), therefore, an adequate model that filters both components has to be selected. We make use of an ETS model. For its implementation, we make use the <code>ets()</code> function from the <a href="https://cran.r-project.org/package=forecast">forecast</a> package <span class="citation" data-cites="Rob2007">(<a href="#ref-Rob2007" role="doc-biblioref">Hyndman and Khandakar 2008</a>)</span>. This function fits 32 different ETS models and selects the best model according to information criteria such as <em>Akaike’s information criterion</em> (AIC) or <em>Bayesian Information criteria</em> (BIC) <span class="citation" data-cites="BIC2006">(<a href="#ref-BIC2006" role="doc-biblioref">Chen and Chen 2008</a>)</span>.
64946494
The results provided by the <code>ets()</code> function are:</p>
64956495
<div class="layout-chunk" data-layout="l-body">
64966496

0 commit comments

Comments
 (0)