Description Usage Arguments Value Author(s) Examples
View source: R/TimeToTargetRunSize.r
Takes a sim.list object from the MCMC runs, computes the posterior distribution of the time to the target runsize, plots the posterior #'
1 | TimeToTargetRunSize(U, time, targetU, file_prefix, ci_prob = 0.95)
|
U |
Elements of sim.list from MCMC object for U - the estimate runsize in each stratum |
time |
A numeric vector of time used to label the strata. For example, this could be julian week for data stratified at a weekly level. |
targetU |
The targeted cumulative run size. E.g. 10,000 |
file_prefix |
Character string giving prefix for plot. A plot will be produced of the posterior in the filename paste(file_prefix,"-target.pdf",sep="")). |
ci_prob |
What size of credible interval should be computed? |
A list with a sample of the posterior (index), quantiles (quantiles), mean (mean), median(median), and standard deviation (sd), and target value (targetU)
Bonner, S.J. sbonner6@uwo.ca and Schwarz, C. J. cschwarz.stat.sfu.ca@gmail.com.
1 2 3 4 5 6 7 8 9 10 11 12 |
## Not run:
# Compute the posterior of time to reach 10,000 fish. Results contains the MCMC object
#
results$TimeToTargetRunSize <- TimeToTargetRunSize(
U=results$sims.list$U,
time=results$data$time,
targetU=10000,
file_prefix = 'Time10000')
## End(Not run) % end of dontrun
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.