calc_iphc_ser_AB: Calculate Series AB and test if the scaled A and B are...

View source: R/calc-iphc-ser.R

calc_iphc_ser_ABR Documentation

Calculate Series AB and test if the scaled A and B are significantly different

Description

Calculate Series AB (Series A with 1995 and 1996 appropriately scaled from Series B)

Usage

calc_iphc_ser_AB(series_all)

Arguments

series_all

List of tibbles, one for each of Series A, B, C and D, resulting from calc_iphc_ser_all()

Value

List containing

  • ser_longest: the longest time series possible from Series A and B,

  • test_AB: the results from the paired t-test, NULL if Series B is longest.

  • G_A, G_B: geometric means of nonzero values in Series A and Series D (based on bootstrapped means).

  • type: which type the longest series is, either AB, A, B, or possibly C based on the descriptions below.

Longest series is either

(i) Series AB (Series A with 1995 and 1996 appropriately scaled from Series B) if test_AB$p.value >= 0.05, because the p-value means that we cannot reject the null hypothesis that the true difference in means of the rescaled (by their geometric means) Series A and B equals 0,

(ii) Series A, which is the longest series available if the rescaled series are significantly different.

(iii) Series B, if the years for which only the first 20 hooks are enumerated never catch the species (but other years do). Then Series AB becomes Series A plus some zeros, so we may as well use Series B that uses all the hooks and so is more likely to catch the species. This is a rare situation (and likely arises because not all species were specifically identified in earlier years (or 2013?), but seems to occur for China Rockfish. Return NULL for t_AB (to then use later to identify that Series B is the longest series).

(iv) But can also have Series C being the longest if A is all 0's and B and C cover the same years. Looks like this happens for Darkblotched. Had said this was not implemented yet - see Issue 10, but there is an instance below.


pbs-assess/gfiphc documentation built on July 4, 2023, 1:13 p.m.