EPSCoR SCTC Aquatic Ecology

Juvenile salmon size and growth data

Analysis in progress

This document plots juvenile Chinook and Coho salmon length and weight data by species, drainage, year, and age.

The intended use for this data is to provide size input data for bioenergetic simulations.

Questions to consider:
  • Are statistically significant growth trends observed using the seasonally-shifting-modes technique for:
    • Weight
    • Fork Length
    • Chinook vs. Coho
    • 2015 and/or 2016


Create mean length & weight values for fish grouped at level of:
  • river
  • year
  • species
  • season (“sample event”)
  • age
# create table of mean lengths/weights by season for each year/spp/river
dat1 <- dat %>%
  group_by(river,year,spp,sample.event.num,age) %>%
  summarise(avg_wt = mean(wt_g),
            avg_len = mean(len_mm),
            n_wt = validn(wt_g),             # number of fish with weight data
            n_len = validn(len_mm),           # number of fish with length data
            n_diet = validn(sample.id)) %>%   # number of fish diet sampled
  mutate(season = fct_recode(sample.event.num,         #code sampling events as seasons
                             "Early Summer"= "1", 
                             "Mid-Summer" = "2",
                             "Late Summer" = "3",
                             "Fall" = "4")) %>%
  mutate(river_spp = paste(river,"\n",spp)) %>%
  mutate(count_label = paste0("n=",n_len)) %>%
  ungroup() 
  # filter(n_wt > 1) # not sure why I had this in original code


<><><><><><><><><><><><><><><><><><><><><><><><><><>

To what temporal scale can groupings be reduced?

When did sampling occur?

a.) Test for significant difference among seasons for each spp/year. (Kruskall-wallis, nonparametric).
b.) If not consistent, test for differences between years for each spp/river. If not sigfnificant, consider combining years. (Question: Would this mean re-doing Age-Length Keys?)


QUESTION
Using the ALK-assigned ages, can the case be made for combining the datasets by year?
# prepare dataset 
all_coho <- all_coho %>%
  transform(year = as.character(year),
            age = as.numeric(age),
            lcat5 = as.numeric(lcat5))

# For each species/river, does the overall relationship between length and age 
# differ by YEAR ??

# All Coho (NO, p = 0.38)
mod1 <- multinom(age~lcat5,data=all_coho,maxit=500)
## # weights:  9 (4 variable)
## initial  value 3411.191156 
## iter  10 value 928.471817
## final  value 920.788889 
## converged
mod2 <- multinom(age~lcat5*year,data=all_coho,maxit=500)
## # weights:  15 (8 variable)
## initial  value 3411.191156 
## iter  10 value 1050.628746
## iter  20 value 912.894106
## iter  30 value 911.794034
## final  value 911.793999 
## converged
anova(mod1,mod2)
##          Model Resid. df Resid. Dev   Test    Df LR stat.     Pr(Chi)
## 1        lcat5      6206   1841.578           NA       NA          NA
## 2 lcat5 * year      6202   1823.588 1 vs 2     4 17.98978 0.001239786
# Beaver Creek Coho (YES, p = 0.18e-05)
all_coho_bc <- all_coho %>%
  filter(river == "Beaver Creek")
mod1 <- multinom(age~lcat5,data=all_coho_bc,maxit=500)
## # weights:  9 (4 variable)
## initial  value 1549.043327 
## iter  10 value 486.346880
## final  value 484.844741 
## converged
mod2 <- multinom(age~lcat5*year,data=all_coho_bc,maxit=500)
## # weights:  15 (8 variable)
## initial  value 1549.043327 
## iter  10 value 499.857349
## iter  20 value 471.810597
## iter  30 value 470.039665
## final  value 469.890056 
## converged
anova(mod1,mod2)
##          Model Resid. df Resid. Dev   Test    Df LR stat.      Pr(Chi)
## 1        lcat5      2816   969.6895           NA       NA           NA
## 2 lcat5 * year      2812   939.7801 1 vs 2     4 29.90937 5.106827e-06
# Russian River Coho (YES, p = 0.001)
all_coho_rr <- all_coho %>%
  filter(river == "Russian River")
mod1 <- multinom(age~lcat5,data=all_coho_rr,maxit=500)
## # weights:  9 (4 variable)
## initial  value 1168.923475 
## iter  10 value 272.776274
## final  value 264.491376 
## converged
mod2 <- multinom(age~lcat5*year,data=all_coho_rr,maxit=500)
## # weights:  15 (8 variable)
## initial  value 1168.923475 
## iter  10 value 271.834760
## iter  20 value 247.102050
## iter  30 value 245.368602
## final  value 245.366756 
## converged
anova(mod1,mod2)
##          Model Resid. df Resid. Dev   Test    Df LR stat.      Pr(Chi)
## 1        lcat5      2124   528.9828           NA       NA           NA
## 2 lcat5 * year      2120   490.7335 1 vs 2     4 38.24924 9.954295e-08
# Ptarmigan Creek Coho (YES, p = 0.04)
all_coho_pc <- all_coho %>%
  filter(river == "Ptarmigan Creek")
mod1 <- multinom(age~lcat5,data=all_coho_pc,maxit=500)
## # weights:  9 (4 variable)
## initial  value 400.993485 
## iter  10 value 142.599507
## final  value 142.243360 
## converged
mod2 <- multinom(age~lcat5*year,data=all_coho_pc,maxit=500)
## # weights:  15 (8 variable)
## initial  value 400.993485 
## iter  10 value 159.003677
## iter  20 value 140.125902
## iter  30 value 139.013568
## iter  40 value 138.270323
## iter  50 value 138.224318
## final  value 138.223089 
## converged
anova(mod1,mod2)
##          Model Resid. df Resid. Dev   Test    Df LR stat.    Pr(Chi)
## 1        lcat5       726   284.4867           NA       NA         NA
## 2 lcat5 * year       722   276.4462 1 vs 2     4 8.040542 0.09010432
# Evidence generally supports that there is no significant difference between years at the
# overall level, but evidence suggests that a difference between years exists when 
# examining at the scale of individual watershed.



# What does it look like when data is combined among years ????

# Create new df for mean values & labels;
# values not grouped by year

# create table of mean lengths/weights by season for each spp/river
dat2 <- dat %>%
  group_by(river,spp,sample.event.num,age) %>%
  summarise(avg_wt = mean(wt_g),
            avg_len = mean(len_mm),
            n_wt = validn(wt_g),             # number of fish with weight data
            n_len = validn(len_mm),           # number of fish with length data
            n_diet = validn(sample.id)) %>%   # number of fish diet sampled
  mutate(season = fct_recode(sample.event.num,         #code sampling events as seasons
                             "Early Summer"= "1", 
                             "Mid-Summer" = "2",
                             "Late Summer" = "3",
                             "Fall" = "4")) %>%
  mutate(river_spp = paste(river,"\n",spp)) %>%
  mutate(count_label = paste0("n=",n_len)) %>%
  ungroup()