Skip to content

computeFbrps gives negative yield and recruitment #2

@hgerritsen

Description

@hgerritsen

I was running a bootstrap SR on my stock object and some of the runs resulted in reference points that were higher than fcrash and which gave negative yield and recruitment. Presumably the correct behaviour in this case should be zero yield and recruitment.
Here is some code to illustrate the issue:

library(stockassessment)
library(FLCore)
library(FLfse)
library(FLRef)

SAMfit <- fitfromweb('whg.7b-ce-k_WGCSE22_RevRec_2023')
stk <- SAM2FLStock(SAMfit,catch_estimate = T)
`
# one of the iterations in my bootstrap that gives strange results
i <- c(19L, 10L, 6L, 24L, 14L, 2L, 13L, 18L, 22L, 14L, 6L, 1L, 19L, 
            19L, 8L, 6L, 23L, 12L, 6L, 8L, 7L, 11L, 17L, 4L)  
y <- as.FLSR(stk,model='ricker')
rec(y) <- rec(y)[, i]
ssb(y) <- ssb(y)[, i]
sr <- srrTMB(y, spr0 = mean(spr0y(stk)))

brps <- computeFbrps(stock = stk, sr = sr, proxy = 'sprx', f0.1 = TRUE)
brps@refpts
# fmax and spr.30 are higher than fcrash and give negative yield and recr

I think the steepness of the SR is so low that the entire SR curve is below the replacement line:

# following https://www.fao.org/3/v8400e/V8400E02.htm - plot replacement line (fig 6)
fi <- an(fbar(brps))
## SPR vector corresponding to these F's
spri <- an(spr(brps))
## reference points
rpi <- refpts(brps)

par(mfrow = c(1, 2))
## SPR
plot(fi, spri, type = "l", bty = "l", xlab = "Fbar", ylab = "SPR", ylim = c(0, max(spri)))

## SR
pars <- params(brps)
curve(pars["a"] * x * (exp(-pars["b"] * x)),
      from = 0, to = 1e5, bty = "l",
      xlab = "SSB", ylab = "Recruitment", xaxs = "i", yaxs = "i",
      main = "No point of intersection with replacement line")
abline(c(0, 1/spri[idx]), col = "blue")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions