pgen(est=NULL,limit=NULL,estSD=0,limSD=0,corr=0,dist=1,comp=1,nreps=10000)
If the management value and reference point are specified as single values with standard deviations, samples of size nreps are drawn randomly from the specified distribution parameterized with est and limit and associated standard deviations. If corr>0 (Eq. 3), then the est and limit distributions are drawn from a multivariate normal (function mvrnorm) distribution. If log-normal is assumed, function mvrnorm is used with the meanlog and sdlog estimates and then output values are bias-corrected and back-transformed.
If the management value and the reference point are represented by vectors of individual values, the probability is calculated by tallying the number of management values that exceed (or pass) the reference points and then dividing by number of est values*number of limit values. If either the management value or reference point is specified as a single value with standard deviation, then a vector of individual values of size equal to the size of the other vector is generated by using the rnorm or rlnorm function parameterized with the single value and its standard deviation.
## est = 2010 Spawning Stock Biomass of Striped Bass, limit = SSB Reference Point
pgen(est=50548,limit=36881,estSD=5485,limSD=1901,corr=0.05,dist=1,comp=2,nreps=1000)
Run the code above in your browser using DataLab