`R/tune.R`

`computeFp05.Rd`

Calculates the Fbar value giving a maximum probability of ssb being below Blim of 5%

```
computeFp05(
stock,
sr,
SBlim,
range = c(0.01, 0.75),
nyears = 3,
sigmaR = 0.5,
rho = 0.43,
its = 500,
verbose = TRUE
)
```

- stock
An FLStock over which the calculation is carried out.

- sr
The stock-recruits relationship to use in fwd.

- its
Number of iterations

- verbose
Should progress be shown, TRUE.

```
data(ple4)
sr <- predictModel(model=bevholt, params=FLPar(a=1.4e6, b=1.5e5))
fp05 <- computeFp05(ple4, sr, SBlim=150000, its=300, range=c(0.40, 0.50))
#> [1] fbar: 0.4 - prob: 2e-04 - diff: -0.0498
#> [2] fbar: 0.5 - prob: 0.5746 - diff: 0.5246
#> [3] fbar: 0.45 - prob: 0.08846667 - diff: 0.03846667
#> [4] fbar: 0.425 - prob: 0.01253333 - diff: -0.03746667
#> [5] fbar: 0.4375 - prob: 0.0382 - diff: -0.0118
#> [6] fbar: 0.44375 - prob: 0.0584 - diff: 0.0084
# RUN projection for obtained Fp.05 value
proj <- fwd(propagate(stf(ple4, nyears=100), 300), sr=sr,
fbar=FLQuant(fp05, dimnames=list(year=2018:2117)),
deviances=ar1rlnorm(rho=0.43, years=2018:2117, iters=300, meanlog=0,
sdlog=0.5))
plot(ssb(proj), prob=c(0.01, 0.25, 0.50, 0.75, 0.99)) +
geom_hline(yintercept=150000)
```