A cheap, model-free screen for hauls, or groups of hauls such as cruises,
that may dominate an annual index value. For each year the swept-area
density of each haul (value_col / effort_col) is divided by the sum of
densities over all hauls of that year. With group_col, densities are first
summed within each group, so the share is the group's share of the year's
summed density.
Use it to choose which identifiers to refit with sdmTMB_leave_out():
leave-one-out refits are expensive, and the identifiers with the largest
density shares are the only ones that can move an annual index much. A
screen of the two largest shares per year plus every share of at least 5 %
(hauls) or 10 % (cruises) has worked well.
Usage
density_share(
data,
value_col,
effort_col = "swept_area",
time_col = "year",
group_col = NULL,
top_n = NULL,
min_share = NULL
)Arguments
- data
A data frame with one row per haul.
- value_col
Name of the catch column (biomass or numbers).
- effort_col
Name of the effort column (e.g. swept area).
- time_col
Name of the year column. Default
"year".- group_col
Optional name of a grouping column (e.g. a cruise identifier). If
NULL(default), shares are calculated per haul. Cruise numbers are often reused by different vessels, so build the group from the platform and the cruise number together.Optional screen:
candidateisTRUEfor thetop_nlargest shares of each year and for every share of at leastmin_share. BothNULL(default) gives nocandidatecolumn.
Value
A tibble. Without group_col, data with the columns density,
share, share_rank (1 = largest share of the year) and haul_share
(1 / number of hauls in the year) added. With group_col, one row per
group and year with n_hauls, n_positive, density (summed), share,
share_rank and haul_share (the group's share of the year's hauls).
share / haul_share is a model-free analogue of the leverage returned by
sdmTMB_leave_out(). A candidate column is added when top_n or
min_share is given.
Examples
data(sebastes)
# Haul shares, screened to the two largest per year and any share >= 5 %
hs <- density_share(sebastes, value_col = "biomass",
effort_col = "swept_area", top_n = 2, min_share = 0.05)
sum(hs$candidate)
#> [1] 47
# Survey-series shares (with cruise data, group by platform + cruise)
ss <- density_share(sebastes, value_col = "biomass",
effort_col = "swept_area", group_col = "cruiseseries")
head(ss[order(-ss$share / ss$haul_share), ])
#> # A tibble: 6 × 8
#> cruiseseries year n_hauls n_positive density share share_rank haul_share
#> <chr> <int> <int> <int> <dbl> <dbl> <int> <dbl>
#> 1 EggaS 2014 47 26 117421. 0.192 3 0.0680
#> 2 WinterS 2008 196 149 327937. 0.610 1 0.257
#> 3 WinterS 2017 260 177 834558. 0.789 1 0.361
#> 4 EggaS 2009 41 30 59912. 0.113 3 0.0543
#> 5 WinterS 2004 185 113 131597. 0.470 1 0.234
#> 6 EggaS 2012 42 31 67728. 0.125 3 0.0632