Skip to content

Commit 0cf0bed

Browse files
committed
Merge branch 'tech_doc_2025' of https://github.com/NOAA-EDAB/tech-doc into tech_doc_2025
2 parents a317615 + 6fc246a commit 0cf0bed

File tree

7 files changed

+384
-5
lines changed

7 files changed

+384
-5
lines changed

.github/workflows/manage_cache.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
sudo apt-get install libgdal-dev libcurl4-gnutls-dev libgit2-dev libudunits2-dev
2222
2323
- name: Check cached R packages
24-
uses: actions/cache@v2
24+
uses: actions/cache@v4
2525
id: cache
2626
with:
2727
path: ${{ env.R_LIBS_USER }}

_bookdown.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ rmd_files:
77
- "chapters/sectionHeaders/methods.rmd"
88
- "chapters/erddap_query_and_build.Rmd"
99
- "chapters/Trend_analysis.Rmd"
10+
- "chapters/short_term_trend.Rmd"
1011
- "chapters/regime_shift_analysis.Rmd"
1112
- "chapters/survdat.rmd"
1213
- "chapters/EPU.Rmd"

bibliography/short_term_trend.bib

Lines changed: 328 additions & 0 deletions
Large diffs are not rendered by default.

chapters/Trend_analysis.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ Summarizing trends for ecosystem indicators is desirable, but the power of stati
2121

2222
In a simulation study [@hardison2019], we explored the effect of time series length and autocorrelation strength on statistical power of three trend detection methods: a generalized least squares model selection approach, the Mann-Kendall test, and Mann-Kendall test with trend-free pre-whitening. Methods were applied to simulated time series of varying trend and autocorrelation strengths. Overall, when sample size was low (N = 10) there were high rates of false trend detection, and similarly, low rates of true trend detection. Both of these forms of error were further amplified by autocorrelation in the trend residuals. Based on these findings, we selected a minimum series length of N = 30 for indicator time series before assessing trend.
2323

24-
We also chose to use a GLS model selection (GLS-MS) approach to evaluate indicator trends in the 2018 (and future) State of the Ecosystem reports, as this approach performed best overall in the simulation study. GLS-MS also allowed for both linear and quadratic model fits and quantification of uncertainty in trend estimates. The model selection procedure for the GLS approach fits four models to each time series and selects the best fitting model using AICc. The models are, 1) linear trend with uncorrelated residuals, 2) linear trend with correlated residuals, 3) quadratic trend with uncorrelated residuals, and 4) quadratic trend with correlated residuals. I.e., the models are of the form
24+
We also chose to use a GLS model selection (GLS-MS) approach to evaluate indicator trends in the 2018 (and future) State of the Ecosystem reports, as this approach performed best overall in the simulation study. GLS-MS allowed for linear model fits and quantification of uncertainty in trend estimates. The model selection procedure for the GLS approach fits two models to each time series and selects the best fitting model using AICc. The models are, 1) linear trend with uncorrelated residuals, 2) linear trend with correlated residuals. I.e., the models are of the form
2525

26-
$$ Y_t = \alpha_0 + \alpha_1X_t + \alpha_2X_t^2 + \epsilon_t$$
26+
$$ Y_t = \alpha_0 + \alpha_1X_t + \epsilon_t$$
2727
$$\epsilon_t = \rho\epsilon_{t-1} + \omega_t$$
2828

2929
$$w_t \sim N(0, \sigma^2)$$

chapters/short_term_trend.Rmd

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Short Term Trend Analysis
2+
3+
4+
**Description**: Time series trend analysis for short time series
5+
6+
**Found in**: State of the Ecosystem - Gulf of Maine & Georges Bank (2025+), State of the Ecosystem - Mid-Atlantic (2025+)
7+
8+
**Indicator category**: Extensive analysis, not yet published
9+
10+
**Contributor(s)**: Andy Beet
11+
12+
**Data steward**: NA
13+
14+
**Point of contact**: Andy Beet, <[email protected]>
15+
16+
**Public availability statement**: NA
17+
18+
19+
## Methods
20+
21+
In prep: **A.Beet "A test for short term trend detection in the presence of autocorrelation"**
22+
23+
The specific model addressed here is of the form,
24+
25+
\begin{equation}
26+
Y_t = \beta_0 + \beta_1 t + \epsilon_t
27+
\end{equation}
28+
29+
where $\epsilon_t = \phi\epsilon_{t-1} + z_t$ is a stationary first order autoregressive process with $z_t \sim N(0,\sigma^2)$. Interest centers on testing the null hypothesis, $H_0:\beta_1 = 0$ against the alternative, $H_1:\beta_1 \neq 0$
30+
31+
Testing for a trend in time series data has been addressed by many authors from a wide range of disciplines including economics, statistics, hydrology, ecology, fisheries, and epidemiology (@cochrane_application_1949, @prais_trend_1954, @beach_maximum_1978, @park_estimating_1980, @brillinger_trend_1994, @bence_analysis_1995, @woodward_improved_1997, @zhang_temperature_2000, @yue_influence_2002, @wang_linear_2015 ,@hardison_simulation_2019). These approaches have typically taken one of three paths; non parametric methods such as the Mann Kendall test and its pre-whitening variants (@hamed_modified_1998, @zhang_temperature_2000, @yue_applicability_2002, @wang_linear_2015); parametric methods involving data transformation such as @cochrane_application_1949, @prais_trend_1954, @woodward_improved_1997; parametric methods such as generalized least squares and maximum likelihood estimation (@beach_maximum_1978, @davison_economic_1999, @pinheiro_mixed_2000).
32+
33+
It has been well documented that under the null hypothesis of no trend, $H_0:\beta_1=0$, in the presence of autocorrelation, parametric tests relying on asymptotic distribution theory reject the null hypothesis too frequently, leading to nominal significance levels that are too high, even for relatively long time series of length n = 100 (@woodward_improved_1997). Non parametric tests like those listed above also suffer the same problem.
34+
35+
We introduce a test that, like @beach_maximum_1978, uses maximum likelihood for parameter estimation, but differs in that the significance of the likelihood ratio statistic, LR, is assessed via a parametric bootstrap (@efron_introduction_1993). Parametric bootstrap procedures have been used in some of the aforementioned work. @woodward_improved_1997 uses an alternative statistic, the Cochrane-Orchutt statistic, for detecting a trend. @rayner_bootstrapping_1990 focuses on the significance of the AR(1) parameter and @bence_analysis_1995 focuses on adjusting confidence intervals. We use the parametric bootstrap as an alternative means of assessing the significance of the LR statistic.
36+
37+
The Likelihood ratio statistic combined with a parametric bootstrap is employed to test for a linear trend in the presence of autocorrelation in the form of an AR(1) process. Small samples of size, n = 10, are of particular interest.
38+
39+
### Data source(s)
40+
NA
41+
42+
### Data extraction
43+
NA
44+
45+
### Data analysis
46+
47+
Code used for the fitting and evaluation of short term trend can be found [here](https://github.com/NOAA-EDAB/arfit).
48+
49+
**catalog link**
50+
No associated catalog page

index.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ site: bookdown::bookdown_site
66
knit: "bookdown::render_book"
77
always_allow_html: true
88
documentclass: book
9-
bibliography: ["bibliography/introduction.bib","bibliography/aggregate_groups.bib","bibliography/seasonal_sst_anomaly_maps.bib","bibliography/Aquaculture.bib","bibliography/Bennet_indicator.bib","bibliography/bottom_temperature.bib","bibliography/bottom_temp_highres.bib","bibliography/Revenue_Diversity.bib","bibliography/ches_bay_water_quality.bib","bibliography/phytoplankton.bib","bibliography/ecosystem_overfishing.bib","bibliography/comm_eng.bib","bibliography/calanus_stage.bib","bibliography/ches_bay_temp.bib","bibliography/conceptmods.bib","bibliography/Condition.bib","bibliography/EPU.bib","bibliography/Expected_Number.bib","bibliography/cold_pool_index.bib","bibliography/sandlance.bib","bibliography/gulf_stream_index.bib","bibliography/habitat_diversity.bib","bibliography/habitat_vulnerability.bib","bibliography/Ich_div.bib","bibliography/long_term_sst.bib","bibliography/MAB_HAB.bib","bibliography/NE_HAB.bib","bibliography/habs.bib","bibliography/occupancy.bib","bibliography/productivity_tech_memo.bib","bibliography/RW.bib","bibliography/seabird_ne.bib","bibliography/seal_pup.bib","bibliography/slopewater_proportions.bib","bibliography/Species_dist.bib","bibliography/survey_data.bib","bibliography/thermal_hab_proj.bib","bibliography/trans_dates.bib","bibliography/trend_analysis.bib","bibliography/zooplankton.bib","bibliography/cold_pool_index.bib","bibliography/forage_energy_density.bib","bibliography/Forage_Fish_Biomass_Index.bib","bibliography/marine_heatwave.bib","bibliography/protected_species_hotspots.bib","bibliography/ocean_acidification.bib","bibliography/wind_habitat_occupancy.bib","bibliography/warm_core_rings.bib", "bibliography/glossary.bib","packages.bib"]
9+
bibliography: ["bibliography/introduction.bib","bibliography/aggregate_groups.bib","bibliography/seasonal_sst_anomaly_maps.bib","bibliography/Aquaculture.bib","bibliography/Bennet_indicator.bib","bibliography/bottom_temperature.bib","bibliography/bottom_temp_highres.bib","bibliography/Revenue_Diversity.bib","bibliography/ches_bay_water_quality.bib","bibliography/phytoplankton.bib","bibliography/ecosystem_overfishing.bib","bibliography/comm_eng.bib","bibliography/calanus_stage.bib","bibliography/ches_bay_temp.bib","bibliography/conceptmods.bib","bibliography/Condition.bib","bibliography/EPU.bib","bibliography/Expected_Number.bib","bibliography/cold_pool_index.bib","bibliography/sandlance.bib","bibliography/gulf_stream_index.bib","bibliography/habitat_diversity.bib","bibliography/habitat_vulnerability.bib","bibliography/Ich_div.bib","bibliography/long_term_sst.bib","bibliography/MAB_HAB.bib","bibliography/NE_HAB.bib","bibliography/habs.bib","bibliography/occupancy.bib","bibliography/productivity_tech_memo.bib","bibliography/RW.bib","bibliography/seabird_ne.bib","bibliography/seal_pup.bib","bibliography/slopewater_proportions.bib","bibliography/Species_dist.bib","bibliography/survey_data.bib","bibliography/thermal_hab_proj.bib","bibliography/trans_dates.bib","bibliography/trend_analysis.bib","bibliography/zooplankton.bib","bibliography/cold_pool_index.bib","bibliography/forage_energy_density.bib","bibliography/Forage_Fish_Biomass_Index.bib","bibliography/marine_heatwave.bib","bibliography/protected_species_hotspots.bib","bibliography/ocean_acidification.bib","bibliography/wind_habitat_occupancy.bib","bibliography/warm_core_rings.bib","bibliography/short_term_trend.bib", "bibliography/glossary.bib","packages.bib"]
1010
geometry: "left=1.0in, right=1.0in, top=1.0in, bottom=1.0in, includefoot"
1111
biblio-style: apalike
1212
link-citations: true

packages.bib

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ @Manual{R-stocksmart
138138
title = {stocksmart: Provides access to NOAAs stock SMART data},
139139
author = {Andy Beet},
140140
year = {2023},
141-
note = {R package version 0.6.12},
141+
note = {R package version 0.6.30},
142142
url = {https://github.com/NOAA-EDAB/stocksmart},
143143
}
144144

0 commit comments

Comments
 (0)