penalty1 allows for the option of adding a large penalty as a parameter approaches 1.0 and moves to become larger than 1. For example, when fitting a surplus production model sometimes the optimal mathematical model fit can occur by implying catches greater than available biomass, implying harvest rates > 1.0. By adding a large penalty to such values and adding those to the likelihood such strange outcomes can be avoided. This will accept a single value or a vector.
penalty1(x)
the parameter value that potentially incurs a penalty
a single value as a penalty to be added to a Log-Likelihood or SSQ
# NOT RUN {
x <- c(0.5,0.8,0.88,0.9,0.98,0.99,1.01)
round(cbind(x,penalty1(x)),4)
# }
Run the code above in your browser using DataLab