@@ -23,7 +46,7 @@
These are single-variable associations: sites, seasons and variables overlap (warm years are
also El Niño years, late sets are also darker), so a link here is a lead to test, not a cause.
- A multivariable model is tracked in issue #54.
+ The model further down estimates them together.
@@ -69,6 +92,174 @@
+ {#if md}
+ {@const sst = md.sst}
+ {@const strong = md.terms.filter((_, j) => clear(md.all.env[j]))}
+
+ All together: a model of catches
+
+ A negative-binomial regression of the sharks caught in each set ({num(md.n)} sets with every variable;
+ net-hours as the exposure), with a smooth curve for the day of the season, an effect for each
+ nursery and each season, and the environment. Each effect is the change in catch rate with all
+ the others held where they were. It can only adjust for what was measured, so it is still a guide,
+ not proof of cause.
+
+
+
+ x.label)}
+ series={[
+ { name: 'All sharks', color: 'var(--series-1)', values: sst.map((x) => fv(x.v)) }
+ ]}
+ xLabel="Rate ratio per +1 °C"
+ />
+
+
t.label.toLowerCase()).join(', ')}. The rest are within the noise.`
+ : 'For all sharks together, no environmental variable clears the noise once the calendar, nursery and season are in the model.'}
+ table={{
+ columns: [
+ { key: 'label', label: 'Variable (+1 SD)' },
+ { key: 'all', label: 'All sharks' },
+ { key: 'cm', label: 'Blacktip' },
+ { key: 'na', label: 'Lemon' }
+ ],
+ rows: termLabels.map((label, j) => ({
+ label,
+ all: effectText(md.all.env[j]),
+ cm: effectText(md.cm?.env[j]),
+ na: effectText(md.na?.env[j])
+ }))
+ }}
+ >
+ fv(md.cm?.env[j]))
+ },
+ {
+ name: SPECIES.Na.common,
+ color: SPECIES.Na.color,
+ values: md.terms.map((_, j) => fv(md.na?.env[j]))
+ }
+ ]}
+ xLabel="Rate ratio (1 = no change)"
+ />
+
+
+ ({ x: p.x, y: p.est })) ?? []
+ },
+ {
+ name: SPECIES.Na.common,
+ color: SPECIES.Na.color,
+ points: md.na?.day.map((p) => ({ x: p.x, y: p.est })) ?? []
+ }
+ ]}
+ refs={[{ y: 1, label: 'season average' }]}
+ xFormat={(x) => seasonDayLabel(Math.round(x))}
+ yFormat={(v) => `×${num(v, 1)}`}
+ yLabel="Rate ratio"
+ />
+
+
+ md.sites[i].name)}
+ series={[
+ {
+ name: SPECIES.Cm.common,
+ color: SPECIES.Cm.color,
+ values: siteOrder.map((i) => fv(md.cm?.sites[i]))
+ },
+ {
+ name: SPECIES.Na.common,
+ color: SPECIES.Na.color,
+ values: siteOrder.map((i) => fv(md.na?.sites[i]))
+ }
+ ]}
+ xLabel="Rate ratio vs the average nursery"
+ />
+
+
+ season(x))}
+ series={[
+ {
+ name: SPECIES.Cm.common,
+ color: SPECIES.Cm.color,
+ values: md.seasons.map((_, i) => fv(md.cm?.seasons[i]))
+ },
+ {
+ name: SPECIES.Na.common,
+ color: SPECIES.Na.color,
+ values: md.seasons.map((_, i) => fv(md.na?.seasons[i]))
+ }
+ ]}
+ xLabel="Rate ratio vs the average season"
+ />
+
+
+
About the model
+
+ -
+ Counts per set (blacktips, sicklefin lemons, and all sharks for the sea-temperature
+ steps) with log(net-hours) as the offset, so effects are on catch rate.
+
+ -
+ Negative binomial, because catches are clumped: the dispersion θ is {num(
+ md.all.theta,
+ 2
+ )} for all sharks, and the model beats a Poisson by {num(
+ (md.aicPoisson ?? 0) - (md.aicNb ?? 0)
+ )} AIC points.
+
+ -
+ Day of the season: natural cubic spline with knots at {md.knots.join(', ')}. Nurseries
+ and seasons are fixed effects coded against their average.
+
+ -
+ {num(md.dropped)} timed sets are left out for a missing variable (mostly the tide) or because
+ their nursery has fewer than 30 complete sets. The model explains {pct(
+ md.all.devExplained
+ )} of the deviance for all sharks.
+
+ - Each rate ratio has a Wald 95% interval, with no correction for the many terms.
+
+
+
+
+ {/if}
+
Catch rate across each variable's range
@@ -135,3 +326,17 @@
+
+