knitr::opts_chunk$set(echo = TRUE) library(dplyr) Pars <- params$Pars nsim <- Pars$TAESD %>% length() ImpList <- list() ImpList$TACbias <- array(Pars$TACFrac, c(nsim, nyears + proyears)) ImpList$TACsd <- array(rlnorm((nyears + proyears) * nsim, mconv(1, rep(Pars$TACSD, (nyears + proyears))), sdconv(1, rep(Pars$TACSD, nyears + proyears))), c(nsim, nyears + proyears)) ImpList$TAEbias <- array(Pars$TAEFrac, c(nsim, nyears + proyears)) ImpList$TAEsd <- array(rlnorm((nyears + proyears) * nsim, mconv(1, rep(Pars$TAESD, (nyears + proyears))), sdconv(1, rep(Pars$TAESD, nyears + proyears))), c(nsim, nyears + proyears)) ImpList$SizeLimFrac <- array(Pars$SizeLimFrac, c(nsim, nyears + proyears)) ImpList$SizeLimSD <- array(rlnorm((nyears + proyears) * nsim, mconv(1, rep(Pars$SizeLimSD, (nyears + proyears))), sdconv(1, rep(Pars$SizeLimSD, nyears + proyears))), c(nsim, nyears + proyears))
if (params$tabs) { cat('### TAC Implementation {.tabset .tabset-fade .tabset-pills}' ) } else { cat('### TAC Implementation') }
Histograms of r nsim
simulations of inter-annual variability in TAC implementation error (TACSD
) and persistent bias in TAC implementation (TACFrac
), with vertical colored lines indicating r nsamp
randomly drawn values used in other plots:
par(mfrow=c(1,2)) hist2(Pars$TACSD, main="TACSD", col=params$plotPars$col, axes=params$plotPars$axes, breaks=params$plotPars$breaks, cex.main=params$plotPars$cex.main) abline(v=Pars$TACSD[params$its], col=1:nsamp, lwd=params$plotPars$lwd) axis(side=1) hist2(Pars$TACFrac, main="TACFrac", col=params$plotPars$col, axes=params$plotPars$axes, breaks=params$plotPars$breaks, cex.main=params$plotPars$cex.main) abline(v=Pars$TACFrac[params$its], col=1:nsamp, lwd=params$plotPars$lwd) axis(side=1)
par(mfrow=c(1,1), oma=c(3,3,1,1), mar=c(1,1,1,1)) years <- c(seq(-nyears+1, 0, by=1), seq(1, proyears,1)) ylim <- c(0, max(ImpList$TACbias[params$its, ] * ImpList$TACsd[params$its, ])) matplot(years, t(ImpList$TACbias[params$its, ] * ImpList$TACsd[params$its, ]), type="l", lty=1, bty="l", main="TAC discrepancy by Year", lwd=params$plotPars$lwd, ylab="Observed/Real", xlab="Years", las=1, xpd=NA, ylim=ylim) abline(v=0, col="darkgray", lty=2) abline(h=1, col="darkgray", lty=2)
if (params$tabs) { cat('### TAE Implementation {.tabset .tabset-fade .tabset-pills}' ) } else { cat('### TAE Implementation') }
Histograms of r nsim
simulations of inter-annual variability in TAE implementation error (TAESD
) and persistent bias in TAC implementation (TAEFrac
), with vertical colored lines indicating r nsamp
randomly drawn values used in other plots:
par(mfrow=c(1,2)) hist2(Pars$TAESD, main="TAESD", col=params$plotPars$col, axes=params$plotPars$axes, breaks=params$plotPars$breaks, cex.main=params$plotPars$cex.main) abline(v=Pars$TAESD[params$its], col=1:nsamp, lwd=params$plotPars$lwd) axis(side=1) hist2(Pars$TAEFrac, main="TAEFrac", col=params$plotPars$col, axes=params$plotPars$axes, breaks=params$plotPars$breaks, cex.main=params$plotPars$cex.main) abline(v=Pars$TAEFrac[params$its], col=1:nsamp, lwd=params$plotPars$lwd) axis(side=1)
par(mfrow=c(1,1), oma=c(3,3,1,1), mar=c(1,1,1,1)) years <- c(seq(-nyears+1, 0, by=1), seq(1, proyears,1)) ylim <- c(0, max(ImpList$TAEbias[params$its, ] * ImpList$TAEsd[params$its, ])) matplot(years, t(ImpList$TAEbias[params$its, ] * ImpList$TAEsd[params$its, ]), type="l", lty=1, bty="l", main="TAE discrepancy by Year", lwd=params$plotPars$lwd, ylab="Observed/Real", xlab="Years", las=1, xpd=NA, ylim=ylim) abline(v=0, col="darkgray", lty=2) abline(h=1, col="darkgray", lty=2)
if (params$tabs) { cat('### Size Limit Implementation {.tabset .tabset-fade .tabset-pills}' ) } else { cat('### Size Limit Implementation') }
Histograms of r nsim
simulations of inter-annual variability in size limit implementation error (SizeLimSD
) and persistent bias in size limit implementation (SizeLimFrac
), with vertical colored lines indicating r nsamp
randomly drawn values used in other plots:
par(mfrow=c(1,2)) hist2(Pars$SizeLimSD, main="SizeLimSD", col=params$plotPars$col, axes=params$plotPars$axes, breaks=params$plotPars$breaks, cex.main=params$plotPars$cex.main) abline(v=Pars$SizeLimSD[params$its], col=1:nsamp, lwd=params$plotPars$lwd) axis(side=1) hist2(Pars$SizeLimFrac, main="SizeLimFrac", col=params$plotPars$col, axes=params$plotPars$axes, breaks=params$plotPars$breaks, cex.main=params$plotPars$cex.main) abline(v=Pars$SizeLimFrac[params$its], col=1:nsamp, lwd=params$plotPars$lwd) axis(side=1)
par(mfrow=c(1,1), oma=c(3,3,1,1), mar=c(1,1,1,1)) years <- c(seq(-nyears+1, 0, by=1), seq(1, proyears,1)) ylim <- c(0, max(ImpList$SizeLimFrac[params$its, ] * ImpList$SizeLimSD[params$its, ])) matplot(years, t(ImpList$SizeLimFrac[params$its, ] * ImpList$SizeLimSD[params$its, ]), type="l", lty=1, bty="l", main="Size Limit discrepancy by Year", lwd=params$plotPars$lwd, ylab="Observed/Real", xlab="Years", las=1, xpd=NA, ylim=ylim) abline(v=0, col="darkgray", lty=2) abline(h=1, col="darkgray", lty=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.